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

Chart not displaying all category axis values

1 Answer 460 Views
Charts
This is a migrated thread and some comments may be shown as answers.
Vaughn Myers
Top achievements
Rank 1
Vaughn Myers asked on 15 Jul 2013, 01:36 PM
My JSON object returns data similar to this: 
Count   Group    Num    year
16         Group1     1         2013
15         Group1     2         2013
21         Group1     3         2013
34         Group1     4         2013
12         Group1     5         2013
30         Group2     1         2013
23         Group2     2         2013
 
In the area chart I group by field [Group]. When it's rendered in the chart, the category (horizontal) axis (Field [Num]) only displays values 1 & 2, since Group2 only has [Num] 1 & 2. What would I need to do to display the [Num] from Group1? Group 1 will will always have 5 [Num].
 
A fix is to add 3 more rows to 'fill' what's missing from Group2 (3, 4, 5), but that's not really a solution.
 
Thanks.

1 Answer, 1 is accepted

Sort by
0
Iliana Dyankova
Telerik team
answered on 16 Jul 2013, 01:31 PM
Hi Vaughn,

The observed behavior is due to different number of data points. Please keep in mind by design categoryAxis.labels in grouped chart are created depending on the first group. Also the categorical charts (area, line, bar, column) require a matching set of data points - the value can be null but the record needs to be presented in the data (this is because series.data is a simple array). Hence in order to get the expected result you should add the missing points into the Group2. We realize this is not the most perfect solution and will do our best to provide a better approach for future releases. 

Regards,
Iliana Nikolova
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
Charts
Asked by
Vaughn Myers
Top achievements
Rank 1
Answers by
Iliana Dyankova
Telerik team
Share this question
or