transformValues method

void transformValues()

Implementation

void transformValues() {
  if (series == null ||
      trendlineXValues.isEmpty ||
      trendlineYValues.isEmpty) {
    return;
  }

  _resetRenderPoints();
  _transformTrendlinePoints();
  if (markerSettings.isVisible) {
    _calculateMarkerPositions();
  }

  _renderPoints = [..._points];

  // Trigger the onRenderDetailsUpdate event.
  if (onRenderDetailsUpdate != null) {
    final TrendlineRenderParams args = TrendlineRenderParams(
      _slopeIntercept.intercept,
      series!.index,
      name ?? _defaultTrendlineName(),
      series!.name,
      _renderPoints,
      _slope,
      _rSquaredValue,
    );
    onRenderDetailsUpdate!(args);
  }

  _computeTrendlinePath();
}