AxisLabelContainer class
Subclass of LabelContainer is extended with member parentOffsetTick, which maintains the container's center position in immediate parent's coordinates.
This violates independence of parents not knowing and not needing their children; here, when used in parent XContainer, the parent is storing some of it's properties on children.
parentOffsetTick can be thought of as position of the "tick" showing the label's value on axis - the immediate parent decides whether this position represents X or Y.
Can be used by clients to create, layout, and center labels on X and Y axis, and the label's graph "ticks".
Generally, the owner (immediate parent) of this object decides what the parentOffsetTicks are:
- If owner is a YContainer, all positions are relative to the top of the container of y labels
- If owner is a XContainer All positions are relative to the left of the container of x labels
- If owner is Area
ChartContainer
, all positions are relative to the top of the availablechartArea
.
- Inheritance
-
- Object
- LabelContainer
- AxisLabelContainer
Constructors
- AxisLabelContainer({required String label, required double labelMaxWidth, required Matrix2 labelTiltMatrix, required LabelStyle labelStyle})
Properties
- enableSkipOnDistressedSize ↔ bool
-
If size constraints imposed by parent are too tight,
some internal calculations of sizes may lead to negative values,
making painting of this container not possible.
getter/setter pairinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- isDistressed ↔ bool
-
getter/setter pairinherited
- layoutSize ↔ Size
-
Manages the layout size during the layout process in layout.
Should be only mentioned in this class, not super
getter/setter pairinherited
- offset ↔ Offset
-
Current absolute offset, set by parent (and it's parent etc, to root).
getter/setter pairinherited
- offsetOfPotentiallyRotatedLabel ↔ Offset
-
Offset of this LabelContainer's label, created by the
_textPainter
.getter/setter pairinherited - parentOffsetTick ↔ double
-
UI coordinate of the "axis tick mark", which represent the
X or Y data value.
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- skipByParent ↔ bool
-
skipByParent instructs the parent container that this container should not be
painted or layed out - as if it collapsed to zero size.
getter/setter pairinherited
- tiltedLabelEnvelopeTopLeft → Offset
-
Position where paint starts painting the label, expressed
in the coordinate system in which this
_tiltedLabelEnvelope.envelopeRect
topLeft (NOT the _tiltedLabelEnvelope.topLeft) is at the origin.no setterinherited - tiltMatrix → Matrix2
-
Provides access to tiltMatrix for extension's paint methods.
no setterinherited
Methods
-
applyParentOffset(
Offset offset) → void -
Calls super method, then adds the passed
offset
to the locally-kept slot offsetOfPotentiallyRotatedLabel.inherited -
applyParentTiltMatrix(
Matrix2 tiltMatrix) → void -
Tilt may apply to the whole container.
todo-2 unused? move to base class? similar to offset?
inherited
-
layout(
LayoutExpansion parentLayoutExpansion) → void -
Lays out this LabelContainer.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
paint(
Canvas canvas) → void -
Implementor of method in superclass Container.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited