SimpleControlChart constructor

const SimpleControlChart({
  1. Key? key,
  2. required List<SimpleControlChartPoint> points,
  3. SimpleTrendChartStyle style = SimpleTrendChartStyle.elegant,
  4. double? minValue,
  5. double? maxValue,
  6. double? centerValue,
  7. double? lowerControlLimit,
  8. double? upperControlLimit,
  9. double? lowerWarningLimit,
  10. double? upperWarningLimit,
  11. double sigmaMultiplier = 3,
  12. double warningSigmaMultiplier = 2,
  13. double height = 260,
  14. EdgeInsets padding = _defaultPadding,
  15. Color? lineColor,
  16. Color? dotColor,
  17. Color? centerLineColor,
  18. Color? controlLimitColor,
  19. Color? warningBandColor,
  20. Color? signalColor,
  21. Color? gridColor,
  22. Color? axisColor,
  23. Color? activeColor,
  24. TextStyle? labelStyle,
  25. TextStyle? valueStyle,
  26. bool includeZero = false,
  27. bool showGrid = true,
  28. bool showLine = true,
  29. bool showDots = true,
  30. bool showValues = false,
  31. bool showLabels = true,
  32. bool showCenterLine = true,
  33. bool showControlLimits = true,
  34. bool showWarningBand = true,
  35. bool highlightSignals = true,
  36. bool showTooltip = true,
  37. bool showActivePoint = true,
  38. List<SimpleChartReferenceLine> referenceLines = const [],
  39. List<SimpleChartReferenceBand> referenceBands = const [],
  40. int gridLineCount = 4,
  41. double? strokeWidth,
  42. double? dotRadius,
  43. SimpleControlValueFormatter? valueFormatter,
  44. SimpleControlPointTapCallback? onPointTap,
  45. SimpleControlTooltipBuilder? tooltipBuilder,
  46. WidgetBuilder? emptyBuilder,
  47. String? semanticLabel,
  48. bool excludeFromSemantics = false,
  49. Duration animationDuration = const Duration(milliseconds: 700),
  50. Curve animationCurve = Curves.easeOutCubic,
})

Implementation

const SimpleControlChart({
  super.key,
  required this.points,
  this.style = SimpleTrendChartStyle.elegant,
  this.minValue,
  this.maxValue,
  this.centerValue,
  this.lowerControlLimit,
  this.upperControlLimit,
  this.lowerWarningLimit,
  this.upperWarningLimit,
  this.sigmaMultiplier = 3,
  this.warningSigmaMultiplier = 2,
  this.height = 260,
  this.padding = _defaultPadding,
  this.lineColor,
  this.dotColor,
  this.centerLineColor,
  this.controlLimitColor,
  this.warningBandColor,
  this.signalColor,
  this.gridColor,
  this.axisColor,
  this.activeColor,
  this.labelStyle,
  this.valueStyle,
  this.includeZero = false,
  this.showGrid = true,
  this.showLine = true,
  this.showDots = true,
  this.showValues = false,
  this.showLabels = true,
  this.showCenterLine = true,
  this.showControlLimits = true,
  this.showWarningBand = true,
  this.highlightSignals = true,
  this.showTooltip = true,
  this.showActivePoint = true,
  this.referenceLines = const [],
  this.referenceBands = const [],
  this.gridLineCount = 4,
  this.strokeWidth,
  this.dotRadius,
  this.valueFormatter,
  this.onPointTap,
  this.tooltipBuilder,
  this.emptyBuilder,
  this.semanticLabel,
  this.excludeFromSemantics = false,
  this.animationDuration = const Duration(milliseconds: 700),
  this.animationCurve = Curves.easeOutCubic,
}) : assert(height > 0),
     assert(sigmaMultiplier > 0),
     assert(warningSigmaMultiplier > 0),
     assert(gridLineCount >= 2),
     assert(strokeWidth == null || strokeWidth > 0),
     assert(dotRadius == null || dotRadius >= 0);