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

BarSeries width differes when combining Clustered and Stacked combine modes

2 Answers 131 Views
ChartView
This is a migrated thread and some comments may be shown as answers.
Mitchell
Top achievements
Rank 1
Mitchell asked on 22 Oct 2014, 04:31 PM
In the first attached screenshot, I have 6 BarSeries (all with the same values for the data).  5 series are stacked in 2 groups (using the stack key). The sixth series has a combine mode of Clustered.   You can see where the Clustered series is much wider than the stacked series.  In the second screenshot, I have 3 BarSeries. 2 are Clustered and 1 is Stacked. In this case, the Stacked BarSeries is the one that is wider than the other series.  I am using a point template for BarSeries, but it is not doing anything with the width (It's a Border).  Is the width difference purposeful, or is this a bug?

2 Answers, 1 is accepted

Sort by
0
Accepted
Martin Ivanov
Telerik team
answered on 27 Oct 2014, 01:22 PM
Hi Mitchell,

The reported behavior is caused by the fact that the chart is allocating equal space in each category slot (the distance between two adjacent ticks on the axis) for each type of bar series. For example, when you define stacked and clustered series the category slot will be split in half and one part will be used for the stacked series and the other for the clustered ones located in the slot.

In your case you have 2 clustered series and 1 stacked, which means the clustered series will occupy the left side and the stacked series will occupy the right side. For example, if the entire slot's width is 100 pixels, the clustered series will use 50px (so 25 pixels per bar). On the other hand the stacked series will use the 50px (so 50 pixels per bar).

Please let me know if you have any further questions.

Regards,
Martin
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Mitchell
Top achievements
Rank 1
answered on 27 Oct 2014, 02:11 PM
That makes sense. I can achieve a clustered look where bars are of equal width by simply setting series I previously had clustered to a group all by themselves (so a "stack" of 1).  Thanks for the explanation!
Tags
ChartView
Asked by
Mitchell
Top achievements
Rank 1
Answers by
Martin Ivanov
Telerik team
Mitchell
Top achievements
Rank 1
Share this question
or