1👍
This is because you provide the X values as numbers while the default implementation of the X scale for a line chart is category, the category scale expects strings for its values.
So you can solve your problem in 2 ways, either change your X values from numbers to strings or change your X scale type to linear.
chartOptions: {
parsing: false,
scales:{
x:{
type: 'linear'
}
}
}
- [Chartjs]-How do I invert an y-axis using chart.js (v2.0-dev)
- [Chartjs]-ChartJS:align zeros on chart with multi axes
Source:stackexchange.com