SimpleWaffleChart constructor
const
SimpleWaffleChart({
- Key? key,
- required List<
SimpleWaffleChartData> data, - SimpleBarChartStyle style = SimpleBarChartStyle.elegant,
- double? totalValue,
- int rows = 10,
- int columns = 10,
- double height = 260,
- EdgeInsets padding = _defaultPadding,
- SimpleWaffleFillDirection fillDirection = SimpleWaffleFillDirection.bottomToTop,
- List<
Color> ? palette, - Color? cellColor,
- Color? emptyColor,
- Color? borderColor,
- Color? activeColor,
- TextStyle? labelStyle,
- TextStyle? valueStyle,
- bool showLegend = true,
- bool showValues = true,
- bool showTooltip = true,
- bool showActiveCells = true,
- bool showEmptyCells = true,
- double cellGap = 3,
- double cellRadius = 4,
- SimpleWaffleValueFormatter? valueFormatter,
- SimpleWaffleValueFormatter? percentFormatter,
- SimpleWaffleTapCallback? onCellTap,
- SimpleWaffleTooltipBuilder? tooltipBuilder,
- WidgetBuilder? emptyBuilder,
- String? semanticLabel,
- bool excludeFromSemantics = false,
- Duration animationDuration = const Duration(milliseconds: 700),
- Curve animationCurve = Curves.easeOutCubic,
Implementation
const SimpleWaffleChart({
super.key,
required this.data,
this.style = SimpleBarChartStyle.elegant,
this.totalValue,
this.rows = 10,
this.columns = 10,
this.height = 260,
this.padding = _defaultPadding,
this.fillDirection = SimpleWaffleFillDirection.bottomToTop,
this.palette,
this.cellColor,
this.emptyColor,
this.borderColor,
this.activeColor,
this.labelStyle,
this.valueStyle,
this.showLegend = true,
this.showValues = true,
this.showTooltip = true,
this.showActiveCells = true,
this.showEmptyCells = true,
this.cellGap = 3,
this.cellRadius = 4,
this.valueFormatter,
this.percentFormatter,
this.onCellTap,
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(cellGap >= 0),
assert(cellRadius >= 0);