Chartjs-How to remove the coloured rectangle(dataset label) in chartJS

2👍

It should be this, if it doesnt work you aren’t on version 2 or something else is wrong.

var ctx = document.getElementById("myChart").getContext('2d');
var myChart = new Chart(ctx, {
    type: 'bar',
    data: chartData1,
    options: {
        legend: {
            display: false,
        },
        scales: {
            yAxes: [{
                ticks: {
                    beginAtZero: true
                }
            }]
        }
    }
});

Leave a comment