SimpleHistogramChart constructor
const
SimpleHistogramChart({
- Key? key,
- List<
double> values = const [], - List<
SimpleHistogramBin> bins = const [], - int binCount = 8,
- SimpleHistogramScale scale = SimpleHistogramScale.count,
- SimpleBarChartStyle style = SimpleBarChartStyle.elegant,
- double? minValue,
- double? maxValue,
- double height = 260,
- EdgeInsets padding = _defaultPadding,
- List<
Color> ? palette, - Color? barColor,
- Color? curveColor,
- Color? meanColor,
- Color? medianColor,
- Color? gridColor,
- Color? axisColor,
- Color? activeBarColor,
- TextStyle? labelStyle,
- TextStyle? valueStyle,
- bool showGrid = true,
- bool showValues = true,
- bool showAxisLabels = true,
- bool showMean = true,
- bool showMedian = false,
- bool showDistributionCurve = false,
- bool showTooltip = true,
- bool showActiveBin = true,
- int gridLineCount = 4,
- double? barRadius,
- double? gapRatio,
- bool? useGradient,
- SimpleHistogramValueFormatter? valueFormatter,
- SimpleHistogramValueFormatter? countFormatter,
- SimpleHistogramValueFormatter? percentFormatter,
- SimpleHistogramTapCallback? onBinTap,
- SimpleHistogramTooltipBuilder? tooltipBuilder,
- WidgetBuilder? emptyBuilder,
- String? semanticLabel,
- bool excludeFromSemantics = false,
- Duration animationDuration = const Duration(milliseconds: 650),
- Curve animationCurve = Curves.easeOutCubic,
Implementation
const SimpleHistogramChart({
super.key,
this.values = const [],
this.bins = const [],
this.binCount = 8,
this.scale = SimpleHistogramScale.count,
this.style = SimpleBarChartStyle.elegant,
this.minValue,
this.maxValue,
this.height = 260,
this.padding = _defaultPadding,
this.palette,
this.barColor,
this.curveColor,
this.meanColor,
this.medianColor,
this.gridColor,
this.axisColor,
this.activeBarColor,
this.labelStyle,
this.valueStyle,
this.showGrid = true,
this.showValues = true,
this.showAxisLabels = true,
this.showMean = true,
this.showMedian = false,
this.showDistributionCurve = false,
this.showTooltip = true,
this.showActiveBin = true,
this.gridLineCount = 4,
this.barRadius,
this.gapRatio,
this.useGradient,
this.valueFormatter,
this.countFormatter,
this.percentFormatter,
this.onBinTap,
this.tooltipBuilder,
this.emptyBuilder,
this.semanticLabel,
this.excludeFromSemantics = false,
this.animationDuration = const Duration(milliseconds: 650),
this.animationCurve = Curves.easeOutCubic,
}) : assert(binCount > 0),
assert(height > 0),
assert(gridLineCount >= 2),
assert(barRadius == null || barRadius >= 0),
assert(gapRatio == null || (gapRatio >= 0 && gapRatio < 0.8));