SimpleBoxenPlotChart constructor

const SimpleBoxenPlotChart({
  1. Key? key,
  2. required List<SimpleBoxenPlotData> data,
  3. SimpleBarChartStyle style = SimpleBarChartStyle.elegant,
  4. double? minValue,
  5. double? maxValue,
  6. double height = 260,
  7. EdgeInsets padding = _defaultPadding,
  8. List<Color>? palette,
  9. Color? boxColor,
  10. Color? medianColor,
  11. Color? whiskerColor,
  12. Color? gridColor,
  13. Color? axisColor,
  14. Color? activeColor,
  15. TextStyle? labelStyle,
  16. TextStyle? valueStyle,
  17. bool showGrid = true,
  18. bool showValues = true,
  19. bool showMedian = true,
  20. bool showWhiskers = true,
  21. bool showTooltip = true,
  22. bool showActiveBox = true,
  23. List<SimpleChartReferenceLine> referenceLines = const [],
  24. List<SimpleChartReferenceBand> referenceBands = const [],
  25. int gridLineCount = 4,
  26. int maxDepth = 4,
  27. double? boxWidthFactor,
  28. double? strokeWidth,
  29. SimpleBoxenPlotValueFormatter? valueFormatter,
  30. SimpleBoxenPlotTapCallback? onBoxTap,
  31. SimpleBoxenPlotTooltipBuilder? 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 SimpleBoxenPlotChart({
  super.key,
  required this.data,
  this.style = SimpleBarChartStyle.elegant,
  this.minValue,
  this.maxValue,
  this.height = 260,
  this.padding = _defaultPadding,
  this.palette,
  this.boxColor,
  this.medianColor,
  this.whiskerColor,
  this.gridColor,
  this.axisColor,
  this.activeColor,
  this.labelStyle,
  this.valueStyle,
  this.showGrid = true,
  this.showValues = true,
  this.showMedian = true,
  this.showWhiskers = true,
  this.showTooltip = true,
  this.showActiveBox = true,
  this.referenceLines = const [],
  this.referenceBands = const [],
  this.gridLineCount = 4,
  this.maxDepth = 4,
  this.boxWidthFactor,
  this.strokeWidth,
  this.valueFormatter,
  this.onBoxTap,
  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(maxDepth > 0),
     assert(
       boxWidthFactor == null || (boxWidthFactor > 0 && boxWidthFactor <= 1),
     ),
     assert(strokeWidth == null || strokeWidth > 0);