SimpleDotDensityChart constructor

const SimpleDotDensityChart({
  1. Key? key,
  2. required List<SimpleDotDensityChartData> data,
  3. SimpleBarChartStyle style = SimpleBarChartStyle.elegant,
  4. double? totalValue,
  5. int rows = 5,
  6. int columns = 10,
  7. double height = 260,
  8. EdgeInsets padding = _defaultPadding,
  9. SimpleDotDensityFillDirection fillDirection = SimpleDotDensityFillDirection.bottomToTop,
  10. List<Color>? palette,
  11. Color? dotColor,
  12. Color? emptyDotColor,
  13. Color? activeColor,
  14. TextStyle? labelStyle,
  15. TextStyle? valueStyle,
  16. bool showLegend = true,
  17. bool showValues = true,
  18. bool showTooltip = true,
  19. bool showActiveDots = true,
  20. bool showEmptyDots = true,
  21. double dotGap = 5,
  22. double dotScale = 0.7,
  23. SimpleDotDensityValueFormatter? valueFormatter,
  24. SimpleDotDensityValueFormatter? percentFormatter,
  25. SimpleDotDensityTapCallback? onDotTap,
  26. SimpleDotDensityTooltipBuilder? tooltipBuilder,
  27. WidgetBuilder? emptyBuilder,
  28. String? semanticLabel,
  29. bool excludeFromSemantics = false,
  30. Duration animationDuration = const Duration(milliseconds: 700),
  31. Curve animationCurve = Curves.easeOutCubic,
})

Implementation

const SimpleDotDensityChart({
  super.key,
  required this.data,
  this.style = SimpleBarChartStyle.elegant,
  this.totalValue,
  this.rows = 5,
  this.columns = 10,
  this.height = 260,
  this.padding = _defaultPadding,
  this.fillDirection = SimpleDotDensityFillDirection.bottomToTop,
  this.palette,
  this.dotColor,
  this.emptyDotColor,
  this.activeColor,
  this.labelStyle,
  this.valueStyle,
  this.showLegend = true,
  this.showValues = true,
  this.showTooltip = true,
  this.showActiveDots = true,
  this.showEmptyDots = true,
  this.dotGap = 5,
  this.dotScale = 0.7,
  this.valueFormatter,
  this.percentFormatter,
  this.onDotTap,
  this.tooltipBuilder,
  this.emptyBuilder,
  this.semanticLabel,
  this.excludeFromSemantics = false,
  this.animationDuration = const Duration(milliseconds: 700),
  this.animationCurve = Curves.easeOutCubic,
}) : assert(height > 0),
     assert(rows > 0),
     assert(columns > 0),
     assert(totalValue == null || totalValue > 0),
     assert(dotGap >= 0),
     assert(dotScale > 0 && dotScale <= 1);