DateTimeCategoryAxis class

An axis which is used to plot date-time values. It is similar to DateTimeAxis except that it excludes missing dates.

This is a unique type of axis used mainly with financial series. Like CategoryAxis, all the data points are plotted with equal spaces by  removing space for missing dates. Intervals and ranges for the axis are  calculated similar to DateTimeAxis. There will be no visual gaps between  points even when the difference between two points is more than a year.

A simple use case of this axis type is when the user wishes to visualize the working hours on an employee for a month by excluding the weekends.

Provides options for label placement, interval, date format for customizing the appearance.

Inheritance

Constructors

DateTimeCategoryAxis({Key? key, String? name, bool isVisible = true, AxisTitle title = const AxisTitle(), AxisLine axisLine = const AxisLine(), ChartRangePadding rangePadding = ChartRangePadding.auto, EdgeLabelPlacement edgeLabelPlacement = EdgeLabelPlacement.none, ChartDataLabelPosition labelPosition = ChartDataLabelPosition.outside, TickPosition tickPosition = TickPosition.outside, int labelRotation = 0, AxisLabelIntersectAction labelIntersectAction = AxisLabelIntersectAction.hide, LabelAlignment labelAlignment = LabelAlignment.center, bool isInversed = false, bool opposedPosition = false, int maximumLabels = 3, MajorTickLines majorTickLines = const MajorTickLines(), MajorGridLines majorGridLines = const MajorGridLines(), TextStyle? labelStyle, double? plotOffset, double? plotOffsetStart, double? plotOffsetEnd, double initialZoomFactor = 1, double initialZoomPosition = 0, InteractiveTooltip interactiveTooltip = const InteractiveTooltip(), DateTime? minimum, DateTime? maximum, double? interval, DateTime? initialVisibleMinimum, DateTime? initialVisibleMaximum, dynamic crossesAt, String? associatedAxisName, bool placeLabelsNearAxisLine = true, List<PlotBand> plotBands = const <PlotBand>[], int? desiredIntervals, RangeController? rangeController, double? maximumLabelWidth, double? labelsExtent, LabelPlacement labelPlacement = LabelPlacement.betweenTicks, DateFormat? dateFormat, DateTimeIntervalType intervalType = DateTimeIntervalType.auto, DateTimeIntervalType autoScrollingDeltaType = DateTimeIntervalType.auto, int? autoScrollingDelta, double borderWidth = 0.0, Color? borderColor, AxisBorderType axisBorderType = AxisBorderType.rectangle, MultiLevelLabelStyle multiLevelLabelStyle = const MultiLevelLabelStyle(), MultiLevelLabelFormatterCallback? multiLevelLabelFormatter, List<DateTimeCategoricalMultiLevelLabel>? multiLevelLabels, AutoScrollingMode autoScrollingMode = AutoScrollingMode.end, ChartLabelFormatterCallback? axisLabelFormatter, dynamic onRendererCreated(DateTimeCategoryAxisController)?})
Creating an argument constructor of DateTimeCategoryAxis 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.
finalinherited
associatedAxisName String?
Axis line crossed on mentioned axis name, and applicable for plot band also.
finalinherited
autoScrollingDelta int?
The number of data points to be visible always in the chart.
finalinherited
autoScrollingDeltaType DateTimeIntervalType
Defines the type of delta value in the DateTime axis.
final
autoScrollingMode AutoScrollingMode
Determines whether the axis should be scrolled from the start position or end position.
finalinherited
axisBorderType AxisBorderType
Border type of the axis label.
finalinherited
axisLabelFormatter ChartLabelFormatterCallback?
Called while rendering each axis label in the chart.
finalinherited
axisLine AxisLine
Customizes the appearance of the axis line. The axis line is visible by default.
finalinherited
borderColor Color?
Border color of the axis label.
finalinherited
borderWidth double
Border width of the axis label.
finalinherited
crossesAt → dynamic
Customization to place the axis crossing on another axis based on the value.
finalinherited
dateFormat → DateFormat?
Formats the date-time category axis labels.
final
desiredIntervals int?
The number of intervals in an axis.
finalinherited
edgeLabelPlacement EdgeLabelPlacement
Position of the edge labels.
finalinherited
enableAutoIntervalOnZooming bool
Enables or disables the automatic interval while zooming.
finalinherited
hashCode int
The hash code for this object.
no setterinherited
initialVisibleMaximum DateTime?
The maximum visible value of the axis. The axis is rendered from this value initially, and it applies only during load time. The value will not be updated when zooming or panning.
final
initialVisibleMinimum DateTime?
The minimum visible value of the axis. The axis is rendered from this value initially, and it applies only during load time. The value will not be updated when zooming or panning.
final
initialZoomFactor double
Defines the percentage of the visible range from the total range of axis values. It applies only during load time and the value will not be updated when zooming or panning.
finalinherited
initialZoomPosition double
Defines the zoom position for the actual range of the axis. It applies only during load time and the value will not be updated when zooming or panning.
finalinherited
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.
finalinherited
interval double?
Axis interval value.
finalinherited
intervalType DateTimeIntervalType
Customizes the date-time category axis interval.
final
isInversed bool
Inverts the axis.
finalinherited
isVisible bool
Toggles the visibility of the axis.
finalinherited
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
labelAlignment LabelAlignment
Alignment of the labels.
finalinherited
labelIntersectAction AxisLabelIntersectAction
Axis labels intersecting action.
finalinherited
labelPlacement LabelPlacement
Position of the date-time category axis labels.
final
labelPosition ChartDataLabelPosition
Position of the labels.
finalinherited
labelRotation int
Angle for axis labels. The axis labels can be rotated to any angle.
finalinherited
labelsExtent double?
Specifies the fixed width for the axis labels. This width represents the space between axis line and axis title.
finalinherited
labelStyle TextStyle?
Customizes the appearance of the axis labels.
finalinherited
majorGridLines MajorGridLines
Customizes the appearance of the major grid lines.
finalinherited
majorTickLines MajorTickLines
Customizes the appearance of the major tick lines.
finalinherited
maximum DateTime?
Maximum value of the axis.
final
maximumLabels int
The maximum number of labels to be displayed in an axis in 100 logical pixels.
finalinherited
maximumLabelWidth double?
Specifies maximum text width for axis labels.
finalinherited
minimum DateTime?
Minimum value of the axis.
final
minorGridLines MinorGridLines
Customizes the appearance of the minor grid lines.
finalinherited
minorTickLines MinorTickLines
Customizes the appearance of the minor tick lines.
finalinherited
minorTicksPerInterval int
Interval of the minor ticks.
finalinherited
multiLevelLabelFormatter MultiLevelLabelFormatterCallback?
Called while rendering each multi-level label.
finalinherited
multiLevelLabels List<DateTimeCategoricalMultiLevelLabel>?
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.
finalinherited
name String?
Name of an axis.
finalinherited
onRendererCreated → dynamic Function(DateTimeCategoryAxisController)?
final
opposedPosition bool
Opposes the axis position.
finalinherited
placeLabelsNearAxisLine bool
Consider to place the axis label respect to near axis line.
finalinherited
plotBands List<PlotBand>
Render the plot band in axis.
finalinherited
plotOffset double?
The plotOffset property is used to offset the rendering of the axis at start and end position.
finalinherited
plotOffsetEnd double?
The plotOffsetEnd property is used to offset the rendering of the axis at end position.
finalinherited
plotOffsetStart double?
The plotOffsetStart property is used to offset the rendering of the axis at start position.
finalinherited
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.
finalinherited
rangePadding ChartRangePadding
Padding for minimum and maximum values in an axis.
finalinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
tickPosition TickPosition
Position of the tick lines.
finalinherited
title AxisTitle
Customizes the appearance of the axis title.
finalinherited

Methods

createElement() LeafRenderObjectElement
RenderObjectWidgets always inflate to a RenderObjectElement subclass.
inherited
createRenderer() → RenderDateTimeCategoryAxis
override
createRenderObject(BuildContext context) → RenderDateTimeCategoryAxis
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 RenderDateTimeCategoryAxis 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