SimpleFunnelChart constructor
const
SimpleFunnelChart({
- Key? key,
- required List<
SimpleFunnelChartData> data, - SimpleFunnelMode mode = SimpleFunnelMode.funnel,
- SimpleBarChartStyle style = SimpleBarChartStyle.elegant,
- double height = 260,
- EdgeInsets padding = _defaultPadding,
- List<
Color> ? palette, - Color? stageColor,
- Color? trackColor,
- Color? borderColor,
- Color? activeColor,
- TextStyle? labelStyle,
- TextStyle? valueStyle,
- bool showLabels = true,
- bool showValues = true,
- bool showPercentages = true,
- bool showConversionRates = false,
- bool showTrack = false,
- bool showTooltip = true,
- bool showActiveStage = true,
- double neckWidthFactor = 0.22,
- double stageGap = 6,
- double stageRadius = 6,
- bool? useGradient,
- SimpleFunnelValueFormatter? valueFormatter,
- SimpleFunnelValueFormatter? percentFormatter,
- SimpleFunnelTapCallback? onStageTap,
- SimpleFunnelTooltipBuilder? tooltipBuilder,
- WidgetBuilder? emptyBuilder,
- String? semanticLabel,
- bool excludeFromSemantics = false,
- Duration animationDuration = const Duration(milliseconds: 700),
- Curve animationCurve = Curves.easeOutCubic,
Implementation
const SimpleFunnelChart({
super.key,
required this.data,
this.mode = SimpleFunnelMode.funnel,
this.style = SimpleBarChartStyle.elegant,
this.height = 260,
this.padding = _defaultPadding,
this.palette,
this.stageColor,
this.trackColor,
this.borderColor,
this.activeColor,
this.labelStyle,
this.valueStyle,
this.showLabels = true,
this.showValues = true,
this.showPercentages = true,
this.showConversionRates = false,
this.showTrack = false,
this.showTooltip = true,
this.showActiveStage = true,
this.neckWidthFactor = 0.22,
this.stageGap = 6,
this.stageRadius = 6,
this.useGradient,
this.valueFormatter,
this.percentFormatter,
this.onStageTap,
this.tooltipBuilder,
this.emptyBuilder,
this.semanticLabel,
this.excludeFromSemantics = false,
this.animationDuration = const Duration(milliseconds: 700),
this.animationCurve = Curves.easeOutCubic,
}) : assert(height > 0),
assert(neckWidthFactor >= 0 && neckWidthFactor <= 1),
assert(stageGap >= 0),
assert(stageRadius >= 0);