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

[Solved] Strange result by missing a data

2 Answers 67 Views
Chart-
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Sam
Top achievements
Rank 1
Sam asked on 27 Jan 2015, 09:48 AM
Hello,

I've created a demo which contains two file types and two time stamps. A demo is located at http://jsfiddle.net/saes/f5py2bqt/1/
The link above works as expected.

By removing "Archive Files" in the first time stamp (TimeID = 1) I get a very strange result. It just contains the second time stamp BUT shows the first data for "Executable Files". A demo is located at http://jsfiddle.net/saes/f5py2bqt/

I wonder why the data that is shown in the graph is incorrect?
My next question is that, is there any way for Kendo to put 0 as "TotalUsage" for "Archive File" on time 1 (missed data in the data source) in order to prevent this faulty result? My dream result is located at http://jsfiddle.net/saes/f5py2bqt/2/
I'll definitely not have {"TotalUsage":0,"DataType":"Archive Files","ScanTime":"\/Date(1412785076000)\/","TimeID":1} from the server side nor from a Javascript function to find and put missing data.

Thank you in advance
Sam

2 Answers, 1 is accepted

Sort by
0
Accepted
T. Tsonev
Telerik team
answered on 29 Jan 2015, 08:02 AM
Hello,

In this case the category axis and the series are data bound independently.
Series points will be plotted in the order of their appearance.

You need to setup category binding to make sure that each point will be positioned on its respective category.
    series: [{
        field: "TotalUsage",
        categoryField: "ScanTime"
    }]
This is the updated snippetI hope this helps.

Regards,
T. Tsonev
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
Sam
Top achievements
Rank 1
answered on 29 Jan 2015, 09:21 AM
Hello Tsonev,

Great answer. It solved my problem.
Thank you very much.

Regards,
Sam
Tags
Chart-
Asked by
Sam
Top achievements
Rank 1
Answers by
T. Tsonev
Telerik team
Sam
Top achievements
Rank 1
Share this question
or