SimpleRaincloudChart constructor

const SimpleRaincloudChart({
  1. Key? key,
  2. required List<SimpleRaincloudChartData> data,
  3. SimpleBarChartStyle style = SimpleBarChartStyle.elegant,
  4. double? minValue,
  5. double? maxValue,
  6. double height = 280,
  7. EdgeInsets padding = _defaultPadding,
  8. List<Color>? palette,
  9. Color? cloudColor,
  10. Color? outlineColor,
  11. Color? boxColor,
  12. Color? dotColor,
  13. Color? medianColor,
  14. Color? meanColor,
  15. Color? outlierColor,
  16. Color? gridColor,
  17. Color? axisColor,
  18. Color? activeColor,
  19. TextStyle? labelStyle,
  20. TextStyle? valueStyle,
  21. bool showGrid = true,
  22. bool showValues = true,
  23. bool showCloud = true,
  24. bool showBox = true,
  25. bool showDots = true,
  26. bool showMean = true,
  27. bool showOutliers = true,
  28. bool showTooltip = true,
  29. bool showActiveGroup = true,
  30. List<SimpleChartReferenceLine> referenceLines = const [],
  31. List<SimpleChartReferenceBand> referenceBands = const [],
  32. int gridLineCount = 4,
  33. int densitySteps = 36,
  34. double? cloudWidthFactor,
  35. double? dotRadius,
  36. double dotOpacity = 0.72,
  37. double jitter = 0.44,
  38. int jitterSeed = 31,
  39. SimpleRaincloudValueFormatter? valueFormatter,
  40. SimpleRaincloudTapCallback? onGroupTap,
  41. SimpleRaincloudTooltipBuilder? tooltipBuilder,
  42. WidgetBuilder? emptyBuilder,
  43. String? semanticLabel,
  44. bool excludeFromSemantics = false,
  45. Duration animationDuration = const Duration(milliseconds: 760),
  46. Curve animationCurve = Curves.easeOutCubic,
})

Implementation

const SimpleRaincloudChart({
  super.key,
  required this.data,
  this.style = SimpleBarChartStyle.elegant,
  this.minValue,
  this.maxValue,
  this.height = 280,
  this.padding = _defaultPadding,
  this.palette,
  this.cloudColor,
  this.outlineColor,
  this.boxColor,
  this.dotColor,
  this.medianColor,
  this.meanColor,
  this.outlierColor,
  this.gridColor,
  this.axisColor,
  this.activeColor,
  this.labelStyle,
  this.valueStyle,
  this.showGrid = true,
  this.showValues = true,
  this.showCloud = true,
  this.showBox = true,
  this.showDots = true,
  this.showMean = true,
  this.showOutliers = true,
  this.showTooltip = true,
  this.showActiveGroup = true,
  this.referenceLines = const [],
  this.referenceBands = const [],
  this.gridLineCount = 4,
  this.densitySteps = 36,
  this.cloudWidthFactor,
  this.dotRadius,
  this.dotOpacity = 0.72,
  this.jitter = 0.44,
  this.jitterSeed = 31,
  this.valueFormatter,
  this.onGroupTap,
  this.tooltipBuilder,
  this.emptyBuilder,
  this.semanticLabel,
  this.excludeFromSemantics = false,
  this.animationDuration = const Duration(milliseconds: 760),
  this.animationCurve = Curves.easeOutCubic,
}) : assert(height > 0),
     assert(gridLineCount >= 2),
     assert(densitySteps >= 8),
     assert(
       cloudWidthFactor == null ||
           (cloudWidthFactor > 0 && cloudWidthFactor <= 1),
     ),
     assert(dotRadius == null || dotRadius >= 0),
     assert(dotOpacity >= 0 && dotOpacity <= 1),
     assert(jitter >= 0 && jitter <= 1);