/// <summary> /// Default constructor /// </summary> /// <param name="chartSeries">Parent collection</param> /// <param name="ns">Namespacemanager</param> /// <param name="node">Topnode</param> internal ExcelChartSerie(ExcelChartSeries chartSeries, XmlNamespaceManager ns, XmlNode node) : base(ns,node) { _chartSeries = chartSeries; _node=node; _ns=ns; if (chartSeries.Chart.ChartType == eChartType.XYScatter || chartSeries.Chart.ChartType == eChartType.XYScatterLines || chartSeries.Chart.ChartType == eChartType.XYScatterLinesNoMarkers || chartSeries.Chart.ChartType == eChartType.XYScatterSmooth || chartSeries.Chart.ChartType == eChartType.XYScatterSmoothNoMarkers) { _seriesTopPath = "c:yVal"; _xSeriesTopPath = "c:xVal"; _seriesPath = string.Format(_seriesPath, _seriesTopPath); _xSeriesPath = string.Format(_xSeriesPath, _xSeriesTopPath); } else { _seriesTopPath = "c:val"; _xSeriesTopPath = "c:cat"; _seriesPath = string.Format(_seriesPath, _seriesTopPath); _xSeriesPath = string.Format(_xSeriesPath, _xSeriesTopPath); } }
/// <summary> /// Default constructor /// </summary> /// <param name="chartSeries">Parent collection</param> /// <param name="ns">Namespacemanager</param> /// <param name="node">Topnode</param> /// <param name="isPivot">Is pivotchart</param> internal ExcelBubbleChartSerie(ExcelChartSeries chartSeries, XmlNamespaceManager ns, XmlNode node, bool isPivot) : base(chartSeries, ns, node, isPivot) { if (chartSeries.Chart.ChartType == eChartType.Bubble3DEffect) { } }
/// <summary> /// Default constructor /// </summary> /// <param name="chartSeries">Parent collection</param> /// <param name="ns">Namespacemanager</param> /// <param name="node">Topnode</param> /// <param name="isPivot">Is pivotchart</param> internal ExcelChartSerie(ExcelChartSeries chartSeries, XmlNamespaceManager ns, XmlNode node, bool isPivot) : base(ns, node) { _chartSeries = chartSeries; _node = node; _ns = ns; SchemaNodeOrder = new string[] { "idx", "order", "tx", "marker", "trendline", "explosion", "dLbls", "cat", "val", "yVal", "xVal", "smooth" }; if (chartSeries.Chart.ChartType == eChartType.XYScatter || chartSeries.Chart.ChartType == eChartType.XYScatterLines || chartSeries.Chart.ChartType == eChartType.XYScatterLinesNoMarkers || chartSeries.Chart.ChartType == eChartType.XYScatterSmooth || chartSeries.Chart.ChartType == eChartType.XYScatterSmoothNoMarkers) { _seriesTopPath = "c:yVal"; _xSeriesTopPath = "c:xVal"; } else { _seriesTopPath = "c:val"; _xSeriesTopPath = "c:cat"; } _seriesPath = string.Format(_seriesPath, _seriesTopPath); _xSeriesPath = string.Format(_xSeriesPath, _xSeriesTopPath, isPivot ? "c:multiLvlStrRef" : "c:numRef"); }
/// <summary> /// Default constructor /// </summary> /// <param name="chartSeries">Parent collection</param> /// <param name="ns">Namespacemanager</param> /// <param name="node">Topnode</param> /// <param name="isPivot">Is pivotchart</param> internal ExcelChartSerie(ExcelChartSeries chartSeries, XmlNamespaceManager ns, XmlNode node, bool isPivot) : base(ns,node) { _chartSeries = chartSeries; _node=node; _ns=ns; SchemaNodeOrder = new string[] { "idx", "order", "tx", "marker","trendline", "explosion", "dLbls", "cat", "val", "yVal","xVal", "smooth" }; if (chartSeries.Chart.ChartType == eChartType.XYScatter || chartSeries.Chart.ChartType == eChartType.XYScatterLines || chartSeries.Chart.ChartType == eChartType.XYScatterLinesNoMarkers || chartSeries.Chart.ChartType == eChartType.XYScatterSmooth || chartSeries.Chart.ChartType == eChartType.XYScatterSmoothNoMarkers) { _seriesTopPath = "c:yVal"; _xSeriesTopPath = "c:xVal"; } else { _seriesTopPath = "c:val"; _xSeriesTopPath = "c:cat"; } _seriesPath = string.Format(_seriesPath, _seriesTopPath); _xSeriesPath = string.Format(_xSeriesPath, _xSeriesTopPath, isPivot ? "c:multiLvlStrRef" : "c:numRef"); }
/// <summary> /// Default constructor /// </summary> /// <param name="chartSeries">Parent collection</param> /// <param name="ns">Namespacemanager</param> /// <param name="node">Topnode</param> /// <param name="isPivot">Is pivotchart</param> internal ExcelRadarChartSerie(ExcelChartSeries chartSeries, XmlNamespaceManager ns, XmlNode node, bool isPivot) : base(chartSeries, ns, node, isPivot) { if (chartSeries.Chart.ChartType == eChartType.Radar) { Marker = eMarkerStyle.None; } }
/// <summary> /// Default constructor /// </summary> /// <param name="chartSeries">Parent collection</param> /// <param name="ns">Namespacemanager</param> /// <param name="node">Topnode</param> /// <param name="isPivot">Is pivotchart</param> internal ExcelScatterChartSerie(ExcelChartSeries chartSeries, XmlNamespaceManager ns, XmlNode node, bool isPivot) : base(chartSeries, ns, node, isPivot) { if (chartSeries.Chart.ChartType == eChartType.XYScatterLines || chartSeries.Chart.ChartType == eChartType.XYScatterSmooth) { Marker = eMarkerStyle.Square; } }
/// <summary> /// Default constructor /// </summary> /// <param name="chartSeries">Parent collection</param> /// <param name="ns">Namespacemanager</param> /// <param name="node">Topnode</param> /// <param name="isPivot">Is pivotchart</param> internal ExcelChartSerie(ExcelChartSeries chartSeries, XmlNamespaceManager ns, XmlNode node, bool isPivot) : base(ns, node) { _chartSeries = chartSeries; _node = node; _ns = ns; SchemaNodeOrder = new string[] { "idx", "order", "spPr", "tx", "marker", "trendline", "explosion", "invertIfNegative", "dLbls", "cat", "val", "xVal", "yVal", "bubbleSize", "bubble3D", "smooth" }; if (chartSeries.Chart.ChartType == eChartType.XYScatter || chartSeries.Chart.ChartType == eChartType.XYScatterLines || chartSeries.Chart.ChartType == eChartType.XYScatterLinesNoMarkers || chartSeries.Chart.ChartType == eChartType.XYScatterSmooth || chartSeries.Chart.ChartType == eChartType.XYScatterSmoothNoMarkers || chartSeries.Chart.ChartType == eChartType.Bubble || chartSeries.Chart.ChartType == eChartType.Bubble3DEffect) { _seriesTopPath = "c:yVal"; _xSeriesTopPath = "c:xVal"; } else { _seriesTopPath = "c:val"; _xSeriesTopPath = "c:cat"; } _seriesPath = string.Format(_seriesPath, _seriesTopPath); string xSeriesStartPath = _xSeriesPath; if (isPivot) { _xSeriesPath = string.Format(xSeriesStartPath, _xSeriesTopPath, "c:multiLvlStrRef"); } else { _xSeriesPath = string.Format(xSeriesStartPath, _xSeriesTopPath, "c:strRef"); if (!this.ExistNode(_xSeriesPath)) { _xSeriesPath = string.Format(xSeriesStartPath, _xSeriesTopPath, "c:multiLvlStrRef"); } if (!this.ExistNode(_xSeriesPath)) { _xSeriesPath = string.Format(xSeriesStartPath, _xSeriesTopPath, "c:numRef"); } } }
/// <summary> /// Default constructor /// </summary> /// <param name="chartSeries">Parent collection</param> /// <param name="ns">Namespacemanager</param> /// <param name="node">Topnode</param> /// <param name="isPivot">Is pivotchart</param> internal ExcelChartSerie(ExcelChartSeries chartSeries, XmlNamespaceManager ns, XmlNode node, bool isPivot) : base(ns,node) { _chartSeries = chartSeries; _node=node; _ns=ns; SchemaNodeOrder = new string[] { "idx", "order","spPr", "tx", "marker", "trendline", "explosion","invertIfNegative", "dLbls", "cat", "val", "xVal", "yVal", "bubbleSize", "bubble3D", "smooth" }; if (chartSeries.Chart.ChartType == eChartType.XYScatter || chartSeries.Chart.ChartType == eChartType.XYScatterLines || chartSeries.Chart.ChartType == eChartType.XYScatterLinesNoMarkers || chartSeries.Chart.ChartType == eChartType.XYScatterSmooth || chartSeries.Chart.ChartType == eChartType.XYScatterSmoothNoMarkers || chartSeries.Chart.ChartType == eChartType.Bubble || chartSeries.Chart.ChartType == eChartType.Bubble3DEffect) { _seriesTopPath = "c:yVal"; _xSeriesTopPath = "c:xVal"; } else { _seriesTopPath = "c:val"; _xSeriesTopPath = "c:cat"; } _seriesPath = string.Format(_seriesPath, _seriesTopPath); var np = string.Format(_xSeriesPath, _xSeriesTopPath, isPivot ? "c:multiLvlStrRef" : "c:numRef"); var sp= string.Format(_xSeriesPath, _xSeriesTopPath, isPivot ? "c:multiLvlStrRef" : "c:strRef"); if(ExistNode(sp)) { _xSeriesPath = sp; } else { _xSeriesPath = np; } }
/// <summary> /// Default constructor /// </summary> /// <param name="chartSeries">Parent collection</param> /// <param name="ns">Namespacemanager</param> /// <param name="node">Topnode</param> /// <param name="isPivot">Is pivotchart</param> internal ExcelPieChartSerie(ExcelChartSeries chartSeries, XmlNamespaceManager ns, XmlNode node, bool isPivot) : base(chartSeries, ns, node, isPivot) { }
/// <summary> /// Default constructor /// </summary> /// <param name="chartSeries">Parent collection</param> /// <param name="ns">Namespacemanager</param> /// <param name="node">Topnode</param> internal ExcelPieChartSerie(ExcelChartSeries chartSeries, XmlNamespaceManager ns, XmlNode node) : base(chartSeries, ns, node) { }
internal ExcelChart(ExcelDrawings drawings, XmlNode node, eChartType type, ExcelChart topChart, ExcelPivotTable PivotTableSource) : base(drawings, node, "xdr:graphicFrame/xdr:nvGraphicFramePr/xdr:cNvPr/@name") { ChartType = type; CreateNewChart(drawings, type, topChart); Init(drawings, _chartNode); _chartSeries = new ExcelChartSeries(this, drawings.NameSpaceManager, _chartNode, PivotTableSource!=null); if (PivotTableSource != null) SetPivotSource(PivotTableSource); SetTypeProperties(); if (topChart == null) LoadAxis(); else { _axis = topChart.Axis; if (_axis.Length > 0) { XAxis = _axis[0]; YAxis = _axis[1]; } } }
internal ExcelChart(ExcelDrawings drawings, XmlNode node, eChartType type, bool isPivot) : base(drawings, node, "xdr:graphicFrame/xdr:nvGraphicFramePr/xdr:cNvPr/@name") { ChartType = type; CreateNewChart(drawings, type, null); Init(drawings, _chartNode); _chartSeries = new ExcelChartSeries(this, drawings.NameSpaceManager, _chartNode, isPivot); SetTypeProperties(); LoadAxis(); }
private void InitChartLoad(ExcelDrawings drawings, XmlNode chartNode) { //SetChartType(); bool isPivot = false; Init(drawings, chartNode); _chartSeries = new ExcelChartSeries(this, drawings.NameSpaceManager, _chartNode, isPivot /*ChartXml.SelectSingleNode(_chartPath, drawings.NameSpaceManager)*/); LoadAxis(); }
/// <summary> /// Read the chart from XML /// </summary> /// <param name="drawings">Drawings collection for a worksheet</param> /// <param name="node">Topnode for drawings</param> internal ExcelChart(ExcelDrawings drawings, XmlNode node) : base(drawings, node, "xdr:graphicFrame/xdr:nvGraphicFramePr/xdr:cNvPr/@name") { XmlNode chartNode = node.SelectSingleNode("xdr:graphicFrame/a:graphic/a:graphicData/c:chart", drawings.NameSpaceManager); if (chartNode != null) { PackageRelationship drawingRelation = drawings.Part.GetRelationship(chartNode.Attributes["r:id"].Value); UriChart = PackUriHelper.ResolvePartUri(drawings.UriDrawing, drawingRelation.TargetUri); Part = drawings.Part.Package.GetPart(UriChart); ChartXml = new XmlDocument(); ChartXml.Load(Part.GetStream()); WorkSheet = drawings.Worksheet; SetChartType(); _chartXmlHelper = new XmlHelper(drawings.NameSpaceManager, ChartXml); _chartSeries = new ExcelChartSeries(this, drawings.NameSpaceManager, ChartXml.SelectSingleNode(_chartPath, drawings.NameSpaceManager)); LoadAxis(); } else { ChartXml = null; } }
internal ExcelChart(ExcelDrawings drawings, XmlNode node, eChartType type) : base(drawings, node, "xdr:graphicFrame/xdr:nvGraphicFramePr/xdr:cNvPr/@name") { ChartType = type; CreateNewChart(drawings, type, null); Init(drawings, _chartNode); _chartSeries = new ExcelChartSeries(this, drawings.NameSpaceManager, _chartNode /*ChartXml.SelectSingleNode(_chartPath, drawings.NameSpaceManager)*/); SetTypeProperties(drawings); LoadAxis(); }
internal ExcelChart(ExcelDrawings drawings, XmlNode node, eChartType type) : base(drawings, node, "xdr:graphicFrame/xdr:nvGraphicFramePr/xdr:cNvPr/@name") { SchemaNodeOrder = new string[] {"view3D", "plotArea", "barDir", "grouping", "ser", "dLbls", "shape", "legend" }; ChartType = type; CreateNewChart(drawings, type); _chartPath = rootPath + "/" + GetChartNodeText(); WorkSheet = drawings.Worksheet; string chartNodeText=GetChartNodeText(); _groupingPath = string.Format(_groupingPath, chartNodeText); _chartSeries = new ExcelChartSeries(this, drawings.NameSpaceManager, ChartXml.SelectSingleNode(_chartPath, drawings.NameSpaceManager)); _chartXmlHelper = new XmlHelper(drawings.NameSpaceManager, ChartXml); SetTypeProperties(drawings); LoadAxis(); }