Data
// [Date, number]
const data = [
[new Date('2020-01-01'), 42],
[new Date('2020-01-02'), 87],
[new Date('2020-01-03'), 27],
[new Date('2020-01-04'), 13],
[new Date('2020-01-05'), 7],
[new Date('2020-01-06'), 33],
[new Date('2020-01-07'), 66],
];
Scale Option
scales: {
xAxes: [
{
type: 'time',
},
],
}
It only works when I remove the type: 'time' option from the xAxis. (same data)
Otherwise with time type, the line is just not drawing without errors.
Data
Scale Option
It only works when I remove the
type: 'time'option from the xAxis. (same data)Otherwise with time type, the line is just not drawing without errors.