The Graph item is a data item and similar to the Table item it allows developers to summarize data by two dimensions (CategoryGroups hierarchy and SeriesGroups hierarchies) and display one or more measures (depending on the series type). As the other data items the Graph item connects to a single data source and provides additional options for grouping, filtering, sorting, conditional formatting, bindings and etc.
It is important to carefully prepare and understand your data before you create a graph, as this will help you design your charts quickly and efficiently.
Similarities to the Table item
One way to think about how Graph item work is to compare them to Table item:
Conceptually, they share the same data model:
The ColumnGroups in the Table is identical to the CategoryGroups in the Graph.
The RowGroups in the Table is identical to the SeriesGroups in the Graph
The cells in the Table’s body definition are identical to the Series definitions in the Graph.
Category group hierarchy
The CategoryGroups hierarchy defines the data points in the Graph series. For example suppose you have a group by Product Categories in the CategoryGroups hierarchy. The number of different categories will determine how many data points the series will have at runtime. If the Product Categories contains the categories Accessories, Bikes, Components and Clothing, the series in the Graph will have four data points.
Series group hierarchy
The SeriesGroups hierarchy defines the series at runtime; For example suppose you have a group by the Year field in the SeriesGroups hierarchy. The number of different years will determine how many series will appear on the Graph. If the Year field contains the years 2001, 2002, 2003 and 2004, the Graph will display four series for every series definition bound to this group.
By default the series of the Graph item displays aggregated data to visualize one or more measures. At runtime the intersection between the series group hierarchy members and the category group hierarchy members defines the data points in the series. For each data point one or more aggregate functions are calculated to define the value/coordinates of the data points.
Depending on the series type the Graph item can visualize one or more measures:
BarSeries, AreaSeries including all derived subtypes (Pie, Doughnut, Bar, Column, etc.) represent single measures;
Range series (RangeBarSeries and RangeAreaSeries) emphasizes on the distance between two values/measures;
LineSeries including all derived subtypes (Scatter, etc.) allows to identify the correlation between three different measures.
Now you can databind Graphs and utilize all of the reporting engine goodies such as grouping, filtering, sorting, conditional formatting, bindings and etc.
In the following Graph related blogs we will elaborate in details on the supported graph types and how to setup them.
Petar Raykov is a Software Developer in the Telerik Reporting division. He has been working on Telerik products since 2010. Off work he enjoys traveling, hanging out with friends and reading.