Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Queue<T> and Stack<T> can no longer be used as Series values in v2.0.0.rc4 #1673

Open
perkjelsvik opened this issue Oct 25, 2024 · 1 comment

Comments

@perkjelsvik
Copy link

Describe the bug
I am using a Queue as the values for my charts. In the latest pre-release, i.e. v2.0.0-rc4, this no longer works. I now get error:

CS0266	Cannot implicitly convert type 
'System.Collections.Generic.Queue<LiveChartsCore.Defaults.DateTimePoint>' to 'System.Collections.Generic.ICollection<LiveChartsCore.Defaults.DateTimePoint>'. An explicit conversion exists (are you missing a cast?)

Testing quickly it seems that Array<T> and HashSet<T> still works, but Stack<T> and Queue<T> does not.

To Reproduce
Steps to reproduce the behavior:

Queue<DateTimePoint> data = new();
ChartSeries = new ObservableCollection<ISeries> {
    new StepLineSeries<DateTimePoint>
    {
        Values = data
    },
};

Expected behavior
So far I have been able to use Queue<T> without issues. I was previously using v2.0.0-rc3.3. In #1386 the Series.Values was updated from IEnumerable to ICollection. @beto-rodriguez writes that we can still use Queue<T> etc. despite changing to ICollection, which has been true up to the latest version

Desktop (please complete the following information):

  • OS: Windows 11
  • Version: v2.0.0-RC4, WPF, .NET 6, targets 10.0.22000.0
@beto-rodriguez
Copy link
Owner

Completely misses that :(

The referenced PR brings these collections back

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants