SimpleGroupedBarChart constructor
const
SimpleGroupedBarChart({
- Key? key,
- required List<
String> categories, - required List<
SimpleGroupedBarSeries> series, - SimpleBarChartStyle style = SimpleBarChartStyle.elegant,
- double? minValue,
- double? maxValue,
- double height = 260,
- EdgeInsets padding = _defaultPadding,
- List<
Color> ? palette, - Color? barColor,
- Color? gridColor,
- Color? axisColor,
- Color? activeBarColor,
- TextStyle? labelStyle,
- TextStyle? valueStyle,
- bool showGrid = true,
- bool showValues = true,
- bool showLegend = true,
- bool showTooltip = true,
- bool showActiveBar = true,
- List<
SimpleChartReferenceLine> referenceLines = const [], - List<
SimpleChartReferenceBand> referenceBands = const [], - int gridLineCount = 4,
- double? barRadius,
- double? barWidthFactor,
- double? maxBarWidth,
- bool? useGradient,
- SimpleBarValueFormatter? valueFormatter,
- SimpleGroupedBarTapCallback? onBarTap,
- SimpleGroupedBarTooltipBuilder? tooltipBuilder,
- WidgetBuilder? emptyBuilder,
- String? semanticLabel,
- bool excludeFromSemantics = false,
- Duration animationDuration = const Duration(milliseconds: 700),
- Curve animationCurve = Curves.easeOutCubic,
Implementation
const SimpleGroupedBarChart({
super.key,
required this.categories,
required this.series,
this.style = SimpleBarChartStyle.elegant,
this.minValue,
this.maxValue,
this.height = 260,
this.padding = _defaultPadding,
this.palette,
this.barColor,
this.gridColor,
this.axisColor,
this.activeBarColor,
this.labelStyle,
this.valueStyle,
this.showGrid = true,
this.showValues = true,
this.showLegend = true,
this.showTooltip = true,
this.showActiveBar = true,
this.referenceLines = const [],
this.referenceBands = const [],
this.gridLineCount = 4,
this.barRadius,
this.barWidthFactor,
this.maxBarWidth,
this.useGradient,
this.valueFormatter,
this.onBarTap,
this.tooltipBuilder,
this.emptyBuilder,
this.semanticLabel,
this.excludeFromSemantics = false,
this.animationDuration = const Duration(milliseconds: 700),
this.animationCurve = Curves.easeOutCubic,
}) : assert(gridLineCount >= 2),
assert(barRadius == null || barRadius >= 0),
assert(
barWidthFactor == null || (barWidthFactor > 0 && barWidthFactor <= 1),
),
assert(maxBarWidth == null || maxBarWidth > 0),
assert(height > 0);