0👍
You can define y.ticks.padding
as follows:
y: {
ticks: {
...
padding: -50
}
}
Together with this, you also need to define layout.padding.left
to make sure, the tick labels still appear on the canvas
.
options: {
layout: {
padding: {
left: 100
}
}
...
Obviously you need to adapt the numbers to your needs.
For further information, please consult Tick Configuration and Padding from the Chart.js documentation.
- Chartjs-Execute 'onscroll' function only once
- Chartjs-How to create a scatter plot where x-axis represents a day by hours with datetime object? chartJS
Source:stackexchange.com