mirror of
https://github.com/radzenhq/radzen-blazor.git
synced 2026-07-08 18:16:08 +00:00
Refresh chart when a series is removed
Removing a series from the chart only dropped it from the Series list without rebuilding the category/value scales. When a RadzenChart instance was reused across a render that replaced its series, new series' Data callbacks would refresh the scale while the outgoing series were still present, and after they were finally disposed the scale kept the stale categories. Triggering a refresh on removal rebuilds the scales from the live series set.
This commit is contained in:
committed by
Vladimir Enchev
parent
48d1f6fdac
commit
9709375d9e
@@ -314,7 +314,10 @@ namespace Radzen.Blazor
|
||||
|
||||
internal void RemoveSeries(IChartSeries series)
|
||||
{
|
||||
Series.Remove(series);
|
||||
if (Series.Remove(series))
|
||||
{
|
||||
_ = Refresh(false);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Returns the Series used by the Chart.
|
||||
|
||||
Reference in New Issue
Block a user