dataZoom click not working
See original GitHub issueVersion
5.2.1
Reproduction link
https://jsfiddle.net/tmtron/9y0xtqs7/11/
Steps to reproduce
click on the dataZoom
What is expected?
click event should be invoked
What is actually happening?
click event is not invoked
The example from the documentation: echartsInstance. on is also not working:
chart.on('click', 'dataZoom', function () {...});
- Other click events work: e.g. on the series, axis-labels (when
triggerEvent
is set totrue
) - but for dataZoom,
triggerEvent
does not exist - Maybe someone knows a temporary workaround?
- I thought about using echartsInstance.containPixel, but it seems, that this does also not support
dataZoom
- I thought about using echartsInstance.containPixel, but it seems, that this does also not support
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:14 (8 by maintainers)
Top Results From Across the Web
echarts dataZoom event does not return timestamp but only ...
I came across the same problem the following simple code works perfectly for me: myChart.on('dataZoom', function() { var option = myChart.
Read more >Need Help DataZoom option not working · Issue #7049 - GitHub
One-line summary [问题简述] I can not figure out how to get data zoom to work with my chart, the chart and data show...
Read more >See How It Works - Datazoom
Datazoom users can easily create new datapipes, using an intuitive drag-and-drop interface, and configure them in just a few clicks.
Read more >Event and Action - Concepts - Handbook - Apache ECharts
There are two kinds of event in ECharts, one happened when the user clicks the mouse or hover the elements in charts, the...
Read more >Datazoom | New Relic Instant Observability
The Datazoom quickstart will help you gain insights into your viewers streaming video experience. ... Click the install button. Install the quickstart to ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Sorry for not merging the PR from @susiwen8 . Didn’t notice it’s a mistake from the doc.
We need to think through these questions carefully before we providing such an event.
dataZoom
action.In the case of a click event for the data-zoom slider, there is anyway only very little info that you can send along:
this is maybe not required, when you can also ask the chart-instance fot he currently selected range and maybe find out if the click-point is in the selected zoom range, or outside
A click event is something very generic and for sure not tied to a single use-case.
There are many more things that this can be used for:
e.g. we have a config mode, where the users can configure/move/resize the charts. in this mode, a click on the zoom slider could bring up a config dialog, where they can configure the slider: e.g.
Another use-case that you have mentioned is the click-moves-the-zoom-window feature.
This could easily be implemented by users of the library via this click event.
Even better; we could implement our own strategy: e.g. maybe we want that clicking should not move the zoom window, but expand or shrink the window to the click-point
Well, I also thought that at first. But in the meanwhile I have changed my mind and think that our users are right.
When you use the zoom slider handles to select a suitable range, then you don’t want to move the mouse away, to a button or menu - you want to immediately invoke the load-action by a simple click.