SimpleRangeChart constructor
const
SimpleRangeChart({
- Key? key,
- required List<
SimpleRangeChartData> data, - SimpleBarChartOrientation orientation = SimpleBarChartOrientation.horizontal,
- SimpleBarChartStyle style = SimpleBarChartStyle.elegant,
- double? minValue,
- double? maxValue,
- double height = 260,
- EdgeInsets? padding,
- Color? rangeColor,
- Color? markerColor,
- Color? gridColor,
- Color? axisColor,
- Color? activeColor,
- TextStyle? labelStyle,
- TextStyle? valueStyle,
- bool showGrid = true,
- bool showLabels = true,
- bool showValues = true,
- bool showRangeLabels = true,
- bool showMarkers = true,
- bool showTooltip = true,
- bool showActiveRange = true,
- List<
SimpleChartReferenceLine> referenceLines = const [], - List<
SimpleChartReferenceBand> referenceBands = const [], - int gridLineCount = 4,
- double? rangeThickness,
- double? rangeRadius,
- double? markerRadius,
- SimpleRangeValueFormatter? valueFormatter,
- SimpleRangeTapCallback? onRangeTap,
- SimpleRangeTooltipBuilder? tooltipBuilder,
- WidgetBuilder? emptyBuilder,
- String? semanticLabel,
- bool excludeFromSemantics = false,
- Duration animationDuration = const Duration(milliseconds: 700),
- Curve animationCurve = Curves.easeOutCubic,
Implementation
const SimpleRangeChart({
super.key,
required this.data,
this.orientation = SimpleBarChartOrientation.horizontal,
this.style = SimpleBarChartStyle.elegant,
this.minValue,
this.maxValue,
this.height = 260,
this.padding,
this.rangeColor,
this.markerColor,
this.gridColor,
this.axisColor,
this.activeColor,
this.labelStyle,
this.valueStyle,
this.showGrid = true,
this.showLabels = true,
this.showValues = true,
this.showRangeLabels = true,
this.showMarkers = true,
this.showTooltip = true,
this.showActiveRange = true,
this.referenceLines = const [],
this.referenceBands = const [],
this.gridLineCount = 4,
this.rangeThickness,
this.rangeRadius,
this.markerRadius,
this.valueFormatter,
this.onRangeTap,
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(rangeThickness == null || rangeThickness > 0),
assert(rangeRadius == null || rangeRadius >= 0),
assert(markerRadius == null || markerRadius >= 0);