SimpleSlopeChart constructor

const SimpleSlopeChart({
  1. Key? key,
  2. required List<SimpleSlopeChartData> data,
  3. String startLabel = 'Start',
  4. String endLabel = 'End',
  5. SimpleTrendChartStyle style = SimpleTrendChartStyle.elegant,
  6. double? minValue,
  7. double? maxValue,
  8. double height = 260,
  9. EdgeInsets padding = _defaultPadding,
  10. List<Color>? palette,
  11. Color? lineColor,
  12. Color? positiveColor,
  13. Color? negativeColor,
  14. Color? gridColor,
  15. Color? axisColor,
  16. Color? activeColor,
  17. TextStyle? labelStyle,
  18. TextStyle? valueStyle,
  19. bool includeZero = false,
  20. bool colorByDelta = true,
  21. bool showGrid = true,
  22. bool showValues = true,
  23. bool showDelta = true,
  24. bool showEndLabels = true,
  25. bool showTooltip = true,
  26. bool showActiveLine = true,
  27. int gridLineCount = 4,
  28. double? strokeWidth,
  29. double? dotRadius,
  30. SimpleSlopeValueFormatter? valueFormatter,
  31. SimpleSlopeValueFormatter? deltaFormatter,
  32. SimpleSlopeTapCallback? onLineTap,
  33. SimpleSlopeTooltipBuilder? tooltipBuilder,
  34. WidgetBuilder? emptyBuilder,
  35. String? semanticLabel,
  36. bool excludeFromSemantics = false,
  37. Duration animationDuration = const Duration(milliseconds: 700),
  38. Curve animationCurve = Curves.easeOutCubic,
})

Implementation

const SimpleSlopeChart({
  super.key,
  required this.data,
  this.startLabel = 'Start',
  this.endLabel = 'End',
  this.style = SimpleTrendChartStyle.elegant,
  this.minValue,
  this.maxValue,
  this.height = 260,
  this.padding = _defaultPadding,
  this.palette,
  this.lineColor,
  this.positiveColor,
  this.negativeColor,
  this.gridColor,
  this.axisColor,
  this.activeColor,
  this.labelStyle,
  this.valueStyle,
  this.includeZero = false,
  this.colorByDelta = true,
  this.showGrid = true,
  this.showValues = true,
  this.showDelta = true,
  this.showEndLabels = true,
  this.showTooltip = true,
  this.showActiveLine = true,
  this.gridLineCount = 4,
  this.strokeWidth,
  this.dotRadius,
  this.valueFormatter,
  this.deltaFormatter,
  this.onLineTap,
  this.tooltipBuilder,
  this.emptyBuilder,
  this.semanticLabel,
  this.excludeFromSemantics = false,
  this.animationDuration = const Duration(milliseconds: 700),
  this.animationCurve = Curves.easeOutCubic,
}) : assert(height > 0),
     assert(gridLineCount >= 2),
     assert(strokeWidth == null || strokeWidth > 0),
     assert(dotRadius == null || dotRadius >= 0);