SimpleFanChart constructor

const SimpleFanChart({
  1. Key? key,
  2. required List<SimpleFanChartPoint> points,
  3. SimpleTrendChartStyle style = SimpleTrendChartStyle.elegant,
  4. double? minValue,
  5. double? maxValue,
  6. double height = 250,
  7. EdgeInsets padding = _defaultPadding,
  8. String? valueLabel,
  9. Color? lineColor,
  10. Color? bandColor,
  11. Color? gridColor,
  12. Color? axisColor,
  13. Color? activeColor,
  14. List<Color>? palette,
  15. TextStyle? labelStyle,
  16. TextStyle? valueStyle,
  17. bool includeZero = false,
  18. bool showGrid = true,
  19. bool showBands = true,
  20. bool showLine = true,
  21. bool showDots = true,
  22. bool showValues = false,
  23. bool showLegend = true,
  24. bool showTooltip = true,
  25. bool showActivePoint = true,
  26. bool showAxisLabels = true,
  27. List<SimpleChartReferenceLine> referenceLines = const [],
  28. List<SimpleChartReferenceBand> referenceBands = const [],
  29. int gridLineCount = 4,
  30. double strokeWidth = 2.4,
  31. double dotRadius = 3.6,
  32. double bandOpacity = 0.34,
  33. SimpleFanValueFormatter? valueFormatter,
  34. SimpleFanPointTapCallback? onPointTap,
  35. SimpleFanTooltipBuilder? tooltipBuilder,
  36. WidgetBuilder? emptyBuilder,
  37. String? semanticLabel,
  38. bool excludeFromSemantics = false,
  39. Duration animationDuration = const Duration(milliseconds: 750),
  40. Curve animationCurve = Curves.easeOutCubic,
})

Implementation

const SimpleFanChart({
  super.key,
  required this.points,
  this.style = SimpleTrendChartStyle.elegant,
  this.minValue,
  this.maxValue,
  this.height = 250,
  this.padding = _defaultPadding,
  this.valueLabel,
  this.lineColor,
  this.bandColor,
  this.gridColor,
  this.axisColor,
  this.activeColor,
  this.palette,
  this.labelStyle,
  this.valueStyle,
  this.includeZero = false,
  this.showGrid = true,
  this.showBands = true,
  this.showLine = true,
  this.showDots = true,
  this.showValues = false,
  this.showLegend = true,
  this.showTooltip = true,
  this.showActivePoint = true,
  this.showAxisLabels = true,
  this.referenceLines = const [],
  this.referenceBands = const [],
  this.gridLineCount = 4,
  this.strokeWidth = 2.4,
  this.dotRadius = 3.6,
  this.bandOpacity = 0.34,
  this.valueFormatter,
  this.onPointTap,
  this.tooltipBuilder,
  this.emptyBuilder,
  this.semanticLabel,
  this.excludeFromSemantics = false,
  this.animationDuration = const Duration(milliseconds: 750),
  this.animationCurve = Curves.easeOutCubic,
}) : assert(height > 0),
     assert(gridLineCount >= 2),
     assert(strokeWidth > 0),
     assert(dotRadius >= 0),
     assert(bandOpacity >= 0 && bandOpacity <= 1);