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

Line chart not displaying correctly in Chrome

4 Answers 96 Views
Charts
This is a migrated thread and some comments may be shown as answers.
Baldvin
Top achievements
Rank 1
Baldvin asked on 12 Nov 2015, 04:28 PM

Hi

I'm trying to use Kendo line chart. This is what I do:

I get data via ajax call. The data contains 9 objects like this: { Year: 'int', Month: 'int', Count: 'int', Date: 'string'}. These 9 objects represent data from 4 years so there's a lot of missing data.

Then, for the missing data, I loop through the response and fill in the missing objects and push them to an array. When that is done I have a perfect, sorted array of objects for these 4 years.

Now I create the dataSource where data: 'the array I created'.

This results in a perfect chart in Firefox and IE but not in Chrome. For example, the first year only contains value for June, the sixth month, where Count: 2. In Chrome, the chart displays that year with zeros all over except for May where the count is 2.

 Can you tell me what is going on?

4 Answers, 1 is accepted

Sort by
0
Iliana Nikolova
Telerik team
answered on 16 Nov 2015, 10:08 AM
Hi ,

If I am right, you are using a grouped dataSource? If this is the case, maybe manually sorting the dataSource should help. If this suggestion does not help, please provide a dojo example which demonstrates your exact setup - this way I would be able to check what exactly is going wrong and provide concrete recommendations.

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 16 Nov 2015, 10:56 AM

Hi Iliana and thanks for the reply.

Here is a dojo example of exactly what's happening. http://dojo.telerik.com/icatI/2

The years 2005 and 2007 are wrong but only in Chrome. Everything seems to be correct in Firefox and IE.

Can you provide me with a solution to this?

Thank you,
Baldvin

0
Baldvin
Top achievements
Rank 1
answered on 16 Nov 2015, 10:59 AM

Thanks for the reply.

Here is a dojo example of exactly what's going on: http://dojo.telerik.com/icatI/2

The years 2005 and 2007 are incorrect, they are switching months as you can see. But they are only incorrect in Chrome, everything seems to be ok in Firefox and IE.

Can you provide me with a solution to this?

Thanks,
Baldvin

0
Iliana Nikolova
Telerik team
answered on 18 Nov 2015, 09:21 AM
Hi Baldvin,

Thank you for the runnable example. The issue is caused by there is a different numbers of points in each of the groups. To achieve the expected result I could suggest the following options: 
- Use the Date field as series.categoryField (dojo);
- Add null values for the missing points and make the number of points in each group equal.

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 Nikolova
Telerik team
Baldvin
Top achievements
Rank 1
Share this question
or