public ExcelChartSerie(ExcelChartSeries charts, XmlNamespaceManager ns, XmlNode node)
     : base(ns,node)
 {
     _charts=charts;
        _node=node;
        _ns=ns;
 }
Exemple #2
0
        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());
                SetChartType();
                _chartXmlHelper = new XmlHelper(drawings.NameSpaceManager, ChartXml);
                _series = new ExcelChartSeries(this, drawings.NameSpaceManager, ChartXml.SelectSingleNode(_chartPath, drawings.NameSpaceManager));
                LoadAxis();
            }
            else
            {
                ChartXml = null;
            }
        }