I want to check node is Expand or Collapse on click.
I checked click event but did not get any flag for Collapse or Expand
chart.on('click', e => {
// want to access here
})
I want to check node is Expand or Collapse on click.
I checked click event but did not get any flag for Collapse or Expand
chart.on('click', e => {
// want to access here
})
chart.on('click', func(params) {})
The params provide access to the collapsed flag.
I didn't have any luck using this outside of the scope of chart.setOption()
.
Since it's inside, you need to add "this" as the context for access-
chart.on('click', func(params){}, this)
Read more here- https://echarts.apache.org/en/api.html#echartsInstance.on