How to change the space between chart's series
|Product||Progress® Telerik® Reporting|
|Report Item||Graph Item|
Using the Graph item, you can set the amount of blank space between two adjacent data slots with SpacingSlotCount property of the Scale class. However, in some scenarios there is a need to set the space between different series in a data slot.
By default, the Graph item does not have the setting to change the space between different series. The solution can be to include the additional series with empty values into the Graph's data source.
- Modify the data for the Graph item to include the additional series with zero values:
Category,Series,SeriesOrder,Value A,ser1,0,10 A,emptySer,1,0 A,ser2,2,20 B,ser1,0,15 B,emptySer,1,0 B,ser2,2,25
In order the empty series to appear between the visible series, set the Sorting expression in SeriesGroup to "= Fields.SeriesOrder ".
To hide the legend item for the empty series, you can use series.LegendItem.ConditionalFormatting property.
The attached report demonstrates the described approach.
The Series.DataPointStyle.LineWidth property can also be used to add the space between the series in combination with series.DataPointStyle.LineColor property set to "White" or "Transparent". The unwanted effect of this approach can be that it will add the space between the series and the Axis as well.