mirror of
https://github.com/chartjs/Chart.js.git
synced 2024-10-06 12:19:08 +02:00
851861e9cc
* Fix category scale invalid data handling * Fix NaN
42 lines
716 B
JavaScript
42 lines
716 B
JavaScript
module.exports = {
|
|
config: {
|
|
type: 'line',
|
|
data: {
|
|
labels: ['a', 'b', 'c', 'd', 'e', 'f', 'g'],
|
|
datasets: [{
|
|
data: [
|
|
{x: 'a', y: 1},
|
|
{x: null, y: 1},
|
|
{x: 2, y: 1},
|
|
{x: undefined, y: 1},
|
|
{x: 4, y: 1},
|
|
{x: NaN, y: 1},
|
|
{x: 6, y: 1}
|
|
],
|
|
backgroundColor: 'red',
|
|
borderColor: 'red',
|
|
borderWidth: 5
|
|
}]
|
|
},
|
|
options: {
|
|
scales: {
|
|
y: {
|
|
display: false
|
|
},
|
|
x: {
|
|
grid: {
|
|
display: false
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
options: {
|
|
spriteText: true,
|
|
canvas: {
|
|
width: 256,
|
|
height: 256
|
|
}
|
|
}
|
|
};
|