SimpleRangeChart constructor

const SimpleRangeChart({
  1. Key? key,
  2. required List<SimpleRangeChartData> data,
  3. SimpleBarChartOrientation orientation = SimpleBarChartOrientation.horizontal,
  4. SimpleBarChartStyle style = SimpleBarChartStyle.elegant,
  5. double? minValue,
  6. double? maxValue,
  7. double height = 260,
  8. EdgeInsets? padding,
  9. Color? rangeColor,
  10. Color? markerColor,
  11. Color? gridColor,
  12. Color? axisColor,
  13. Color? activeColor,
  14. TextStyle? labelStyle,
  15. TextStyle? valueStyle,
  16. bool showGrid = true,
  17. bool showLabels = true,
  18. bool showValues = true,
  19. bool showRangeLabels = true,
  20. bool showMarkers = true,
  21. bool showTooltip = true,
  22. bool showActiveRange = true,
  23. List<SimpleChartReferenceLine> referenceLines = const [],
  24. List<SimpleChartReferenceBand> referenceBands = const [],
  25. int gridLineCount = 4,
  26. double? rangeThickness,
  27. double? rangeRadius,
  28. double? markerRadius,
  29. SimpleRangeValueFormatter? valueFormatter,
  30. SimpleRangeTapCallback? onRangeTap,
  31. SimpleRangeTooltipBuilder? tooltipBuilder,
  32. WidgetBuilder? emptyBuilder,
  33. String? semanticLabel,
  34. bool excludeFromSemantics = false,
  35. Duration animationDuration = const Duration(milliseconds: 700),
  36. Curve animationCurve = Curves.easeOutCubic,
})

Implementation

const SimpleRangeChart({
  super.key,
  required this.data,
  this.orientation = SimpleBarChartOrientation.horizontal,
  this.style = SimpleBarChartStyle.elegant,
  this.minValue,
  this.maxValue,
  this.height = 260,
  this.padding,
  this.rangeColor,
  this.markerColor,
  this.gridColor,
  this.axisColor,
  this.activeColor,
  this.labelStyle,
  this.valueStyle,
  this.showGrid = true,
  this.showLabels = true,
  this.showValues = true,
  this.showRangeLabels = true,
  this.showMarkers = true,
  this.showTooltip = true,
  this.showActiveRange = true,
  this.referenceLines = const [],
  this.referenceBands = const [],
  this.gridLineCount = 4,
  this.rangeThickness,
  this.rangeRadius,
  this.markerRadius,
  this.valueFormatter,
  this.onRangeTap,
  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(rangeThickness == null || rangeThickness > 0),
     assert(rangeRadius == null || rangeRadius >= 0),
     assert(markerRadius == null || markerRadius >= 0);