Chartjs-Angular CharJS option tooltip label did not work

0👍

If you log data.tooltips you will see its undefined, and since you try to read things from it it will throw an error and not draw anything.

Looking at the documentation I think you have to replace data.tooltips with data.datasets. (https://www.chartjs.org/docs/latest/configuration/tooltip.html#label-callback)

The best thing you can do is just log both tooltipItem and data and go through the objects to see how you can combine them to get to the point you need and then insert that in your callback.

Leave a comment