I try to modify a PowerPoint Slide, which contains two Charts. My goal is to find the Chart and modify its data.
I already got the GraphicFrame which contains the Chart, and I got the relative ID of the ChartSpace Element I want to modify. But how to get the actucal ChartSpace element?
public void test()
{
//// getting the SlidePart
var slidepart = presPart.GetPartById(relId) as SlidePart;
//// getting the Shape which contains the damned Chart
var graphicFrame = GetGraphicFrameFromSlide(slidepart, ppChart, ppSlide);
//// get the ChartReference
DrawCharts.ChartReference child = GraphicFrame.Graphic.GraphicData.GetFirstChild<DrawCharts.ChartReference>();
var chartID = child.Id;
//// this returns a ExtendedSomething, but no chart reference :(
var chartData = presDoc.GetPartById(chartID) ;
}