How to create plot bands with Graph item
|Product||Progress® Telerik® Reporting|
The following article demonstrates how to use the Graph item to create a chart with plot bands that separate the plot area into regions, using additional AreaSeries
We are assuming that the chart you're creating, needs to be divided horizontally into three areas, colored in red, yellow and green. These areas will help to visually distinguish each column and easily determine its relation to a particular area. A sample image is shown below:
- Create a column chart using the wizard. Creating such chart is a straightforward process, explained here: How To: Create Column Chart and we won't discuss it in details.
- Create a second coordinate system, that will use the existing Y axis and have new X axis with Numerical scale.
- Add an area series that uses the second coordinate system and the previously created category and series groups.
- Set the new area series' X property to =ColumnNumber('graph1')-1. This would create a data point for each index of the graph's category grouping.
- Set the new area series' Y property to 0 and Y0 property to 50. This will allow the area to span between 0 and 50 mark of the Y axis.
- Add two more area series using the same approach and set their Y and Y0 properties respectively to 50, 75 and 75, 100.
- Open the series editor and move the column series at the last position in the list, so it will be drawn on top of the area series.
- Assign the desired colors to the graph series using the graph's ColorPalette property.
You can download the sample .trdx report definition from here.