Skip to content

Use ICollection interface instead - #1386

Merged
beto-rodriguez merged 1 commit into
devfrom
use-icollection
Dec 1, 2023
Merged

Use ICollection interface instead#1386
beto-rodriguez merged 1 commit into
devfrom
use-icollection

Conversation

@beto-rodriguez

Copy link
Copy Markdown
Collaborator

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
@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.

1 participant