ChartAxis constructor
ChartAxis({
- String? name,
- double? plotOffset,
- bool? isVisible,
- bool? anchorRangeToVisiblePoints,
- AxisTitle? title,
- AxisLine? axisLine,
- ChartRangePadding? rangePadding,
- int? labelRotation,
- ChartDataLabelPosition? labelPosition,
- LabelAlignment? labelAlignment,
- TickPosition? tickPosition,
- MajorTickLines? majorTickLines,
- MinorTickLines? minorTickLines,
- TextStyle? labelStyle,
- AxisLabelIntersectAction? labelIntersectAction,
- int? desiredIntervals,
- MajorGridLines? majorGridLines,
- MinorGridLines? minorGridLines,
- int? maximumLabels,
- int? minorTicksPerInterval,
- bool? isInversed,
- bool? opposedPosition,
- EdgeLabelPlacement? edgeLabelPlacement,
- bool? enableAutoIntervalOnZooming,
- double? zoomFactor,
- double? zoomPosition,
- InteractiveTooltip? interactiveTooltip,
- double? interval,
- dynamic crossesAt,
- String? associatedAxisName,
- bool? placeLabelsNearAxisLine,
- List<
PlotBand> ? plotBands, - RangeController? rangeController,
- double? maximumLabelWidth,
- double? labelsExtent,
- int? autoScrollingDelta,
- AutoScrollingMode? autoScrollingMode,
Creating an argument constructor of ChartAxis class.
Implementation
ChartAxis({
this.name,
double? plotOffset,
bool? isVisible,
bool? anchorRangeToVisiblePoints,
AxisTitle? title,
AxisLine? axisLine,
ChartRangePadding? rangePadding,
int? labelRotation,
ChartDataLabelPosition? labelPosition,
LabelAlignment? labelAlignment,
TickPosition? tickPosition,
MajorTickLines? majorTickLines,
MinorTickLines? minorTickLines,
TextStyle? labelStyle,
AxisLabelIntersectAction? labelIntersectAction,
this.desiredIntervals,
MajorGridLines? majorGridLines,
MinorGridLines? minorGridLines,
int? maximumLabels,
int? minorTicksPerInterval,
bool? isInversed,
bool? opposedPosition,
EdgeLabelPlacement? edgeLabelPlacement,
bool? enableAutoIntervalOnZooming,
double? zoomFactor,
double? zoomPosition,
InteractiveTooltip? interactiveTooltip,
this.interval,
this.crossesAt,
this.associatedAxisName,
bool? placeLabelsNearAxisLine,
List<PlotBand>? plotBands,
this.rangeController,
double? maximumLabelWidth,
double? labelsExtent,
int? autoScrollingDelta,
AutoScrollingMode? autoScrollingMode,
}) : isVisible = isVisible ?? true,
anchorRangeToVisiblePoints = anchorRangeToVisiblePoints ?? true,
interactiveTooltip = interactiveTooltip ?? const InteractiveTooltip(),
isInversed = isInversed ?? false,
plotOffset = plotOffset ?? 0,
placeLabelsNearAxisLine = placeLabelsNearAxisLine ?? true,
opposedPosition = opposedPosition ?? false,
rangePadding = rangePadding ?? ChartRangePadding.auto,
labelRotation = labelRotation ?? 0,
labelPosition = labelPosition ?? ChartDataLabelPosition.outside,
labelAlignment = labelAlignment ?? LabelAlignment.center,
tickPosition = tickPosition ?? TickPosition.outside,
labelIntersectAction =
labelIntersectAction ?? AxisLabelIntersectAction.hide,
minorTicksPerInterval = minorTicksPerInterval ?? 0,
maximumLabels = maximumLabels ?? 3,
labelStyle = _getTextStyle(
textStyle: labelStyle,
fontSize: 12.0,
fontStyle: FontStyle.normal,
fontWeight: FontWeight.normal,
fontFamily: 'Normal'),
title = title ?? AxisTitle(),
axisLine = axisLine ?? const AxisLine(),
majorTickLines = majorTickLines ?? const MajorTickLines(),
minorTickLines = minorTickLines ?? const MinorTickLines(),
majorGridLines = majorGridLines ?? const MajorGridLines(),
minorGridLines = minorGridLines ?? const MinorGridLines(),
edgeLabelPlacement = edgeLabelPlacement ?? EdgeLabelPlacement.none,
zoomFactor = zoomFactor ?? 1,
zoomPosition = zoomPosition ?? 0,
enableAutoIntervalOnZooming = enableAutoIntervalOnZooming ?? true,
plotBands = plotBands ?? <PlotBand>[],
//ignore: prefer_initializing_formals
maximumLabelWidth = maximumLabelWidth,
//ignore: prefer_initializing_formals
labelsExtent = labelsExtent,
//ignore: prefer_initializing_formals
autoScrollingDelta = autoScrollingDelta,
autoScrollingMode = autoScrollingMode ?? AutoScrollingMode.end;