calcMinMax method

  1. @override
void calcMinMax()
override

Calculates the y-min and y-max value and the y-delta and x-delta value

Implementation

@override
void calcMinMax() {
  if (_fitBars) {
    xAxis?.calculate(getBarData()!.xMin - getBarData()!.barWidth / 2.0,
        getBarData()!.xMax + getBarData()!.barWidth / 2.0);
  } else {
    xAxis?.calculate(getBarData()!.xMin, getBarData()!.xMax);
  }

  // calculate axis range (min / max) according to provided data
  axisLeft?.calculate(getBarData()!.getYMin2(AxisDependency.left),
      getBarData()!.getYMax2(AxisDependency.left));
  axisRight?.calculate(getBarData()!.getYMin2(AxisDependency.right),
      getBarData()!.getYMax2(AxisDependency.right));
}