setVisibleYRange method
Limits the visible span of a y axis in both directions. Computed from the current axis range, so call it after data is set. A range that is not above 0 does nothing.
minYRange is the smallest visible span in y values, maxYRange the largest and axis the y axis the spans
refer to.
Implementation
void setVisibleYRange(
double minYRange,
double maxYRange,
AxisDependency axis,
) {
final minScale = scaleForVisibleRange(getAxisRange(axis), maxYRange);
if (minScale == null) return;
final maxScale = scaleForVisibleRange(getAxisRange(axis), minYRange);
if (maxScale == null) return;
viewPortHandler.setMinMaxScaleY(minScale, maxScale);
}