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

Charting dated data with missing values

3 Answers 489 Views
Charts
This is a migrated thread and some comments may be shown as answers.
Baldvin
Top achievements
Rank 1
Baldvin asked on 29 Oct 2015, 04:39 PM

Hi

I am charting data values (value axis) that are to be presented by Year (series) and Month (category axis).

I'm trying to create a chart that fills in missing values with zeros. My problem is that my data is based on dates and some years are missing the first months, other years are missing the last months and some years are missing months in between. I'm not sure how to make the chart fill correctly in to these missing values. In the following fiddle you can see that all series start at January but for example, the year 2014 only has months 5,6,9.

Can you explain if Kendo Chart is able to fill in or ignore these gaps and bind the months to the correct category axis.

http://jsfiddle.net/jokullie/4m977twr/

Thank you,
Baldvin

3 Answers, 1 is accepted

Sort by
0
Iliana Dyankova
Telerik team
answered on 02 Nov 2015, 09:52 AM
Hi ,

When there is a different number of points in each of the groups you should use series.categoryField instead of categoryAxis.categories. Take a look at this updated example and let me know if this fits the current requirements.

Regards,
Iliana Nikolova
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
Baldvin
Top achievements
Rank 1
answered on 03 Nov 2015, 09:01 AM

Thanks a lot for your response. I am very sorry but somehow my fiddle didn't save like I thought it did. Here's the real problem and when I use the series.categoryField it is still missing the months that no serie has. So if none of the series contain data for July, the 7th month will be missing.

 http://dojo.telerik.com/uKEfa

Thank you,
Baldvin

0
Accepted
Iliana Dyankova
Telerik team
answered on 05 Nov 2015, 07:51 AM
Hi ,

Thank you for the details. This scenario is not supported when the default categoryAxis.type is used - in order to get the expected behaviour you should use a categoryAxis with type "date". For your convenience here is the modified dojo.

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
Baldvin
Top achievements
Rank 1
Answers by
Iliana Dyankova
Telerik team
Baldvin
Top achievements
Rank 1
Share this question
or