SimpleFrequencyPolygonChart constructor
const
SimpleFrequencyPolygonChart({
- Key? key,
- List<
double> values = const [], - List<
SimpleFrequencyPolygonSeries> series = const [], - int binCount = 8,
- SimpleFrequencyPolygonScale scale = SimpleFrequencyPolygonScale.count,
- SimpleTrendChartStyle style = SimpleTrendChartStyle.elegant,
- double? minValue,
- double? maxValue,
- double? minFrequency,
- double? maxFrequency,
- double height = 250,
- EdgeInsets padding = _defaultPadding,
- Color? lineColor,
- Color? fillColor,
- Color? gridColor,
- Color? axisColor,
- TextStyle? labelStyle,
- TextStyle? valueStyle,
- bool includeZero = true,
- bool showGrid = true,
- bool showDots = true,
- bool showValues = false,
- bool showArea = false,
- bool showLegend = true,
- bool showTooltip = true,
- bool? smooth = false,
- double? strokeWidth,
- double? dotRadius,
- double? fillOpacity,
- int gridLineCount = 4,
- List<
SimpleChartReferenceLine> referenceLines = const [], - List<
SimpleChartReferenceBand> referenceBands = const [], - SimpleFrequencyPolygonValueFormatter? valueFormatter,
- SimpleFrequencyPolygonValueFormatter? frequencyFormatter,
- SimpleFrequencyPolygonTapCallback? onBinTap,
- SimpleFrequencyPolygonTooltipBuilder? tooltipBuilder,
- WidgetBuilder? emptyBuilder,
- String? semanticLabel,
- bool excludeFromSemantics = false,
- Duration animationDuration = const Duration(milliseconds: 700),
- Curve animationCurve = Curves.easeOutCubic,
Implementation
const SimpleFrequencyPolygonChart({
super.key,
this.values = const [],
this.series = const [],
this.binCount = 8,
this.scale = SimpleFrequencyPolygonScale.count,
this.style = SimpleTrendChartStyle.elegant,
this.minValue,
this.maxValue,
this.minFrequency,
this.maxFrequency,
this.height = 250,
this.padding = _defaultPadding,
this.lineColor,
this.fillColor,
this.gridColor,
this.axisColor,
this.labelStyle,
this.valueStyle,
this.includeZero = true,
this.showGrid = true,
this.showDots = true,
this.showValues = false,
this.showArea = false,
this.showLegend = true,
this.showTooltip = true,
this.smooth = false,
this.strokeWidth,
this.dotRadius,
this.fillOpacity,
this.gridLineCount = 4,
this.referenceLines = const [],
this.referenceBands = const [],
this.valueFormatter,
this.frequencyFormatter,
this.onBinTap,
this.tooltipBuilder,
this.emptyBuilder,
this.semanticLabel,
this.excludeFromSemantics = false,
this.animationDuration = const Duration(milliseconds: 700),
this.animationCurve = Curves.easeOutCubic,
}) : assert(binCount > 0),
assert(height > 0),
assert(gridLineCount >= 2),
assert(strokeWidth == null || strokeWidth > 0),
assert(dotRadius == null || dotRadius >= 0),
assert(fillOpacity == null || (fillOpacity >= 0 && fillOpacity <= 1));