4.4.0
Use legend to filter out selected sector from pie chart - next sector becomes selected
Right behaviour would be that selected sector just to became hidden and next sector remained unselected.
When filtering out selected sector from pie chart, next sector becomes selected instead
If it is not a bug, can anyone tell me how to avoid this behaviour?
Hi! We've received your issue and please be patient to get responded. 🎉
The average response time is expected to be within one day for weekdays.
In the meanwhile, please make sure that you have posted enough image to demo your request. You may also check out the API and chart option to get the answer.
If you don't get helped for a long time (over a week) or have an urgent question to ask, you may also send an email to [email protected]. Please attach the issue link if it's a technical questions.
If you are interested in the project, you may also subscribe our mail list.
Have a nice day! 🍵
This is the behaviour right now:


@mariamtsartsidze Can you provide a demo? https://jsfiddle.net/ovilia/n6xc4df3/
I cannot reproduce from https://echarts.apache.org/examples/en/editor.html?c=pie-simple
@Ovilia, the demo provided by you does not support selection for pie chart.
Use this demo:
https://www.echartsjs.com/examples/en/editor.html?c=pie-rich-text
Select a sector and then filter out that selected sector using the legend.
o, I see. You mean, after the previous selected item has been removed, the selected state would be applied to next slice.. It seems a bug ? @Ovilia .
I guess the selected state is bind to index of item in data array, not item ID, which cause this to happen.
Yes. This is a bug. I think @alex2wong 's guess is promising. Do you wish to make a pull request? Thanks!
@Ovilia : I am working on this issue and got a question:
Even I set all the legends in selectedMap to be false, there is still one pie chart that gets selected. I doubt it might not be a bug in legend, but in pie chart.

@daming-lu that's it ! the data name should be passed into seriesModal.isSelected to get the selected state instead of idx. idx is the newIdx of data after piePiece.updateData. Thanks ~
Most helpful comment
o, I see. You mean, after the previous selected item has been removed, the selected state would be applied to next slice.. It seems a bug ? @Ovilia .
I guess the selected state is bind to index of item in data array, not item ID, which cause this to happen.