Skip to content

Commit d59b5c9

Browse files
Create add-total-in-graph.md (#430)
* Create add-total-in-graph.md * Update add-total-in-graph.md
1 parent 449410c commit d59b5c9

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed

knowledge-base/add-total-in-graph.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
---
2+
title: Adding Overall Total That Doesn't Exist as a Data Field in Graph
3+
description: How to add a Total that doesn't come from the data source in the Graph
4+
type: how-to
5+
page_title: Add Total in Graph
6+
slug: add-total-in-graph
7+
position:
8+
tags: graph, total
9+
ticketid: 1549075
10+
res_type: kb
11+
---
12+
13+
## Environment
14+
<table>
15+
<tbody>
16+
<tr>
17+
<td>Product</td>
18+
<td>Progress® Telerik® Reporting</td>
19+
</tr>
20+
</tbody>
21+
</table>
22+
23+
24+
## Description
25+
26+
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.
27+
28+
## Solution
29+
30+
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:
31+
32+
* add a new static category group. You may set its label to what you need to be displayed on the category axis
33+
34+
* add new barSeries with the same coordinate system, the same series group, and the category group that is the newly created static one. It should display the same value, i.e. the sum of the counts
35+
36+
Here is also a [link to a muted video](https://screencast-o-matic.com/watch/c3Vl6VVoy4h) that demonstrates the approach.
37+
38+
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](https://www.screencast.com/t/yipfUZEWJW).
39+
40+
You may find the demo report [TotalInGraph.trdp in our Reporting Samples](https://github.com/telerik/reporting-samples/blob/master/TotalInGraph.trdp)

0 commit comments

Comments
 (0)