SimplePictogramChart constructor
const
SimplePictogramChart({
- Key? key,
- required List<
SimplePictogramChartData> data, - SimpleBarChartStyle style = SimpleBarChartStyle.elegant,
- double? totalValue,
- int rows = 5,
- int columns = 10,
- double height = 260,
- EdgeInsets padding = _defaultPadding,
- SimplePictogramSymbol symbol = SimplePictogramSymbol.person,
- SimplePictogramFillDirection fillDirection = SimplePictogramFillDirection.bottomToTop,
- List<
Color> ? palette, - Color? symbolColor,
- Color? emptyColor,
- Color? activeColor,
- TextStyle? labelStyle,
- TextStyle? valueStyle,
- bool showLegend = true,
- bool showValues = true,
- bool showTooltip = true,
- bool showActiveUnits = true,
- bool showEmptyUnits = true,
- double unitGap = 5,
- double symbolScale = 0.82,
- SimplePictogramValueFormatter? valueFormatter,
- SimplePictogramValueFormatter? percentFormatter,
- SimplePictogramTapCallback? onUnitTap,
- SimplePictogramTooltipBuilder? tooltipBuilder,
- WidgetBuilder? emptyBuilder,
- String? semanticLabel,
- bool excludeFromSemantics = false,
- Duration animationDuration = const Duration(milliseconds: 700),
- 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);