Trendline constructor

Trendline({
  1. bool enableTooltip = true,
  2. double? intercept,
  3. String? name,
  4. List<double>? dashArray,
  5. Color color = Colors.blue,
  6. TrendlineType type = TrendlineType.linear,
  7. double backwardForecast = 0,
  8. double forwardForecast = 0,
  9. double opacity = 1,
  10. bool isVisible = true,
  11. double width = 2,
  12. double animationDuration = 1500,
  13. String valueField = 'high',
  14. bool isVisibleInLegend = true,
  15. LegendIconType legendIconType = LegendIconType.horizontalLine,
  16. MarkerSettings markerSettings = const MarkerSettings(),
  17. int polynomialOrder = 2,
  18. int period = 2,
})

Creating an argument constructor of Trendline class.

Implementation

Trendline(
    {this.enableTooltip = true,
    this.intercept,
    this.name,
    this.dashArray,
    this.color = Colors.blue,
    this.type = TrendlineType.linear,
    this.backwardForecast = 0,
    this.forwardForecast = 0,
    this.opacity = 1,
    this.isVisible = true,
    this.width = 2,
    this.animationDuration = 1500,
    this.valueField = 'high',
    this.isVisibleInLegend = true,
    this.legendIconType = LegendIconType.horizontalLine,
    this.markerSettings = const MarkerSettings(),
    this.polynomialOrder = 2,
    this.period = 2});