transformValues method

void transformValues()

Implementation

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

  _path.reset();
  switch (type) {
    case TrendlineType.linear:
      _transformLinearPoints();
      break;

    case TrendlineType.exponential:
    case TrendlineType.logarithmic:
    case TrendlineType.polynomial:
    case TrendlineType.power:
      _transformTrendlineWithControlPoints();
      break;

    case TrendlineType.movingAverage:
      _transformMovingAveragePoints();
      break;
  }

  if (markerSettings.isVisible) {
    _markers.clear();
    _calculateMarkerPositions();
  }
}