[Chartjs]-ChartJS 3.x How to place tick label inside graph?

1👍

Negative padding is how you do it. Are you sure you put padding to the right place?

scales: {
          xAxis: {
                type: 'time',
                
                ticks: {
                    display: true,
                    source: 'labels', // get ticks from given labels
                    z: 5, // make sure they are visible
                    padding: -50, // move then ontop of the chart
                },

Here is a JSFiddle.

You can read more here: Tick Configuration.

Leave a comment