This is a migrated thread and some comments may be shown as answers.

offset series

1 Answer 29 Views
Chart
This is a migrated thread and some comments may be shown as answers.
Paul Lewis
Top achievements
Rank 1
Paul Lewis asked on 16 May 2011, 08:00 PM
Hi is there a way to do offset series like the attached picture?

1 Answer, 1 is accepted

Sort by
0
Giuseppe
Telerik team
answered on 18 May 2011, 12:08 PM
Hi Paul Lewis,

You can achieve the desired effect by setting the ChartArea.ItemOverlapPercent property to 50:
var series = new DataSeries();
series.Definition = new BarSeriesDefinition() { ShowItemLabels = false };
series.Add(new DataPoint(10));
series.Add(new DataPoint(20));
series.Add(new DataPoint(30));
series.Add(new DataPoint(40));
 
var series2 = new DataSeries();
series2.Definition = new BarSeriesDefinition() { ShowItemLabels = false };
series2.Add(new DataPoint(2));
series2.Add(new DataPoint(5));
series2.Add(new DataPoint(10));
series2.Add(new DataPoint(20));
 
RadChart1.DefaultView.ChartArea.ItemOverlapPercent = 50;
RadChart1.DefaultView.ChartArea.DataSeries.Add(series);
RadChart1.DefaultView.ChartArea.DataSeries.Add(series2);

Hope this helps.


Greetings,
Giuseppe
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
Chart
Asked by
Paul Lewis
Top achievements
Rank 1
Answers by
Giuseppe
Telerik team
Share this question
or