RadialAxis constructor
RadialAxis({
- Key? key,
- double startAngle = 130,
- double endAngle = 50,
- double radiusFactor = 0.95,
- double centerX = 0.5,
- double centerY = 0.5,
- ValueChanged<
AxisLabelCreatedArgs> ? onLabelCreated, - ValueChanged<
double> ? onAxisTapped, - bool canRotateLabels = false,
- bool showFirstLabel = true,
- bool showLastLabel = false,
- bool canScaleToFit = false,
- ImageProvider<
Object> ? backgroundImage, - List<
GaugeRange> ? ranges, - List<
GaugePointer> ? pointers, - List<
GaugeAnnotation> ? annotations, - double minimum = 0,
- double maximum = 100,
- double? interval,
- double minorTicksPerInterval = 1,
- bool showLabels = true,
- bool showAxisLine = true,
- bool showTicks = true,
- double tickOffset = 0,
- double labelOffset = 15,
- bool isInversed = false,
- int maximumLabels = 3,
- bool useRangeColorForAxis = false,
- String? labelFormat,
- NumberFormat? numberFormat,
- GaugeAxisRendererFactory? onCreateAxisRenderer,
- ElementsPosition ticksPosition = ElementsPosition.inside,
- ElementsPosition labelsPosition = ElementsPosition.inside,
- GaugeSizeUnit offsetUnit = GaugeSizeUnit.logicalPixel,
- GaugeTextStyle? axisLabelStyle,
- AxisLineStyle? axisLineStyle,
- MajorTickStyle? majorTickStyle,
- 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);