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. double? animationDelay = 0,
  14. String valueField = 'high',
  15. bool isVisibleInLegend = true,
  16. LegendIconType legendIconType = LegendIconType.horizontalLine,
  17. MarkerSettings markerSettings = const MarkerSettings(),
  18. int polynomialOrder = 2,
  19. int period = 2,
  20. ChartTrendlineRenderCallback? onRenderDetailsUpdate}
)

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.animationDelay = 0,
  this.valueField = 'high',
  this.isVisibleInLegend = true,
  this.legendIconType = LegendIconType.horizontalLine,
  this.markerSettings = const MarkerSettings(),
  this.polynomialOrder = 2,
  this.period = 2,
  this.onRenderDetailsUpdate,
});