Add chart double click event, and perhaps default it to "Home"
See original GitHub issueIs your feature request related to a problem? Please describe.
No problem.
Describe the solution you’d like
I would love to have an easier access to the “Home” (reset zoom) feature, that does not require the toolbar to be visible. Many charting libraries I have used, use either the double click event for it, or some use the “mouse drag from right to left” to do it (as opposed to dragging from left to right to left to zoom).
I was looking at the events section, and noticed there is no such event. So, even if the collaborators of this repository do not agree to implementing a “double click to zoom out”, perhaps expose a double click event for us?
So we could do:
chart: {
toolbar: {
autoSelected: 'zoom'
},
events: {
doubleClick: function(event, chartContext, config) {
chart.resetSeries();
}
}
},
Describe alternatives you’ve considered
I have tried using the click
event for it, but it will not work, since it immediately triggered after zooming.
Additional context
None.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:2
- Comments:9 (3 by maintainers)
Top GitHub Comments
@DannyBen , you can use this code
Reset zoom by double click code example on CodePen.io
thanks @illoin - seems like a reasonable solution.