You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
In my scenario I have a dropdown in the UI that allows a user to select different data sets which are then visualized by a cartesian chart. However, if a data set is empty and does not possess the considered information the cartesian chart is not updated with the provided empty list of series and shows simply nothing (as other chart types do) but it persists the latest data set that was selected before.
To Reproduce
Steps to reproduce the behavior:
Create a cartesian chart and bind the series property in your XAML view to a public property of type List in your view model
Create a series with data and add it to this list --> data is displayed correctly in UI
Replace the previous series in List by an empty one during runtime --> The previous series is still displayed although the data is obsolete
public List<ISeries> MySeries
{
get
{
if (data == null)
return new List<ISeries>();
var dataSeries = new ColumnSeries<double>
{
Values = ...,
Fill = ...,
DataLabelsPaint = ...,
DataLabelsPosition = ...,
DataLabelsFormatter = (chartPoint) => $"...",
XToolTipLabelFormatter = (chartPoint) => $"...",
IsVisibleAtLegend = false
};
return new List<ISeries> { dataSeries };
}
}
Expected behavior
Charts behave consistently and cartesian chart (like others) does not display anything if an empty set of data is provided
Desktop (please complete the following information):
OS: Windows 10, Version 22H2
Browser --> Not applicable; WPF app
Version: LiveChartsCore 2.0.0-rc2, LiveChartsCore.SkiaSharpView.WPF 2.0.0-rc2
Framework: .NET 7.0
Smartphone (please complete the following information):
--> NA
The text was updated successfully, but these errors were encountered:
Describe the bug
In my scenario I have a dropdown in the UI that allows a user to select different data sets which are then visualized by a cartesian chart. However, if a data set is empty and does not possess the considered information the cartesian chart is not updated with the provided empty list of series and shows simply nothing (as other chart types do) but it persists the latest data set that was selected before.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Charts behave consistently and cartesian chart (like others) does not display anything if an empty set of data is provided
Desktop (please complete the following information):
OS: Windows 10, Version 22H2
Browser --> Not applicable; WPF app
Version: LiveChartsCore 2.0.0-rc2, LiveChartsCore.SkiaSharpView.WPF 2.0.0-rc2
Framework: .NET 7.0
Smartphone (please complete the following information):
--> NA
The text was updated successfully, but these errors were encountered: