SimpleFanChart constructor
const
SimpleFanChart({
- Key? key,
- required List<
SimpleFanChartPoint> points, - SimpleTrendChartStyle style = SimpleTrendChartStyle.elegant,
- double? minValue,
- double? maxValue,
- double height = 250,
- EdgeInsets padding = _defaultPadding,
- String? valueLabel,
- Color? lineColor,
- Color? bandColor,
- Color? gridColor,
- Color? axisColor,
- Color? activeColor,
- List<
Color> ? palette, - TextStyle? labelStyle,
- TextStyle? valueStyle,
- bool includeZero = false,
- bool showGrid = true,
- bool showBands = true,
- bool showLine = true,
- bool showDots = true,
- bool showValues = false,
- bool showLegend = true,
- bool showTooltip = true,
- bool showActivePoint = true,
- bool showAxisLabels = true,
- List<
SimpleChartReferenceLine> referenceLines = const [], - List<
SimpleChartReferenceBand> referenceBands = const [], - int gridLineCount = 4,
- double strokeWidth = 2.4,
- double dotRadius = 3.6,
- double bandOpacity = 0.34,
- SimpleFanValueFormatter? valueFormatter,
- SimpleFanPointTapCallback? onPointTap,
- SimpleFanTooltipBuilder? tooltipBuilder,
- WidgetBuilder? emptyBuilder,
- String? semanticLabel,
- bool excludeFromSemantics = false,
- Duration animationDuration = const Duration(milliseconds: 750),
- Curve animationCurve = Curves.easeOutCubic,
Implementation
const SimpleFanChart({
super.key,
required this.points,
this.style = SimpleTrendChartStyle.elegant,
this.minValue,
this.maxValue,
this.height = 250,
this.padding = _defaultPadding,
this.valueLabel,
this.lineColor,
this.bandColor,
this.gridColor,
this.axisColor,
this.activeColor,
this.palette,
this.labelStyle,
this.valueStyle,
this.includeZero = false,
this.showGrid = true,
this.showBands = true,
this.showLine = true,
this.showDots = true,
this.showValues = false,
this.showLegend = true,
this.showTooltip = true,
this.showActivePoint = true,
this.showAxisLabels = true,
this.referenceLines = const [],
this.referenceBands = const [],
this.gridLineCount = 4,
this.strokeWidth = 2.4,
this.dotRadius = 3.6,
this.bandOpacity = 0.34,
this.valueFormatter,
this.onPointTap,
this.tooltipBuilder,
this.emptyBuilder,
this.semanticLabel,
this.excludeFromSemantics = false,
this.animationDuration = const Duration(milliseconds: 750),
this.animationCurve = Curves.easeOutCubic,
}) : assert(height > 0),
assert(gridLineCount >= 2),
assert(strokeWidth > 0),
assert(dotRadius >= 0),
assert(bandOpacity >= 0 && bandOpacity <= 1);