bihire boris
bihire boris

Reputation: 1662

How to increase the spacing between labels and the chart

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",   
                        },
                        
                    }],
}

enter image description here

Upvotes: 0

Views: 174

Answers (1)

Bruno Monteiro
Bruno Monteiro

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

Related Questions