apache / echarts

Apache ECharts is a powerful, interactive charting and data visualization library for browser
https://echarts.apache.org
Apache License 2.0
60.57k stars 19.61k forks source link

Map selections to stay visible when data changes #17772

Open helgasoft opened 2 years ago

helgasoft commented 2 years ago

Version

5.4.0

Link to Minimal Reproduction

https://echarts.apache.org/examples/en/editor.html?c=map-usa&code=CYQwLiCMC8AEDaAoWsDesB2IC2BTAXLAOQCCANiAEY4hEA0sAbiGQK4GwAsAHAEy-wAvnWRpMODqQoBnANa0GzNh0gB2AMyQhIlOix5CpAE4BLAF4B7LPSYt2hAGwBWJ-u2i9EwySPyM0kGkbJXtYXgBOTnD3XXEDYgBhFhMAMwsjDBMFW2VCbgAGTi1hDzjJBIsydJBgC2C7DidIblV3AF0AbkRQCF44JFj9SQA5XGZQetyuPgESwa9ickD5SdC1TRixIe9TS2tFBscXNzmtheM_AKCDqYiozc94oiSyVPTM7JCOAqKHssMKlUjDU6jdQk0Wu0utgAJ4JAAWICMYAAdNJ4RYAO4AGQsNRMGAA5gAKACUXQAJCjCbgwMSAEoAeUZABUAPoABRILIAErAANTEAD0PRAQsC0lpQppFiFAFUAMokFEAK2kVhsKVYGAAxmATFZYMTWAEAFLqjCktCiWEIpGo-EmYC4XH4olkrooXA6xHI6Qooy4QkmaRgXBGACyIAADsSiIqSDYTSBzVYGKhRCglnIQIR0LAyLgUmBCABaSCaBhgCzRwi8JwMTFOsDwwiQJybQTk0TVwlkOBgIzsT2wGv6w1wDMoFAy_DoIx47CEQfsBiwbAxwwJmyWCxLsI6acoSWFvW4YARizOwzYVhkfXRws2TPTk_ektoExh7AKsAwwt5jqlTpPgRAbjSGAQDYlDpM6RiAiBRCBsARCCKcKDCLAL6MCGrAsFGtbWkeKCFsWhimIS8JgDY2AEoQ-RrhuAAeeT5Gxh5HgS9IgESHDoEBQKEPAxDITYRAwrgZBVJiRCwG0QgvphL6SqYuDSEJL6xH-0aSBu0b0Jp04Ljgy5DrgDAygAkhgzosQxsBvmeF5Xrpd4Pk-HHEaKhCipAhmCC-bSiIII62r6qKSmAjLRuOGDEmOBqWqFcLhSiwAhtG4A-iQeqJcSqDaZIjnUQwhnEQ54YmGp1m2fRDCijVuAsQgvB0E48ldiO5VHqIkXWWGRhKMSWq6rFRpWlO05jrAcBhfa1K0tFsUei-vZkDNsAAIRrV1o4xWilVqfA-RtGl4AgBta2wAA_LAvmwD5528Ltc3IgdUUxXlY7dhhDBOGx-Tdp1QA

Steps to Reproduce

  1. open the example link
  2. states of Colorado and Arizona are selected, showing in magenta color
  3. after 5 secs they are no longer highlighted

Current Behavior

Map selection is not showing after data change. It could be seen again by manually hovering the map (but user shouldn't be asked to do that).

Expected Behavior

Map selection to remain visible at all times. It is expected and intuitive to keep important user selections visible during and after transitions. image

Environment

- OS: Win 10
- Browser: Chrome
- Framework: JS

Any additional comments?

The fix - could it be just a matter of z-ordering ?

helgasoft commented 1 year ago

Found a workaround - dispatchAction select after each setOption to refresh the selected. Demo Code