You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@echarts.apache.org by GitBox <gi...@apache.org> on 2018/07/19 10:22:08 UTC

[GitHub] FionaFromChina edited a comment on issue #5994: 如何通过action触发toolbox里datazoom的区域缩放功能,而不是用鼠标点击

FionaFromChina edited a comment on issue #5994: 如何通过action触发toolbox里datazoom的区域缩放功能,而不是用鼠标点击
URL: https://github.com/apache/incubator-echarts/issues/5994#issuecomment-405919505
 
 
   遇到同样问题,查看源码其实现,见:https://github.com/apache/incubator-echarts/blob/master/src/component/toolbox/feature/DataZoom.js
   可通过dispatchAction实现。
   注:必须先设置了```toolbox.feature.dataZoom.show: true```,后面的dispatchAction才会生效。
   代码如下:
   ```js
   this.chart.dispatchAction({
           type: 'takeGlobalCursor',
           key: 'dataZoomSelect',
           dataZoomSelectActive: true // 允许缩放
         })
   ```
   项目要求始终允许缩放,且不显示icon,可以设置toolbox.itemSize=0实现

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@echarts.apache.org
For additional commands, e-mail: dev-help@echarts.apache.org