Raj Chanpura
Raj Chanpura

Reputation: 19

Deselect all the series legends in Apache Echarts

we can manually deselect specific series in Echarts using

legend:{
selected: { 'Series1': false, 'Series2': false }
}

However, I have more than 200 series in Echart, so is there any way I can deselect all dynamically

Upvotes: 0

Views: 3949

Answers (1)

Sergey Fedorov
Sergey Fedorov

Reputation: 4430

Use the API method unselect:

chartInstance.dispatchAction({ type: 'unselect', seriesIndex: 0 })

Upvotes: 0

Related Questions