private void Init() { // Get chart part C.ChartReference cChartReference = _pGraphicFrame.GetFirstChild <A.Graphic>().GetFirstChild <A.GraphicData>() .GetFirstChild <C.ChartReference>(); ChartPart = (ChartPart)Slide.SlidePart.GetPartById(cChartReference.Id); C.PlotArea cPlotArea = ChartPart.ChartSpace.GetFirstChild <C.Chart>().PlotArea; _cXCharts = cPlotArea.Where(e => e.LocalName.EndsWith("Chart", StringComparison.Ordinal)); }
private void Init() { var chartPartRef = _grFrame.GetFirstChild <A.Graphic>().GetFirstChild <A.GraphicData>().GetFirstChild <C.ChartReference>().Id; _sdkChartPart = (ChartPart)_shapeContext.SkdSlidePart.GetPartById(chartPartRef); _cChart = _sdkChartPart.ChartSpace.GetFirstChild <C.Chart>(); _sdkCharts = _cChart.PlotArea.Where(e => e.LocalName.EndsWith("Chart", StringComparison.Ordinal)).ToList(); // example: <c:barChart>, <c:lineChart> _seriesCollection = new Lazy <SeriesCollection>(GetSeriesCollection); _categories = new Lazy <CategoryCollection>(TryGetCategories); }
public static A.Table GetATable(this P.GraphicFrame pGraphicFrame) { return(pGraphicFrame.GetFirstChild <A.Graphic>().GraphicData.GetFirstChild <A.Table>()); }
/// <summary> /// Has <see cref="P.GraphicFrame"/> instance chart. /// </summary> /// <param name="grFrame"></param> public static bool HasChart(this P.GraphicFrame grFrame) { var grData = grFrame.GetFirstChild <A.Graphic>().GetFirstChild <A.GraphicData>(); return(grData.Uri.Value.Equals(ChartUri, StringComparison.Ordinal)); }