Closed chandruchiku closed 4 years ago
Hey @chandruchiku! I think that's a really good idea.
Here's a fiddle of how that can be achieved:
https://jsfiddle.net/nLt0m97s/5/
The approach uses an additional plugin for showing the tooltip that I found in this Chart.js issue. However, I think it would be useful to incorporate this feature in the main plugin (in order to be easier to use, and to avoid globals). I will think about a solution, but would also be happy about pull requests 😄
Best Christoph
Alright, I just made a new release! All examples are updated to use the new feature (=> showing the tooltip while dragging) https://chrispahm.github.io/chartjs-plugin-dragdata/
You can enable the setting by adding
dragOptions: {
showTooltip: true
},
to the Chart.options
. I also recommend to add some dragDataRound
value.
Best Christoph
I was working on a PR myself. But you got that done already. Thanks :)
Ok sorry for that! I just thought the feature would help my own projects as well so I added it right away! Thanks again for bringing this up 👍
It would be really helpful for the end user if we can show the tooltip while the point is being dragged so the user knows when to release.