0👍
It looks like chart.piecelabel.js
has updated their syntax. Their latest versions no longer use pieceLabel
but a plugin: labels:
stanza.
options: {
plugins: {
labels: {
render: function (args) {
const label = args.label,
value = args.value;
return label + '\n' + value;
}
}
}
}
Fiddle here: https://jsfiddle.net/d047bqzo/5/
- Chartjs-Chart.js display even intervals between two dates and adding label to y axes
- Chartjs-Chart.js line from annotations plugin is not appearing
Source:stackexchange.com