apache / apache/echarts

Separate legend icons and labels for each data point in a single bar chart, similar to a pie chart.

Open
#19,326 7 comments 0 reactions 0 assignees View on GitHub
en new-feature pending
Dominant language
TypeScript
Stars
67.3k
Forks
19.8k
Avg merge
11d 14h
Merged PRs (30d)
8

Description

### What problem does this feature solve?

"For a pie chart in a single series case, each data point has a separate legend. When we toggle a legend, that data point is removed from the pie chart. We would like a similar feature for the bar chart. Currently, one series is associated with one legend in the bar chart."
![image](https://github.com/apache/echarts/assets/97290751/e7c009f7-7cf3-42d1-b669-55838df43355)

![image](https://github.com/apache/echarts/assets/97290751/ff14bf1a-5403-4d81-85d2-9476eec47895)

### What does the proposed API look like?

"Currently, in a single bar series case, we only see one legend, but we have a requirement to show legends for each data point."

Pie Chart Link :
https://echarts.apache.org/examples/en/editor.html?c=bar-simple&code=G4QwTgBAxg9gNjMBnCBeCBtA5GApgEywBosAjOAV12KwHM9cA7GgBwEtGBrLAXQCg-MFgBc2MRmggBvARAhJcYNriQAuTHzlyZWrYxABbXBFVYFSlQEZim3bvwhhIdRlt3pEUJVzrLABgAWAA4iCH0jdSwAWXEsCABfIjc7KU8Qb3UAdgBmAFZQ8J8ILAAVKjjE5N1Uryp1XKC_AsMirAB1Agqk9200jIhggOaI4pKACwouqogebt1p4QBPFlb2ajndNmFcAwBlJbginR65WAQwdQgAChZwQwBKVAA-aWn3PGEKMAloeEQkDC3MCGAB0DicAElGPhcAAPHgAbjeWniyNRunRMzmtkOtCY-FUGGOciQYxgAHcTMIwFQNhBbJVbPx4gigA

Bar Chart Link:
https://echarts.apache.org/examples/en/editor.html?c=bar-simple&code=G4QwTgBAxg9gNjMBnCBeCBtA5GApgEywBosAjOAV12KwHM9cA7GgBwEtGBrLAXQCg-MFgBc2MRmggBvPhAgAPAILy2SAFzTZciMICeLXBqxQQw3LUS7iWuflMgN2ALLjiELABUqbrAHUCPh4AFhS8WgC-RFq6yqoaMto6-obuoJTUEVFySLhgbLjqmDaaiXKMIAC2uBBqWDl5BQCM1qUQdsIOmI0ATAAMRBB9_RCNAKzDABy9PFmlegZGpOAtpWxmFQDKenApCa3asAhgGhAAFCzglQCUqAB8JfuJeMIUYBLQ8IhIGBdglQB07RAAElGPhcPIeABuYqtcKw7TwxJIiAzLRaHa0Jj4NQYPbZIIwADuNWEYCoszkmS0-IgSEJJLUZIpNh2ADNhDVehAIlp-OEoUA

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.