const config = {
type: 'line',
data,
options: {
plugins: {
legend: {
// This removes both text and label
display: false
},
}
}
};
new Chart(document.getElementById('my-chart'), config);
I just want to remove the label not the text.
I tried setting the color of the label to transparent as so:
datasets: [{
label: 'My Chart',
backgroundColor: 'transparent',
borderColor: 'transparent',
data: numbers,
}]
It removes somehow the label, but the text is not centered.
What options should be set in the config object to remove the label and the text to be maintained and centered?