calcMinMaxY method

  1. @override
void calcMinMaxY (
  1. double fromX,
  2. double toX
)
override

Implementation

@override
void calcMinMaxY(double fromX, double toX) {
  if (_values == null || _values.isEmpty) return;

  _yMax = -double.infinity;
  _yMin = double.infinity;

  int indexFrom = getEntryIndex1(fromX, double.nan, Rounding.DOWN);
  int indexTo = getEntryIndex1(toX, double.nan, Rounding.UP);

  for (int i = indexFrom; i <= indexTo; i++) {
    // only recalculate y
    calcMinMaxY1(_values[i]);
  }
}