Open
Description
If a formatter
is provided, this has effect on the labels that appear on the chart directly, but it seems not on the tooltip labels. How can I make sure that the tooltips also show the correct label? Is this a feature of datalabels? Or would the expectation be that I have to also override the tooltip formatter directly?
As an example, I have a formatter function that changes the labels to %:
formatter: (value, ctx) => {
let sum = 0;
let dataArr = ctx.chart.data.datasets[0].data;
dataArr.map(data => {
sum += data;
});
let percentage = (value*100 / sum).toFixed(2)+"%";
return percentage;
},
I would like for this same label to appear on the tooltip hover as well, but it seems it only applies to the chart as mentioned.
Let me know if you need any further details. thank you.
Metadata
Metadata
Assignees
Labels
No labels