calculateSegmentPoints method

  1. @override
void calculateSegmentPoints()
override

Calculates the rendering bounds of a segment.

Implementation

@override
void calculateSegmentPoints() {
  final ChartAxisRenderer _xAxisRenderer = _seriesRenderer._xAxisRenderer!;
  final ChartAxisRenderer _yAxisRenderer = _seriesRenderer._yAxisRenderer!;
  final Rect _axisClipRect = _calculatePlotOffset(
      _chartState._chartAxis._axisClipRect,
      Offset(_seriesRenderer._xAxisRenderer!._axis.plotOffset,
          _seriesRenderer._yAxisRenderer!._axis.plotOffset));
  _currentLocation = _calculatePoint(
      _currentPoint!.xValue,
      _currentPoint!.yValue,
      _xAxisRenderer,
      _yAxisRenderer,
      _seriesRenderer._chartState!._requireInvertedAxis,
      _seriesRenderer._series,
      _axisClipRect);
  _nextLocation = _calculatePoint(
      _nextPoint!.xValue,
      _nextPoint!.yValue,
      _xAxisRenderer,
      _yAxisRenderer,
      _seriesRenderer._chartState!._requireInvertedAxis,
      _seriesRenderer._series,
      _axisClipRect);
  _midLocation = _calculatePoint(
      _midX,
      _midY,
      _xAxisRenderer,
      _yAxisRenderer,
      _seriesRenderer._chartState!._requireInvertedAxis,
      _seriesRenderer._series,
      _axisClipRect);
  _x1 = _currentLocation.x;
  _y1 = _currentLocation.y;
  _x2 = _nextLocation.x;
  _y2 = _nextLocation.y;
  _x3 = _midLocation.x;
  _y3 = _midLocation.y;
}