if (rawValue === null || typeof(rawValue) === 'undefined') {
return NaN;
}
- // isNaN(object) returns true, so make sure NaN is checking for a number
- if (typeof(rawValue) === 'number' && isNaN(rawValue)) {
+ // isNaN(object) returns true, so make sure NaN is checking for a number; Discard Infinite values
+ if (typeof(rawValue) === 'number' && !isFinite(rawValue)) {
return NaN;
}
// If it is in fact an object, dive in one more level
data: {
datasets: [{
yAxisID: 'yScale0',
- data: [null, 90, NaN, undefined, 45, 30]
+ data: [null, 90, NaN, undefined, 45, 30, Infinity, -Infinity]
}],
- labels: ['a', 'b', 'c', 'd', 'e', 'f']
+ labels: ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h']
},
options: {
scales: {
data: [undefined, 10, null, 5, 5000, NaN, 78, 450]
}, {
yAxisID: 'yScale0',
- data: [undefined, 28, null, 1000, 500, NaN, 50, 42]
+ data: [undefined, 28, null, 1000, 500, NaN, 50, 42, Infinity, -Infinity]
}, {
yAxisID: 'yScale1',
data: [undefined, 30, null, 9400, 0, NaN, 54, 836]
yAxisID: 'yScale1',
data: [undefined, 0, null, 800, 9, NaN, 894, 21]
}],
- labels: ['a', 'b', 'c', 'd', 'e', 'f' ,'g']
+ labels: ['a', 'b', 'c', 'd', 'e', 'f' ,'g', 'h', 'i']
},
options: {
scales: {
type: 'radar',
data: {
datasets: [{
- data: [50, 60, NaN, 70, null, undefined]
+ data: [50, 60, NaN, 70, null, undefined, Infinity, -Infinity]
}],
- labels: ['lablel1', 'label2', 'label3', 'label4', 'label5', 'label6']
+ labels: ['lablel1', 'label2', 'label3', 'label4', 'label5', 'label6', 'label7', 'label8']
},
options: {
scales: {}