var myChart = new Chart(ctx, {
type: 'line',
data: data,
options: {
legend: {
display: false //This will do the task
}
}
});
// It's now in plugins options
// See at https://www.chartjs.org/docs/latest/configuration/legend.html
const myChart = new Chart(ctx, {
type: 'line',
data: data,
options: {
plugins: {
legend: {
display: false
}
}
}
})