How can echart directly use js code to trigger click events bound with on

click method is bound with on in echart

then I want to use js code to trigger the click method. There is no corresponding explanation for the official api. I want to know if there is a way to ask the Great God for advice

Mar.28,2021

bind event handlers.

There are two types of events in

ECharts, one is a mouse event, which is triggered when a mouse clicks on a graph, and the other is an event triggered after a call to dispatchAction. Each action has a corresponding event, as detailed in the documentation for action and events.

< hr >

these are the original words of the official document. I personally feel that I have misunderstood it. Now that you've bound the click event. Although your event is in response to a mouse click, not triggered actively.

of course, if you want to trigger actively, call dispatchAction. Specific modification method:
1. This is how you should have written
yourMapInstance.on ('click', function (params) {

)
doSomething(params);

});

  1. optionally enter the event you want to trigger to match the other parameters of action, in dispatchAction.

dispatchAction ({

)
type: 'highlight'//action

})

  1. reference:

http://echarts.baidu.com/api.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3e6b4-2bb8c.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3e6b4-2bb8c.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?