Expected & Current Behavior
Using the tooltip code from custom-line.html should give me a working example for one or more charts per page. That’s currently not the case, it only works with one chart per page.
Possible Solution
See: https://github.com/TheMaaarc/Chart.js/commit/ec69a66b8410a7a6a8d5288871cdc7ddacb960e3
With that code the tooltip will be generated for each individual chart.
I can make a Pull request if you like the solution.
First implement a custom function according to the manual
https://www.chartjs.org/docs/latest/configuration/tooltip.html#external-custom-tooltips
After the following line:
var tooltipEl = document.getElementById(‘chartjs-tooltip’);
Enter the following script:
if (tooltipEl) { tooltipEl.parentNode.removeChild(tooltipEl); }
In short … I always destroy the tooltip before rebuilding it again.