Get the data point collection based on region
26 Jun 20241 minute to read
CartesianSeries provides the following methods to get a collection of data under a particular region.
-
GetDataPoints(Rect rectangle)- Gets the collection of data that falls inside the given rectangle region. -
GetDataPoints(double startX, double endX, double startY, double endY)- Gets the collection of data from the given axis visible range.
//Gets the collection of data that falls inside the given rectangle region.
List<object> dataPoints = Series.GetDataPoints(rectangle);
or
//Gets the collection of data from the given axis visible range.
List<object> dataPoints = Series.GetDataPoints(startX, endX, startY, endY);NOTE
You can get the visible plotting region of the series in the chart using SeriesBounds property in run time.
See also
How to highlight selected data points by using GetDataPoints method in .NET MAUI Cartesian Charts