apache / apache/echarts

[Bug] highlight-action of SVG map only highlights one item

Open
#18,417 1 comment 0 reactions 0 assignees View on GitHub
bug SVG
Dominant language
TypeScript
Stars
67.3k
Forks
19.8k
Avg merge
11d 14h
Merged PRs (30d)
8

Description

### Version

5.3.2

### Link to Minimal Reproduction

[echarts online editor example](https://echarts.apache.org/examples/en/editor.html?c=geo-beef-cuts&code=MYewdgzgLgBBBuBzAwuKBTMsC8MAGAPAogHwBQMMBATusLAO4CWAJlABbYBEALAOxcY7dE0Tso3AMwAGQQA8pARkEBPJYLABDALbpuASQzaYymAHpylAhjmwFvU2q4BWWSUPpjigmZtRyFFS09DDMbJy8AkIiYhJcMvLcitIAnKrqMFq6BkYmghaB1ui2MPaKigAc6bxp7rnevsX-ZIXBjKwc3PyCwqLiUrKlGU58kho6elwexgBM-ZZUfkO8g04pc3WeMDM-fuQ-xCR4ANwtdOya1FAQAHS0iEzQ6NQAspoADgAUAOQQTNrvAA26De72-ABoYABvOBIABcsJQaEwsAAvgBKU4gd5QJjgGC4KGBKAgECA3HvBFQ1HgwIQZ5MdAQBEAbUClCJlC5mQmCO-AGV_kD0DB-QA1ADiMFBEPZXKgKne6D52g-su5lFVlJgvyFwJltI1MGoIB0CKg1AAruhDRrPO8Ln9mdC5dzAZoAEboQFU10aiDsEAMBEAM00gPpfsoqL9NL99OB9HQLBeIBYypgYYjNr9LE0UE0rKjLqN3KyGe-0xM6tLlHg4etCMUzlttaYRn5CuBvtr3Mu6E0qEBIGofNoLG-xejxbjtc5vfLfKrMxrtfrgMbJkUrdL7c8nZU3ZLvco_cHZJHfI9G_Qk5PMdrD41AF05U_X6jTtoVMgLlcbvSUAAPI4niYCfNiuLgJiLSAQAKv86AgJaUCfCGlpgPQYEwJ86LHt-v6XFANwsI87z5sA7AAIJYeAnzzpQCpKny7B9ICfRQKuPK6Eu9R3jAGKnDS2zSKJmJAA)

### Steps to Reproduce

- the example shows a simple SVG map
- the SVG has 2 rectangles with the same name 'Item 1'
- when we assign a color to 'Item 1' it works as expected: both SVG elements have the red areaColor
- after 2 seconds a timer will dispatch the highlight action for 'Item 1'
- BUG: only one of the 2 SVG elements will be highlighted!

### Current Behavior

only one of the 2 SVG elements named "Item 1" will be highlighted

### Expected Behavior

all SVG elements named "Item 1" should be highlighted

### Environment

```markdown
- OS: Windows
- Browser: Chrome
- Framework: Angular
- but we can also reproduce it in the e-charts online editor (see reproduction example above)
```

### Any additional comments?

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.