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.

Inheritance
Implementers

Constructors

ChartAxis({Key? key, String? name, double plotOffset = 0, bool isVisible = true, bool anchorRangeToVisiblePoints = true, AxisTitle title = const AxisTitle(), AxisLine axisLine = const AxisLine(), ChartRangePadding rangePadding = ChartRangePadding.auto, int labelRotation = 0, ChartDataLabelPosition labelPosition = ChartDataLabelPosition.outside, LabelAlignment labelAlignment = LabelAlignment.center, TickPosition tickPosition = TickPosition.outside, MajorTickLines majorTickLines = const MajorTickLines(), MinorTickLines minorTickLines = const MinorTickLines(), TextStyle? labelStyle, AxisLabelIntersectAction labelIntersectAction = AxisLabelIntersectAction.hide, int? desiredIntervals, MajorGridLines majorGridLines = const MajorGridLines(), MinorGridLines minorGridLines = const MinorGridLines(), int maximumLabels = 3, int minorTicksPerInterval = 0, bool isInversed = false, bool opposedPosition = false, EdgeLabelPlacement edgeLabelPlacement = EdgeLabelPlacement.none, bool enableAutoIntervalOnZooming = true, double initialZoomFactor = 1, double initialZoomPosition = 0, InteractiveTooltip interactiveTooltip = const InteractiveTooltip(), double? interval, dynamic crossesAt, String? associatedAxisName, bool placeLabelsNearAxisLine = true, List<PlotBand> plotBands = const <PlotBand>[], RangeController? rangeController, double? maximumLabelWidth, double? labelsExtent, int? autoScrollingDelta, AutoScrollingMode autoScrollingMode = AutoScrollingMode.end, double borderWidth = 0.0, Color? borderColor, AxisBorderType axisBorderType = AxisBorderType.rectangle, MultiLevelLabelStyle multiLevelLabelStyle = const MultiLevelLabelStyle(), MultiLevelLabelFormatterCallback? multiLevelLabelFormatter, ChartLabelFormatterCallback? axisLabelFormatter})
Creating an argument constructor of ChartAxis class.
const

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
initialZoomFactor double
Zoom factor of an axis.
final
initialZoomPosition double
Position of the zoomed axis. The value ranges from 0 to 1.
final
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
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
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
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

Methods

createElement() LeafRenderObjectElement
RenderObjectWidgets always inflate to a RenderObjectElement subclass.
inherited
createRenderer() → RenderChartAxis
createRenderObject(BuildContext context) → RenderChartAxis
Creates an instance of the RenderObject class that this RenderObjectWidget represents, using the configuration described by this RenderObjectWidget.
override
debugDescribeChildren() List<DiagnosticsNode>
Returns a list of DiagnosticsNode objects describing this node's children.
inherited
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
inherited
didUnmountRenderObject(covariant RenderObject renderObject) → void
A render object previously associated with this widget has been removed from the tree. The given RenderObject will be of the same type as returned by this object's createRenderObject.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toDiagnosticsNode({String? name, DiagnosticsTreeStyle? style}) DiagnosticsNode
Returns a debug representation of the object that is used by debugging tools and by DiagnosticsNode.toStringDeep.
inherited
toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) String
A string representation of this object.
inherited
toStringDeep({String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug}) String
Returns a string representation of this node and its descendants.
inherited
toStringShallow({String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) String
Returns a one-line detailed description of the object.
inherited
toStringShort() String
A short, textual description of this widget.
inherited
updateRenderObject(BuildContext context, covariant RenderChartAxis renderObject) → void
Copies the configuration described by this RenderObjectWidget to the given RenderObject, which will be of the same type as returned by this object's createRenderObject.
override

Operators

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