unitrongroup-ir commented on issue #21367:
URL: https://github.com/apache/echarts/issues/21367#issuecomment-6024706082
+1, we needed the same thing (Plotly-like drag zoom with our own zoom
buttons outside the chart).
In case it helps someone until this is there: we keep the toolbox but make
it invisible with `itemSize: 0`. With `show: false` the feature isn't rendered
at all and dragging does nothing. Then we switch the select mode on ourselves:
```js
toolbox: {
show: true,
itemSize: 0,
showTitle: false,
feature: { dataZoom: { yAxisIndex: 'none', filterMode: 'none' } }
}
```
```js
chart.dispatchAction({ type: 'takeGlobalCursor', key: 'dataZoomSelect',
dataZoomSelectActive: true });
```
After `setOption(option, { notMerge: true })` the select mode is off again,
so we dispatch it after every update. Dispatch it with `dataZoomSelectActive:
false` before the `setOption` too, otherwise you run into #21661.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]