Chart.js
Chart.js copied to clipboard
Show multiple tooltips
Expected behavior
I'm trying to display multiple tooltips at once. I do not want to use chartjs-plugin-datalabels because I need to have custom labels and this is not possible with chartjs-plugin-datalabels.
Current behavior
I've came accross this issue, where someone is trying to do exactly this: #7672 It's an old issue, and it's been closed by op without good answer, so I hope it's ok to open a new issue.
I tried to make a new plugin as explained to re-use the tooltip component, and render one Tooltip per data. And I'm stuck. The tooltips are created, but nothing shows in graph. When I log the tooltips, x, y, width and height are NaN.
I forked the example here: https://codepen.io/ariu/pen/ZEMjGLJ?editors=0010
I'm using 3.9.1 in this codepen, but I also tryied 4.2.1 locally.
Reproducible sample
https://codepen.io/ariu/pen/ZEMjGLJ?editors=0010
Optional extra steps/info to reproduce
No response
Possible solution
No response
Context
I'm trying to reproduce exactly this:
chart.js version
4.2.1
Browser name and version
No response
Link to your project
No response