public static void Run()
{
// The path to the documents directory.
string dataDir = RunExamples.GetDataDir_Charts();
// Creating empty presentation
using (Presentation presentation = new Presentation())
{
// Creating a bubble chart
IChart chart = presentation.Slides[0].Shapes.AddChart(ChartType.Bubble, 50, 50, 400, 300, true);
// Adding Error bars and setting its format
IErrorBarsFormat errBarX = chart.ChartData.Series[0].ErrorBarsXFormat;
IErrorBarsFormat errBarY = chart.ChartData.Series[0].ErrorBarsYFormat;
errBarX.IsVisible = true;
errBarY.IsVisible = true;
errBarX.ValueType = ErrorBarValueType.Fixed;
errBarX.Value = 0.1f;
errBarY.ValueType = ErrorBarValueType.Percentage;
errBarY.Value = 5;
errBarX.Type = ErrorBarType.Plus;
errBarY.Format.Line.Width = 2;
errBarX.HasEndCap = true;
// Saving presentation
presentation.Save(dataDir + "ErrorBars_out.pptx", SaveFormat.Pptx);
}
}
}