Customize Error Bars in Presentation Charts Using С++
Add Error Bars
Aspose.Slides for C++ provides a simple API for managing error bar values. The sample code applies when using a custom value type. To specify a value, use the ErrorBarCustomValues property of a specific data point in the DataPoints collection of series:
- Create an instance of the Presentation class.
- Add a bubble chart on the desired slide.
- Access the first chart series and set the error bar X format.
- Access the first chart series and set the error bar Y format.
- Setting bars values and format.
- Write the modified presentation to a PPTX file.
Add Custom Error Bars
Aspose.Slides for C++ provides a simple API for managing custom error bar values. The sample code applies when IErrorBarsFormat.ValueType property is equal to Custom. To specify a value, use the ErrorBarCustomValues property of a specific data point in the DataPoints collection of series:
- Create an instance of the Presentation class.
- Add a bubble chart on the desired slide.
- Access the first chart series and set the error bar X format.
- Access the first chart series and set the error bar Y format.
- Access the chart series individual data points and setting the Error Bar values for an individual series data point.
- Setting bars values and format.
- Write the modified presentation to a PPTX file.
FAQ
What happens to error bars when exporting a presentation to PDF or images?
They are rendered as part of the chart and preserved during conversion along with the rest of the chart formatting, assuming a compatible version or renderer.
Can error bars be combined with markers and data labels?
Yes. Error bars are a separate element and are compatible with markers and data labels; if elements overlap, you may need to adjust formatting.
Where can I find the list of properties and enums for working with error bars in the API?
In the API reference: the ErrorBarsFormat class and the related enums ErrorBarType and ErrorBarValueType.