range method

  1. @override
DoubleRange range(
  1. RenderChartAxis axis
)

Implementation

@override
DoubleRange range(RenderChartAxis axis) {
  final RenderCartesianChartPlotArea? plotArea =
      parent as RenderCartesianChartPlotArea?;
  if (axis == yAxis &&
      axis.anchorRangeToVisiblePoints &&
      plotArea != null &&
      plotArea.zoomPanBehavior != null &&
      plotArea.zoomPanBehavior!.zoomMode == ZoomMode.x &&
      _yVisibleRange != null) {
    return _yVisibleRange!.copyWith();
  }

  final DoubleRange actualRange = super.range(axis).copyWith();
  if (trendlineContainer == null) {
    return actualRange;
  }

  return _trendlineRange(actualRange, axis);
}