Collection class for chart series
Inheritance: XmlHelper, IEnumerable
コード例 #1
0
 /// <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);
        }
 }
コード例 #2
0
 /// <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)
     {
     }
 }
コード例 #3
0
ファイル: ExcelChartSerie.cs プロジェクト: zw2430/EPPlus
        /// <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");
        }
コード例 #4
0
ファイル: ExcelChartSerie.cs プロジェクト: gahadzikwa/GAPP
        /// <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");
       }
コード例 #5
0
 /// <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;
     }
 }
コード例 #6
0
 /// <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;
     }
 }
コード例 #7
0
        /// <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)
            {

            }
        }
コード例 #8
0
 /// <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;
     }
 }
コード例 #9
0
 /// <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;
     }
 }
コード例 #10
0
        /// <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");
                }
            }
        }
コード例 #11
0
        /// <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;
            }
        }
コード例 #12
0
 /// <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)
 {
 }
コード例 #13
0
 /// <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)
 {
 }
コード例 #14
0
 /// <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)
 {
 }
コード例 #15
0
ファイル: ExcelChart.cs プロジェクト: kidaa/DissDlcToolkit
        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];
               }
               }
        }
コード例 #16
0
ファイル: ExcelChart.cs プロジェクト: kidaa/DissDlcToolkit
        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();
        }
コード例 #17
0
ファイル: ExcelChart.cs プロジェクト: kidaa/DissDlcToolkit
 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();
 }
コード例 #18
0
ファイル: ExcelChart.cs プロジェクト: huoxudong125/EPPlus
        /// <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;
            }
        }
コード例 #19
0
ファイル: ExcelChart.cs プロジェクト: huoxudong125/EPPlus
        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();
        }
コード例 #20
0
ファイル: ExcelChart.cs プロジェクト: huoxudong125/EPPlus
        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();
        }