1👍
Depending on your chartjs config, you just have to set the padding
of the chart.js config.
Info: Offset’s in the canvas cannot be altered with css, since the chart is "drawn" on it.
(details: in the documentation)
For a example:
const config = {
type: 'line',
data: data,
options: {
...
plugins: {
....
},
scales:{
x: {
ticks:{ padding:0 }
}
},
}
};
- Chartjs-Set scroll on bar chart in chartjs
- Chartjs-Chart.js:4 Uncaught ReferenceError: require is not defined in ionic 2
Source:stackexchange.com