valueForY method

double valueForY(
  1. double y
)

The data value at pixel y — the inverse of yForValue.

Implementation

double valueForY(double y) {
  if (bounds.height == 0) return minValue;
  return minValue + (bounds.bottom - y) / bounds.height * _span;
}