Legends for a multilevel drilldown bar chart
- Dominant language
- TypeScript
- Stars
- 67.3k
- Forks
- 19.8k
- Avg merge
- 11d 14h
- Merged PRs (30d)
- 8
Description
### What problem does this feature solve?
In multilevel drilldown bar charts, there is currently no built-in way to maintain an accurate and dynamic legend that reflects the categories at each drill level.
For example, when clicking a bar to drill down, the new chart renders correctly, but the legend either:
disappears, shows only a static category (e.g. one series.name), or needs to be manually reconstructed using series-per-category (which breaks drilldown event handling and transitions).
This limits usability.
A dynamic legend would let users instantly identify what each bar color represents without relying solely on axis labels or tooltips.
Right now, I’m using tooltips and axis labels to show this, but the absence of a clear, auto-updating legend degrades UX — especially for data-heavy dashboards
### What does the proposed API look like?
legend: {
type: 'drilldown', // new type: behaves like 'scroll' or 'plain'
followData: true, // legend auto-populates from current series.data[].name
matchItemColor: true, // use itemStyle.color from series.data[i]
textStyle: { fontSize: 14 },
}
Contributor guide
Assessment
This issue has not been assessed yet.