public static void Run()
{
// The path to the documents directory.
string dataDir = RunExamples.GetDataDir_Charts();
// Instantiate Presentation class that represents PPTX file
Presentation presentation = new Presentation(dataDir + "ExistingChart.pptx");
// Access first slideMarker and add chart with default data
ISlide slide = presentation.Slides[0];
IChart chart = (IChart)slide.Shapes[0];
chart.ChartData.SetRange("Sheet1!A1:B4");
presentation.Save(dataDir + "SetDataRange_out.pptx", SaveFormat.Pptx);
}
}