Thanks for the response. I don't think that would quite have the effect that I am looking for, since it relies on a generating the data every time, based on some kind of arbitrary input. I'm looking to compute the characteristics of the visible portion
of a static set of data (measured points from real world sensors.) Here's my solution that gets the job done, but perhaps has room for some kind of efficiency improvements:
List<double> x_points = new List<double>();
List<double> y_points = new List<double>();
for (int index = 0; index < this._x_data.Length; index++)
if (this._x_data[index] >= this._plotter.VisibleRect.X1 &&
this._x_data[index] <= this._plotter.VisibleRect.X2 &&
this._y_data[index] >= this._plotter.VisibleRect.Y1 &&
this._y_data[index] <= this._plotter.VisibleRect.Y2)
// compute statistics on x_points and y_points
_plotter is of type GenericChartPlotter<double, double>.
Also, its not quite clear when to call this. I'd like the stats to update whenever the points that are displayed in the plotter viewport changes, but the Viewport.SizeChanged event doesn't always seem to fire.
In any case, I have a working solution, but any recommendations about optimizing it are welcome. :)