I'm using Chart.js v2.7.2 and want to remove the "label" field. Leaving it off returns "undefined" and the various options I've tried have done nothing. Anyone have new insight on this? Legend, title, etc all fail to remove it.
let thisChart = new Chart(gov_chart, {
type: 'horizontalBar',
data: {
label: 'I want to remove this',
labels: [data1, data2],
datasets: [{
backgroundColor: ['rgb(240,61,74)', 'rgb(0, 156, 255)'],
data: [data1.count, data2.count],
}]
},
options: {
scales: {
xAxes: [{
ticks: {
beginAtZero: true
}
}]
}
},
legend: {
display: false
},
title: {
display: false
},
tooltips: {
callbacks: {
label: function(tooltipItem) {
return tooltipItem.yLabel;
}
}
}
});