[Chartjs]-How to Remove axis Lines from chart in chart js

1👍

You can find axes config options currently here: Axes – Chart.js Documentation

Axes config options has a global field display with the following description:

If set to false the axis is hidden from view. Overrides gridLines.display, scaleLabel.display, and ticks.display.

Here is how I have implemented it:

public chartOptions = {
    scales: {
        xAxes: [{
            display: false,
        }],
        yAxes: [{
            display: false,
        }]
    }
};

0👍

Just change border to false.

const config = 
{
    type: 'line',
    data,
    options: {
        scales:{
                y: {
                    beginAtZero: false,
                    border:{
                        display:false
                    }
                },
                x: {
                    beginAtZero: false,
                    border:{
                        display:false
                    }
                }   
            }
        }   
    }
}   

Leave a comment