SimpleWaterfallChart constructor
const
SimpleWaterfallChart({
- Key? key,
- required List<
SimpleWaterfallChartData> data, - SimpleBarChartStyle style = SimpleBarChartStyle.elegant,
- double initialValue = 0,
- double? minValue,
- double? maxValue,
- double height = 260,
- EdgeInsets padding = _defaultPadding,
- Color? increaseColor,
- Color? decreaseColor,
- Color? totalColor,
- Color? connectorColor,
- Color? gridColor,
- Color? axisColor,
- Color? activeBarColor,
- TextStyle? labelStyle,
- TextStyle? valueStyle,
- bool showGrid = true,
- bool showValues = true,
- bool showConnectors = 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,
- SimpleWaterfallValueFormatter? valueFormatter,
- SimpleWaterfallValueFormatter? deltaFormatter,
- SimpleWaterfallTapCallback? onBarTap,
- SimpleWaterfallTooltipBuilder? tooltipBuilder,
- WidgetBuilder? emptyBuilder,
- String? semanticLabel,
- bool excludeFromSemantics = false,
- Duration animationDuration = const Duration(milliseconds: 750),
- Curve animationCurve = Curves.easeOutCubic,
Implementation
const SimpleWaterfallChart({
super.key,
required this.data,
this.style = SimpleBarChartStyle.elegant,
this.initialValue = 0,
this.minValue,
this.maxValue,
this.height = 260,
this.padding = _defaultPadding,
this.increaseColor,
this.decreaseColor,
this.totalColor,
this.connectorColor,
this.gridColor,
this.axisColor,
this.activeBarColor,
this.labelStyle,
this.valueStyle,
this.showGrid = true,
this.showValues = true,
this.showConnectors = 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.deltaFormatter,
this.onBarTap,
this.tooltipBuilder,
this.emptyBuilder,
this.semanticLabel,
this.excludeFromSemantics = false,
this.animationDuration = const Duration(milliseconds: 750),
this.animationCurve = Curves.easeOutCubic,
}) : assert(height > 0),
assert(
initialValue > double.negativeInfinity &&
initialValue < double.infinity,
),
assert(gridLineCount >= 2),
assert(barRadius == null || barRadius >= 0),
assert(
barWidthFactor == null || (barWidthFactor > 0 && barWidthFactor <= 1),
),
assert(maxBarWidth == null || maxBarWidth > 0);