ChartAxis class abstract

This class holds the properties of ChartAxis.

Charts typically have two axes that are used to measure and categorize data: a vertical (Y) axis, and a horizontal (X) axis. Vertical(Y) axis always uses a numerical scale. Horizontal(X) axis supports Category, Numeric, Date-time, Logarithmic.

Provides the options for plotOffset, series visible, axis title, label padding, and alignment to customize the appearance.

Implementers

Constructors

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, double? borderWidth, Color? borderColor, AxisBorderType? axisBorderType, MultiLevelLabelStyle? multiLevelLabelStyle, MultiLevelLabelFormatterCallback? multiLevelLabelFormatter, List<ChartMultiLevelLabel>? multiLevelLabels, ChartLabelFormatterCallback? axisLabelFormatter})
Creating an argument constructor of ChartAxis class.

Properties

anchorRangeToVisiblePoints bool
Determines the value axis range, based on the visible data points or based on the overall data points available in chart.
final
associatedAxisName String?
Axis line crossed on mentioned axis name, and applicable for plot band also.
final
autoScrollingDelta int?
The number of data points to be visible always in the chart.
final
autoScrollingMode AutoScrollingMode
Determines whether the axis should be scrolled from the start position or end position.
final
axisBorderType AxisBorderType
Border type of the axis label.
final
axisLabelFormatter ChartLabelFormatterCallback?
Called while rendering each axis label in the chart.
final
axisLine AxisLine
Customizes the appearance of the axis line. The axis line is visible by default.
final
borderColor Color?
Border color of the axis label.
final
borderWidth double
Border width of the axis label.
final
crossesAt → dynamic
Customization to place the axis crossing on another axis based on the value.
final
desiredIntervals int?
The number of intervals in an axis.
final
edgeLabelPlacement EdgeLabelPlacement
Position of the edge labels.
final
enableAutoIntervalOnZooming bool
Enables or disables the automatic interval while zooming.
final
hashCode int
The hash code for this object.
no setterinherited
interactiveTooltip InteractiveTooltip
Customizes the crosshair and selection zooming tooltip. Tooltip displays the current axis value based on the crosshair position/selectionZoomRect position at an axis.
final
interval double?
Axis interval value.
final
isInversed bool
Inverts the axis.
final
isVisible bool
Toggles the visibility of the axis.
final
labelAlignment LabelAlignment
Alignment of the labels.
final
labelIntersectAction AxisLabelIntersectAction
Axis labels intersecting action.
final
labelPosition ChartDataLabelPosition
Position of the labels.
final
labelRotation int
Angle for axis labels. The axis labels can be rotated to any angle.
final
labelsExtent double?
Specifies the fixed width for the axis labels. This width represents the space between axis line and axis title.
final
labelStyle TextStyle
Customizes the appearance of the axis labels.
final
majorGridLines MajorGridLines
Customizes the appearance of the major grid lines.
final
majorTickLines MajorTickLines
Customizes the appearance of the major tick lines.
final
maximumLabels int
The maximum number of labels to be displayed in an axis in 100 logical pixels.
final
maximumLabelWidth double?
Specifies maximum text width for axis labels.
final
minorGridLines MinorGridLines
Customizes the appearance of the minor grid lines.
final
minorTickLines MinorTickLines
Customizes the appearance of the minor tick lines.
final
minorTicksPerInterval int
Interval of the minor ticks.
final
multiLevelLabelFormatter MultiLevelLabelFormatterCallback?
Called while rendering each multi-level label.
final
multiLevelLabels List<ChartMultiLevelLabel>?
Provides the option to group the axis labels. You can customize the start, end value of a multi-level label, text, and level of the multi-level labels.
final
multiLevelLabelStyle MultiLevelLabelStyle
Customize the multi-level label’s border color, width, type, and text style such as color, font size, etc.
final
name String?
Name of an axis.
final
opposedPosition bool
Opposes the axis position.
final
placeLabelsNearAxisLine bool
Consider to place the axis label respect to near axis line.
final
plotBands List<PlotBand>
Render the plot band in axis.
final
plotOffset double
Padding for plot area. The axis is rendered in chart with padding.
final
rangeController → RangeController?
The rangeController property is used to set the maximum and minimum values for the chart in the viewport. In the minimum and maximum properties of the axis, you can specify the minimum and maximum values with respect to the entire data source. In the visibleMinimum and visibleMaximum properties, you can specify the values to be viewed in the viewed port i.e. range controller's start and end values respectively.
final
rangePadding ChartRangePadding
Padding for minimum and maximum values in an axis.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
tickPosition TickPosition
Position of the tick lines.
final
title AxisTitle
Customizes the appearance of the axis title.
final
zoomFactor double
Zoom factor of an axis.
final
zoomPosition double
Position of the zoomed axis. The value ranges from 0 to 1.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited