SimpleSinaPlotChart constructor

const SimpleSinaPlotChart({
  1. Key? key,
  2. required List<SimpleSinaPlotData> data,
  3. SimpleBarChartStyle style = SimpleBarChartStyle.elegant,
  4. double? minValue,
  5. double? maxValue,
  6. double height = 260,
  7. EdgeInsets? padding,
  8. List<Color>? palette,
  9. Color? dotColor,
  10. Color? meanColor,
  11. Color? medianColor,
  12. Color? gridColor,
  13. Color? axisColor,
  14. Color? activeColor,
  15. TextStyle? labelStyle,
  16. TextStyle? valueStyle,
  17. bool includeZero = false,
  18. bool showGrid = true,
  19. bool showLabels = true,
  20. bool showValues = false,
  21. bool showMean = true,
  22. bool showMedian = true,
  23. bool showTooltip = true,
  24. bool showActiveDot = true,
  25. List<SimpleChartReferenceLine> referenceLines = const [],
  26. List<SimpleChartReferenceBand> referenceBands = const [],
  27. int gridLineCount = 4,
  28. double? dotRadius,
  29. double dotOpacity = 0.76,
  30. double densitySpreadFactor = 0.82,
  31. double collisionGap = 1.05,
  32. SimpleSinaPlotValueFormatter? valueFormatter,
  33. SimpleSinaPlotTapCallback? onPointTap,
  34. SimpleSinaPlotTooltipBuilder? tooltipBuilder,
  35. WidgetBuilder? emptyBuilder,
  36. String? semanticLabel,
  37. bool excludeFromSemantics = false,
  38. Duration animationDuration = const Duration(milliseconds: 720),
  39. Curve animationCurve = Curves.easeOutCubic,
})

Implementation

const SimpleSinaPlotChart({
  super.key,
  required this.data,
  this.style = SimpleBarChartStyle.elegant,
  this.minValue,
  this.maxValue,
  this.height = 260,
  this.padding,
  this.palette,
  this.dotColor,
  this.meanColor,
  this.medianColor,
  this.gridColor,
  this.axisColor,
  this.activeColor,
  this.labelStyle,
  this.valueStyle,
  this.includeZero = false,
  this.showGrid = true,
  this.showLabels = true,
  this.showValues = false,
  this.showMean = true,
  this.showMedian = true,
  this.showTooltip = true,
  this.showActiveDot = true,
  this.referenceLines = const [],
  this.referenceBands = const [],
  this.gridLineCount = 4,
  this.dotRadius,
  this.dotOpacity = 0.76,
  this.densitySpreadFactor = 0.82,
  this.collisionGap = 1.05,
  this.valueFormatter,
  this.onPointTap,
  this.tooltipBuilder,
  this.emptyBuilder,
  this.semanticLabel,
  this.excludeFromSemantics = false,
  this.animationDuration = const Duration(milliseconds: 720),
  this.animationCurve = Curves.easeOutCubic,
}) : assert(height > 0),
     assert(gridLineCount >= 2),
     assert(dotRadius == null || dotRadius >= 0),
     assert(dotOpacity >= 0 && dotOpacity <= 1),
     assert(densitySpreadFactor >= 0 && densitySpreadFactor <= 1),
     assert(collisionGap > 0);