0👍
For the text label issue, you’ll need to change your custom formatter to return the dataset label instead:
formatter: function(value, context) {
return context.chart.data.datasets[context.dataIndex].label;
}
The datalabels plugin does not support multiple labels per bar to the best of my knowledge. You’ll need to manually draw one of the labels yourself following something like this SO answer: How to show data values or index labels in ChartJs (Latest Version).
- Chartjs-Chart tooltip should show the consolidated information of a single bar in double bar chart
- Chartjs-Why am I getting the wrong Background Color when applying multiple colors to data points?
Source:stackexchange.com