Chartjs-Move chart x axis label and borders

2👍

Change your config object like that to remove plot borders:
https://jsfiddle.net/3ko21xaq/

...
options: {
    ...
    scales: {
        yAxes: [{
            gridLines: {
                drawTicks: false,
                display: false
            },
            ...
        }],
        xAxes: [{
            gridLines: {
                drawTicks: false,
                display: false
            },
            ...
        }]
    },
},

To set x-axis to the top may do the trick this options: https://jsfiddle.net/d3s7x2af/

xAxes: [{
    ticks: {
        display: true,
        position: "top", // Not found in documentation((
        mirror: true,
        padding: -400, // Set the height of the plot
    },
}]

More about ticks configuration -> https://www.chartjs.org/docs/latest/axes/cartesian/#tick-configuration

Leave a comment