Skip to content

[Legend] list layout - keep legend values visible when hiding series #2795

@maryam-saeidi

Description

@maryam-saeidi

Related to: #2784 (review)

Is your feature request related to a problem? Please describe.

When using the horizontal legend “list” layout (top/bottom) with legend values enabled (e.g. LegendValue.CurrentAndLastValue), clicking a legend item to disable/hide that series causes the legend values for the remaining visible series to disappear, and the legend shrinks. This creates a noticeable layout jump and makes it harder to compare values across the still-visible series.

Screen.Recording.2026-02-24.at.17.38.44.mp4

Describe the solution you'd like

Keep the legend values always visible for every legend item when legendLayout="list" and legendValues is set even after hiding/disabling the another series, so the legend doesn’t shrink or reflow.

Steps to reproduce

  • Render a chart with showLegend and a horizontal legend (top/bottom)
  • Use legendLayout="list"
  • Enable legend values (e.g. legendValues={[LegendValue.CurrentAndLastValue]})
  • Click a legend item to hide/disable it
  • See how legend width changes (shrinks), causing a UI jump

Metadata

Metadata

Assignees

Labels

:legendLegend related issueenhancementNew feature or request

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions