0
Under review
Series.Points showing returning an empty list when databound?
I've updated to the latest version of Oxyplot and seem to have a regression on the ScatterSeries<T> class.
I've written an extension method for a scatter series in "multiple selection" mode that allows to select all the points that return "true" at a specific function passed in parameter.
public static void SelectAll<T>(this ScatterSeries<T> series, Func<T, bool> func) where T : ScatterPoint, new()
{
it was working fine before the update, but now I see that the "Points" property return an empty list. Looking at the code, I see that there is a protected property "ItemsSourcePoints" that has the point list, but the "Points" property doesn't use it.
Is there a way to get the actual points? Is this by design or a bug?
Thanks.
I've written an extension method for a scatter series in "multiple selection" mode that allows to select all the points that return "true" at a specific function passed in parameter.
public static void SelectAll<T>(this ScatterSeries<T> series, Func<T, bool> func) where T : ScatterPoint, new()
{
foreach (var dataPoint in series.Points.Where(func))
{
{
series.SelectItem(series.Points.IndexOf(dataPoint));
}
}it was working fine before the update, but now I see that the "Points" property return an empty list. Looking at the code, I see that there is a protected property "ItemsSourcePoints" that has the point list, but the "Points" property doesn't use it.
Is there a way to get the actual points? Is this by design or a bug?
Thanks.
Customer support service by UserEcho
ActualPoints
property to public. But this property should really only be exposed as a readonly collection or anIEnumerable<T>
... The current implementation is aList<T>
for performance reasons. Should we add another property or method that returns the actual points asIEnumerable<T>
?ScatterSeries<T>
, I suggest renaming the currentActualPoints
to e.g.ActualPointsList
and create a newActualPoints
property: Will this work?