Persist the legend selection in charts #1934

Closed
opened 2026-01-29 18:15:50 +00:00 by claunia · 2 comments
Owner

Originally created by @ptoddenroth on GitHub (Dec 19, 2025).

Problem description:

The current Radzen Blazor Chart component lacks support for keeping the chart legend visible while dynamically updating data series visibility. Specifically, when a series is hidden (i.e., setting the Visible property of a RadzenLineSeries to false), the legend entry for that series is also removed, which prevents users from interacting with or re-enabling the legend entry. This leads to a frustrating user experience, especially when working with dynamic data, where users would like the legend entries to remain intact, even when the data is hidden.

Possible solution:

I would like Radzen to introduce functionality that allows the legend entries to persist even when a series is hidden or its visibility is toggled off. This would involve adding a property or feature to the RadzenChart or RadzenLegend components that allows for independent management of the visibility of chart series and their corresponding legend entries. Ideally, this would be an option to either retain or toggle the visibility of the legend entries separately from the series' data rendering.

Alternatives:

As a workaround, I've tried using LocalStorage to manually store and reload the visibility state of the chart series and legend. While this approach can help retain the visibility state of the series after a page reload, it does not address the core issue of keeping the legend entries visible when a series is hidden during normal interaction. Additionally, modifying the series visibility programmatically still leads to the issue of legend entries disappearing when the series is hidden.

Originally created by @ptoddenroth on GitHub (Dec 19, 2025). Problem description: The current Radzen Blazor Chart component lacks support for keeping the chart legend visible while dynamically updating data series visibility. Specifically, when a series is hidden (i.e., setting the Visible property of a RadzenLineSeries to false), the legend entry for that series is also removed, which prevents users from interacting with or re-enabling the legend entry. This leads to a frustrating user experience, especially when working with dynamic data, where users would like the legend entries to remain intact, even when the data is hidden. Possible solution: I would like Radzen to introduce functionality that allows the legend entries to persist even when a series is hidden or its visibility is toggled off. This would involve adding a property or feature to the RadzenChart or RadzenLegend components that allows for independent management of the visibility of chart series and their corresponding legend entries. Ideally, this would be an option to either retain or toggle the visibility of the legend entries separately from the series' data rendering. Alternatives: As a workaround, I've tried using LocalStorage to manually store and reload the visibility state of the chart series and legend. While this approach can help retain the visibility state of the series after a page reload, it does not address the core issue of keeping the legend entries visible when a series is hidden during normal interaction. Additionally, modifying the series visibility programmatically still leads to the issue of legend entries disappearing when the series is hidden.
Author
Owner

@akorchev commented on GitHub (Dec 19, 2025):

Hi @ptoddenroth,

Have you tried using the Hidden property of the series instead of Visible? It removes the series but keeps the legend item and allows the user to show it again.

@akorchev commented on GitHub (Dec 19, 2025): Hi @ptoddenroth, Have you tried using the Hidden property of the series instead of Visible? It removes the series but keeps the legend item and allows the user to show it again.
Author
Owner

@ptoddenroth commented on GitHub (Dec 19, 2025):

Thanks, that helps

@ptoddenroth commented on GitHub (Dec 19, 2025): Thanks, that helps
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/radzen-blazor#1934