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

Can we set different width in each of BarChart series

2 Answers 90 Views
Chart
This is a migrated thread and some comments may be shown as answers.
Andy
Top achievements
Rank 1
Andy asked on 08 Feb 2012, 12:12 PM
Dear Telerik Team,

We are currently trying to display a bar chart which has different width for its series by using radchart (see attachment) 
Is it possible? 

Thanks,
Andy

2 Answers, 1 is accepted

Sort by
0
Andy
Top achievements
Rank 1
answered on 09 Feb 2012, 11:15 AM
I found the way to have different width for each bar series :

                radChart1.SeriesMappings[0].SeriesDefinition.ItemStyle = new Style();
                radChart1.SeriesMappings[0].SeriesDefinition.ItemStyle.Setters.Add(new Setter(Shape.WidthProperty, Double.Parse("50")));
                radChart1.SeriesMappings[1].SeriesDefinition.ItemStyle = new Style();
                radChart1.SeriesMappings[1].SeriesDefinition.ItemStyle.Setters.Add(new Setter(Shape.WidthProperty, Double.Parse("80")));

But the result is not right. there is a gap between each series. (attached screenshot)
Is there any way to make it stacked?

Thanks,
Andy 
0
Nikolay
Telerik team
answered on 13 Feb 2012, 08:25 AM
Hi Andy,

Unfortunately such a feature is not supported by the current version of the control as by definition each bar in a Bar series should be of equal width. The gaps appear because the space for each bar along the X axis is calculated as per the widest one, which is also why the 3rd and 4th bars slightly overlap as well.

All the best,
Nikolay
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
Tags
Chart
Asked by
Andy
Top achievements
Rank 1
Answers by
Andy
Top achievements
Rank 1
Nikolay
Telerik team
Share this question
or