-
Notifications
You must be signed in to change notification settings - Fork 661
Open
Description
Describe the bug
When updating a LineSeries (spline) in Blazor with a new Values collection that contains fewer points than the previous one, the spline still appears to use old control points.
This results in a visible spline artifact at the end of the line, as if “ghost points” from the previous dataset were still present.
To Reproduce
Steps to reproduce the behavior:
- Initialize a
LineSerieswith a larger dataset (e.g. 12 points). - Later update the same series with a smaller dataset (e.g. 8 points):
Series[0].Values = smallerValues;
Can be reproduced with the following code:
private ISeries[] _series =
{
new LineSeries<double>
{
Values = [2, 1, 3, 5, 3, 4, 6],
Fill = null
}
};
protected override async Task OnInitializedAsync()
{
await base.OnInitializedAsync();
await Task.Run(async () =>
{
await Task.Delay(5000);
_series[0].Values = new double[] { 3, 5, 2, 8, };
_ = InvokeAsync(StateHasChanged);
});
}Screenshots
Additional context
Happens after upgrading LiveChartsCore.SkiaSharpView.Blazor from 2.0.0-rc5.4.1 to 2.0.0-rc6
Clearing, Task.Delay with 100ms and then setting the new values works sometime.
Metadata
Metadata
Assignees
Labels
No labels