New to Telerik Reporting? Download free 30-day trial

Adding Overall Total That Doesn't Exist as a Data Field in Graph

Environment

Product Progress® Telerik® Reporting

Description

I need to add a separate category for the overall total in my Graph. This total doesn't come from the data source. The data is structured in groups, and I need the total for all the groups in a separate category.

Solution

Let's assume that we have used the Graph Wizard to add a Column Chart that displays the value (for example Counts) ordered in categories (for example Facilities) and series (e.g. Years). The data for each category and series will be filtered by the corresponding values. In order to display the total for each year, we need to have a new barSeries, which Category group is static so that it includes all the data. Hence we:

  • add a new static category group You may set its label to what you need to be displayed on the category axis
  • add new barSeries It should:

    • be with the same coordinate system
    • be with the same series group
    • be with category group that is the newly created static one
    • display the same value, i.e. the sum of the counts
    • the second barSeries we introduced result in duplicated Series labels. You may fix this by removing the legend item of the second barSeries. Select the series and set its LegendItem > Style > Visible to False as displayed on the linked screenshot.

Sample

In this article