public static void Run()
{
// The path to the documents directory.
string dataDir = RunExamples.GetDataDir_Charts();
using (Presentation presentation = new Presentation())
{
IChart chart = presentation.Slides[0].Shapes.AddChart(ChartType.Pie, 50, 50, 500, 400);
chart.ChartData.Series[0].Labels.DefaultDataLabelFormat.ShowValue = true;
chart.ChartData.Series[0].Labels.DefaultDataLabelFormat.ShowLabelAsDataCallout = true;
chart.ChartData.Series[0].Labels[2].DataLabelFormat.ShowLabelAsDataCallout = false;
presentation.Save(dataDir + "DisplayChartLabels_out.pptx", SaveFormat.Pptx);
}
}
}