SfLinearGauge constructor

SfLinearGauge({
  1. Key? key,
  2. double minimum = 0.0,
  3. double maximum = 100.0,
  4. double? interval,
  5. List<LinearGaugeRange>? ranges,
  6. List<LinearBarPointer>? barPointers,
  7. List<LinearMarkerPointer>? markerPointers,
  8. LinearGaugeOrientation orientation = LinearGaugeOrientation.horizontal,
  9. bool isAxisInversed = false,
  10. bool isMirrored = false,
  11. bool animateAxis = false,
  12. bool animateRange = false,
  13. int animationDuration = 1000,
  14. bool showLabels = true,
  15. bool showAxisTrack = true,
  16. bool showTicks = true,
  17. int minorTicksPerInterval = 1,
  18. bool useRangeColorForAxis = false,
  19. double axisTrackExtent = 0,
  20. LinearLabelPosition labelPosition = LinearLabelPosition.inside,
  21. LinearElementPosition tickPosition = LinearElementPosition.inside,
  22. double tickOffset = 0,
  23. double labelOffset = 4,
  24. int maximumLabels = 3,
  25. NumberFormat? numberFormat,
  26. GenerateLabelsCallback? onGenerateLabels,
  27. ValueToFactorCallback? valueToFactorCallback,
  28. FactorToValueCallback? factorToValueCallback,
  29. LabelFormatterCallback? labelFormatterCallback,
  30. TextStyle? axisLabelStyle,
  31. LinearAxisTrackStyle? axisTrackStyle,
  32. LinearTickStyle? majorTickStyle,
  33. 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);