As per subject I want to capture the click on the area not the line data point. Here is an example of the chart I want to capture the click on the area not the line data point of the chart: When I click on the line data points I get console logged the params object but not when I click on the area. Anyone knows how to achieve this with an echarts line chart?
As per subject I want to capture the click on the area not the line data point. Here is an example of the chart I want to capture the click on the area not the line data point of the chart: https://codesandbox.io/p/sandbox/ndzk7l When I click on the line data points I get console logged the params object but not when I click on the area. Anyone knows how to achieve this with an echarts line chart?
Share Improve this question asked Mar 25 at 12:02 eKelvineKelvin 9251 gold badge9 silver badges25 bronze badges 1 |1 Answer
Reset to default 1You need to set triggerLineEvent to true
.
Example
myChart.getZr().on('click', function(event) {...}
. found in docs – cmgchess Commented Mar 25 at 12:27