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

Use ICollection interface instead #1386

Merged
merged 1 commit into from
Dec 1, 2023
Merged

Use ICollection interface instead #1386

merged 1 commit into from
Dec 1, 2023

Conversation

beto-rodriguez
Copy link
Owner

Currently Series.Values is of type IEnumerable while this is a flexible type, it also causes some confusion, users are using LINQ expressions as the data source, Linq expressions are evaluated every time the library needs read the data in the chart, this is not optimal for performance and could also lead to some visual glitches.

This is a recurrent issue with new users, some related issues are:

This PR changes the Series.Values type to ICollection, this prevents users from using LINQ expressions as the data source and we can still use List<T>, ObservableCollection<T>, arrays, Queue<T>,Stack<T>, HashSet<T> and a lot of useful structures in dotnet.

@beto-rodriguez beto-rodriguez merged commit 482a957 into dev Dec 1, 2023
4 checks passed
@beto-rodriguez beto-rodriguez deleted the use-icollection branch December 1, 2023 16:58
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

Successfully merging this pull request may close these issues.

None yet

1 participant