SimplePictogramChart constructor

const SimplePictogramChart({
  1. Key? key,
  2. required List<SimplePictogramChartData> 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. SimplePictogramSymbol symbol = SimplePictogramSymbol.person,
  10. SimplePictogramFillDirection fillDirection = SimplePictogramFillDirection.bottomToTop,
  11. List<Color>? palette,
  12. Color? symbolColor,
  13. Color? emptyColor,
  14. Color? activeColor,
  15. TextStyle? labelStyle,
  16. TextStyle? valueStyle,
  17. bool showLegend = true,
  18. bool showValues = true,
  19. bool showTooltip = true,
  20. bool showActiveUnits = true,
  21. bool showEmptyUnits = true,
  22. double unitGap = 5,
  23. double symbolScale = 0.82,
  24. SimplePictogramValueFormatter? valueFormatter,
  25. SimplePictogramValueFormatter? percentFormatter,
  26. SimplePictogramTapCallback? onUnitTap,
  27. SimplePictogramTooltipBuilder? tooltipBuilder,
  28. WidgetBuilder? emptyBuilder,
  29. String? semanticLabel,
  30. bool excludeFromSemantics = false,
  31. Duration animationDuration = const Duration(milliseconds: 700),
  32. Curve animationCurve = Curves.easeOutCubic,
})

Implementation

const SimplePictogramChart({
  super.key,
  required this.data,
  this.style = SimpleBarChartStyle.elegant,
  this.totalValue,
  this.rows = 5,
  this.columns = 10,
  this.height = 260,
  this.padding = _defaultPadding,
  this.symbol = SimplePictogramSymbol.person,
  this.fillDirection = SimplePictogramFillDirection.bottomToTop,
  this.palette,
  this.symbolColor,
  this.emptyColor,
  this.activeColor,
  this.labelStyle,
  this.valueStyle,
  this.showLegend = true,
  this.showValues = true,
  this.showTooltip = true,
  this.showActiveUnits = true,
  this.showEmptyUnits = true,
  this.unitGap = 5,
  this.symbolScale = 0.82,
  this.valueFormatter,
  this.percentFormatter,
  this.onUnitTap,
  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(unitGap >= 0),
     assert(symbolScale > 0 && symbolScale <= 1);