comvir commented on issue #11219: 【需求】图例(legend)需要能控制不触发brushSelected事件
URL: 
https://github.com/apache/incubator-echarts/issues/11219#issuecomment-532033216
 
 
   我有图表通过brushSelected事件和别的图表产生下钻联动,现在要求下钻仅通过框选触发,legend点击不要触发,legend仅影响图表本体。
   如果这个实现比较麻烦,那就采取折中方案,给事件的处理参数加上来源标识,标识由什么元素触发的
   api示范
   ```javascript
   chart.on('brushSelected', function (params) {
       if(params.eventTarget=="legend"){
             return;
       }else{
            //other something
       }
   });
   ```

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@echarts.apache.org
For additional commands, e-mail: commits-h...@echarts.apache.org

Reply via email to