scaleY method

double scaleY({
  1. required double value,
})

Scales value

  • From own scale, given be the merged data and label intervals calculated in _mergedLabelYsIntervalWithDataYsEnvelope
  • To the Y axis scale defined by _axisYMin, _axisYMax.

Implementation

double scaleY({
  required double value,
}) {
  // Use linear scaling utility to scale from data Y interval to axis Y interval
  return scaleValue(
      value: value.toDouble(),
      fromDomainMin: _mergedLabelYsIntervalWithDataYsEnvelope.min.toDouble(),
      fromDomainMax: _mergedLabelYsIntervalWithDataYsEnvelope.max.toDouble(),
      toDomainMin: _axisY.min,
      toDomainMax: _axisY.max);
}