How to Display Cumulative Totals in a Stacked Bar Chart
Published:
Updated:
This guide explains how to display cumulative totals in a stacked bar chart in Bold Reports. By adding a calculated total series and enabling data labels, you can display both the individual segment values and the cumulative total, improving the readability and interpretability of your chart.
Steps to Create and Customize the Chart
1. Create a Stacked Bar Chart
- Open the Bold Reports Designer.
- From the Widgets panel, drag and drop a Stacked Bar Chart onto the design canvas.
- Navigate to the Data pane and bind the required dataset to the chart.
2. Add Data Series to the Chart
- Drag the required fields (for example,
OnlineSales,RetailSales, andWholesaleSales) into the Y Values section. - This creates the stacked segments for the chart.
3. Create a Total Series
- Add a fourth series to the Y Values section.
- Click the expression button for the new series and enter the following expression to calculate the cumulative total:
=Fields!OnlineSales.Value + Fields!RetailSales.Value + Fields!WholesaleSales.Value
4. Enable Data Labels for Segments
- In Basic Settings, select Series from the dropdown list.
- Click the Edit (pencil) icon to open the Series Properties panel.
- Set Show Data Label to
True. - Repeat this process for each individual data series to display labels for all stacked segments.
5. Configure the Total Series Label
- Select the Total series created in the previous step.
- Set Show Data Label to
True. - To display the total as a cumulative value rather than an additional bar segment, set the Fill Color to
Transparentor adjust the Label Position toBottom.
6. Preview the Report
- Save the report.
- Click Preview and verify that:
- Each stacked segment displays its individual value.
- The total label displays the cumulative value for the stacked bar.
Download the sample report from here.
Related Articles
How to Format Date Labels in the Chart Category Axis in Bold Reports
How to Format Numbers in Bold Reports