javascriptlinechartechartsapache-echarts

Echarts how to capture click on areaStyle of a stacked 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 Example of the AreaStyle 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?


Solution

  • You need to set triggerLineEvent to true.

    Example