Reputation: 121
How do I get chart.js tooltip to work in the following way:
example : http://watchstocks.herokuapp.com/
I need the tooltip at any point on the graph, not just on a data point
Upvotes: 4
Views: 957
Reputation: 13004
You can achieve a similar result using the tootip position
property (the documentation includes an example of implementing a custom positioner if you prefer):
options: {
tooltips: {
position: 'nearest'
}
}
See the Chart.js samples page for a demo.
Examples with more elaborate interactions are also available.
Upvotes: 1