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

Problem charting NaN

3 Answers 283 Views
Charts
This is a migrated thread and some comments may be shown as answers.
Karl Mikesell
Top achievements
Rank 1
Karl Mikesell asked on 20 Nov 2013, 01:25 PM
Is it possible to not chart values that are Not A Number?  NaN shows in chart as large value, sample attached.

3 Answers, 1 is accepted

Sort by
0
Alexander Popov
Telerik team
answered on 22 Nov 2013, 10:38 AM
Hello Karl,

I would recommend you to filter those using the dataSource.filter option, for example:  
filter:  { field: "Value", operator: "gt", value: 0 } //show only items with value greater than 0

Regards,
Alexander Popov
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Karl Mikesell
Top achievements
Rank 1
answered on 22 Nov 2013, 04:30 PM
How to apply the filter to the arrayOfMightBeNumbers, will this then require missingValues: "gap", so no marker appears?

c.kendoChart({
series: [{
...
}, {
type: "line",
markers: {
visable: true,
size: 15,
color: "#ffff33",
type: "triangle"
},
dashType: "dot",
name: "Days",
opacity: 0.0,
axis: "days",
data: arrayOfMightBeNumbers    
}],


0
Accepted
Alexander Popov
Telerik team
answered on 26 Nov 2013, 01:09 PM
Hi Karl,

Applying a filter is done by using a DataSource, which is demonstrated here. The missingValues option works only for null values, so in this case it won't make any difference unless you iterate over the array of data and replace all NaN values with null.

Regards,
Alexander Popov
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
Karl Mikesell
Top achievements
Rank 1
Answers by
Alexander Popov
Telerik team
Karl Mikesell
Top achievements
Rank 1
Share this question
or