SimpleStepChart constructor
const
SimpleStepChart({
- Key? key,
- required List<
SimpleTrendSeries> series, - SimpleTrendChartStyle style = SimpleTrendChartStyle.elegant,
- SimpleStepChartMode mode = SimpleStepChartMode.after,
- double? minValue,
- double? maxValue,
- double height = 240,
- EdgeInsets padding = _defaultPadding,
- Color? lineColor,
- Color? fillColor,
- Color? gridColor,
- Color? axisColor,
- Color? activeColor,
- TextStyle? labelStyle,
- TextStyle? valueStyle,
- bool includeZero = false,
- bool showGrid = true,
- bool showDots = true,
- bool showValues = true,
- bool showArea = false,
- bool showLegend = true,
- bool showTooltip = true,
- bool showActiveStep = true,
- List<
SimpleChartReferenceLine> referenceLines = const [], - List<
SimpleChartReferenceBand> referenceBands = const [], - double? strokeWidth,
- double? dotRadius,
- double? fillOpacity,
- int gridLineCount = 4,
- SimpleTrendValueFormatter? valueFormatter,
- SimpleTrendPointTapCallback? onPointTap,
- SimpleTrendTooltipBuilder? tooltipBuilder,
- WidgetBuilder? emptyBuilder,
- String? semanticLabel,
- bool excludeFromSemantics = false,
- Duration animationDuration = const Duration(milliseconds: 700),
- Curve animationCurve = Curves.easeOutCubic,
Implementation
const SimpleStepChart({
super.key,
required this.series,
this.style = SimpleTrendChartStyle.elegant,
this.mode = SimpleStepChartMode.after,
this.minValue,
this.maxValue,
this.height = 240,
this.padding = _defaultPadding,
this.lineColor,
this.fillColor,
this.gridColor,
this.axisColor,
this.activeColor,
this.labelStyle,
this.valueStyle,
this.includeZero = false,
this.showGrid = true,
this.showDots = true,
this.showValues = true,
this.showArea = false,
this.showLegend = true,
this.showTooltip = true,
this.showActiveStep = true,
this.referenceLines = const [],
this.referenceBands = const [],
this.strokeWidth,
this.dotRadius,
this.fillOpacity,
this.gridLineCount = 4,
this.valueFormatter,
this.onPointTap,
this.tooltipBuilder,
this.emptyBuilder,
this.semanticLabel,
this.excludeFromSemantics = false,
this.animationDuration = const Duration(milliseconds: 700),
this.animationCurve = Curves.easeOutCubic,
}) : assert(height > 0),
assert(gridLineCount >= 2),
assert(strokeWidth == null || strokeWidth > 0),
assert(dotRadius == null || dotRadius >= 0),
assert(fillOpacity == null || (fillOpacity >= 0 && fillOpacity <= 1));