Home  >  Q&A  >  body text

EchartJS - select legend and show only selected items

I have: Enter image description here

When I want to click on a legend, I want this: enter image description here But I have this: Enter image description here

My question is: is this possible? I don't know if it's clear enough, but I'll answer the question if needed.

Translate the above content into Chinese, retain the html code, and do not add new content
P粉063862561P粉063862561402 days ago440

reply all(1)I'll reply

  • P粉194541072

    P粉1945410722023-09-14 09:35:17

    You can listen to the legendselectchanged event and use dispatchAction to perform actions on the legend.

    I'm not sure about the exact behavior you want. I made a small Pie with borderRadius