Disable category grouping in ChartView

1 Answer 9 Views
ChartView
Lior
Top achievements
Rank 1
Lior asked on 07 Dec 2021, 02:17 PM

Is there a way to disable the grouping of categories?

For example, I'm using a bar series and my category values are A, B, B, B, C which are being grouped and shown as A, B, C bars. I would like to display the original 5 separate bars, without grouping.

1 Answer, 1 is accepted

Sort by
0
Martin Ivanov
Telerik team
answered on 09 Dec 2021, 12:14 PM

Hello Lior,

This behavior cannot be disabled. However, you can achieve your requirement with some modifications in your model of the data points. Basically, you can have two properties - one for the original category and another to provide an unique category value. For example, you can have category "B" and unique category "B1" (or something like this), for the second object with the value "B", you can have the unique category set to "B2". Then you can bind the unique category property to the CategoryBinding of the series. To customize the labels on the axis so they show "B" instead of (for example) "B1", you can use a custom LabelTemplate.

I hope that helps.

Regards,
Martin Ivanov
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Tags
ChartView
Asked by
Lior
Top achievements
Rank 1
Answers by
Martin Ivanov
Telerik team
Share this question
or