RadialAxis constructor

RadialAxis({
  1. Key? key,
  2. double startAngle = 130,
  3. double endAngle = 50,
  4. double radiusFactor = 0.95,
  5. double centerX = 0.5,
  6. double centerY = 0.5,
  7. ValueChanged<AxisLabelCreatedArgs>? onLabelCreated,
  8. ValueChanged<double>? onAxisTapped,
  9. bool canRotateLabels = false,
  10. bool showFirstLabel = true,
  11. bool showLastLabel = false,
  12. bool canScaleToFit = false,
  13. ImageProvider<Object>? backgroundImage,
  14. List<GaugeRange>? ranges,
  15. List<GaugePointer>? pointers,
  16. List<GaugeAnnotation>? annotations,
  17. double minimum = 0,
  18. double maximum = 100,
  19. double? interval,
  20. double minorTicksPerInterval = 1,
  21. bool showLabels = true,
  22. bool showAxisLine = true,
  23. bool showTicks = true,
  24. double tickOffset = 0,
  25. double labelOffset = 15,
  26. bool isInversed = false,
  27. int maximumLabels = 3,
  28. bool useRangeColorForAxis = false,
  29. String? labelFormat,
  30. NumberFormat? numberFormat,
  31. GaugeAxisRendererFactory? onCreateAxisRenderer,
  32. ElementsPosition ticksPosition = ElementsPosition.inside,
  33. ElementsPosition labelsPosition = ElementsPosition.inside,
  34. GaugeSizeUnit offsetUnit = GaugeSizeUnit.logicalPixel,
  35. GaugeTextStyle? axisLabelStyle,
  36. AxisLineStyle? axisLineStyle,
  37. MajorTickStyle? majorTickStyle,
  38. MinorTickStyle? minorTickStyle,
})

Create RadialAxis with the default or required scale range and customized axis properties.

The arguments minimum, maximum, startAngle, endAngle, radiusFactor, centerX, centerY, tickOffset and labelOffset must not be null. Additionally centerX, centerY must be non-negative and maximum must be greater than minimum.

Implementation

RadialAxis(
    {Key? key,
    this.startAngle = 130,
    this.endAngle = 50,
    this.radiusFactor = 0.95,
    this.centerX = 0.5,
    this.centerY = 0.5,
    this.onLabelCreated,
    this.onAxisTapped,
    this.canRotateLabels = false,
    this.showFirstLabel = true,
    this.showLastLabel = false,
    this.canScaleToFit = false,
    this.backgroundImage,
    this.ranges,
    this.pointers,
    this.annotations,
    this.minimum = 0,
    this.maximum = 100,
    this.interval,
    this.minorTicksPerInterval = 1,
    this.showLabels = true,
    this.showAxisLine = true,
    this.showTicks = true,
    this.tickOffset = 0,
    this.labelOffset = 15,
    this.isInversed = false,
    this.maximumLabels = 3,
    this.useRangeColorForAxis = false,
    this.labelFormat,
    NumberFormat? numberFormat,
    this.onCreateAxisRenderer,
    this.ticksPosition = ElementsPosition.inside,
    this.labelsPosition = ElementsPosition.inside,
    this.offsetUnit = GaugeSizeUnit.logicalPixel,
    GaugeTextStyle? axisLabelStyle,
    AxisLineStyle? axisLineStyle,
    MajorTickStyle? majorTickStyle,
    MinorTickStyle? minorTickStyle})
    : assert(
          radiusFactor >= 0, 'Radius factor must be a non-negative value.'),
      assert(centerX >= 0, 'Center X must be a non-negative value.'),
      assert(centerY >= 0, 'Center Y must be a non-negative value.'),
      assert(minimum < maximum, 'Maximum should be greater than minimum.'),
      axisLabelStyle = axisLabelStyle ?? const GaugeTextStyle(),
      axisLineStyle = axisLineStyle ?? const AxisLineStyle(),
      numberFormat = numberFormat ?? NumberFormat('#.##'),
      majorTickStyle = majorTickStyle ?? const MajorTickStyle(),
      minorTickStyle = minorTickStyle ?? const MinorTickStyle(),
      super(key: key);