Reputation: 1662
How can we increase the spacing between the x-axis and the chart in chartjs
so far
options: {
responsive: true,
maintainAspectRatio: false,
scales: {
xAxes: [
{
ticks: { display: true },
gridLines: {
display: true,
drawBorder: false,
drawTicks: false,
// color: "#fff",
},
}],
}
Upvotes: 0
Views: 174
Reputation: 4519
Just apply the padding
attribute available in the axes styling:
https://www.chartjs.org/docs/latest/axes/styling.html#tick-configuration
Upvotes: 1