yyccQQu edited a comment on issue #6236: 能否自定义legend的选中事件
URL: 
https://github.com/apache/incubator-echarts/issues/6236#issuecomment-495880750
 
 
   > 如何触发 ` legendselectchanged` 事件, 在我没有点击 `legend` 的情况下
   > 
   > -----分割线-------
   > 
   > ```
   > myChart.dispatchAction({
   >     type: 'legendToggleSelect',
   >     name: '上海 Top10'
   > });
   > ```
   
   这个事件需要点击legend元素才能触发,想要触发,可以手动dom.click....
   ```
   myChart.on('legendselectchanged', function (param) {
                   var selectedName = param.name; 
                   console.log(selectedName, "selectedName",param);
   })
   ```

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to