SfLinearGauge constructor
SfLinearGauge({
- Key? key,
- double minimum = 0.0,
- double maximum = 100.0,
- double? interval,
- List<
LinearGaugeRange> ? ranges, - List<
LinearBarPointer> ? barPointers, - List<
LinearMarkerPointer> ? markerPointers, - LinearGaugeOrientation orientation = LinearGaugeOrientation.horizontal,
- bool isAxisInversed = false,
- bool isMirrored = false,
- bool animateAxis = false,
- bool animateRange = false,
- int animationDuration = 1000,
- bool showLabels = true,
- bool showAxisTrack = true,
- bool showTicks = true,
- int minorTicksPerInterval = 1,
- bool useRangeColorForAxis = false,
- double axisTrackExtent = 0,
- LinearLabelPosition labelPosition = LinearLabelPosition.inside,
- LinearElementPosition tickPosition = LinearElementPosition.inside,
- double tickOffset = 0,
- double labelOffset = 4,
- int maximumLabels = 3,
- NumberFormat? numberFormat,
- GenerateLabelsCallback? onGenerateLabels,
- ValueToFactorCallback? valueToFactorCallback,
- FactorToValueCallback? factorToValueCallback,
- LabelFormatterCallback? labelFormatterCallback,
- TextStyle? axisLabelStyle,
- LinearAxisTrackStyle? axisTrackStyle,
- LinearTickStyle? majorTickStyle,
- LinearTickStyle? minorTickStyle,
Creates a linear gauge
Implementation
SfLinearGauge(
{Key? key,
this.minimum = 0.0,
this.maximum = 100.0,
this.interval,
this.ranges,
this.barPointers,
this.markerPointers,
this.orientation = LinearGaugeOrientation.horizontal,
this.isAxisInversed = false,
this.isMirrored = false,
this.animateAxis = false,
this.animateRange = false,
this.animationDuration = 1000,
this.showLabels = true,
this.showAxisTrack = true,
this.showTicks = true,
this.minorTicksPerInterval = 1,
this.useRangeColorForAxis = false,
this.axisTrackExtent = 0,
this.labelPosition = LinearLabelPosition.inside,
this.tickPosition = LinearElementPosition.inside,
double tickOffset = 0,
double labelOffset = 4,
this.maximumLabels = 3,
NumberFormat? numberFormat,
this.onGenerateLabels,
this.valueToFactorCallback,
this.factorToValueCallback,
this.labelFormatterCallback,
this.axisLabelStyle,
LinearAxisTrackStyle? axisTrackStyle,
LinearTickStyle? majorTickStyle,
LinearTickStyle? minorTickStyle})
: assert(minimum <= maximum, 'Maximum should be greater than minimum.'),
axisTrackStyle = axisTrackStyle ?? const LinearAxisTrackStyle(),
tickOffset = tickOffset > 0 ? tickOffset : 0,
labelOffset = labelOffset > 0 ? labelOffset : 4,
majorTickStyle = majorTickStyle ?? const LinearTickStyle(length: 8.0),
minorTickStyle = minorTickStyle ?? const LinearTickStyle(),
numberFormat = numberFormat ?? NumberFormat('#.##'),
super(key: key);