BaseTickDrawStrategy<D> class abstract

Base strategy that draws tick labels and checks for label collisions.

Implemented types

Constructors

BaseTickDrawStrategy(ChartContext chartContext, GraphicsFactory graphicsFactory, {TextStyleSpec? labelStyleSpec, LineStyleSpec? axisLineStyleSpec, TickLabelAnchor? labelAnchor, TickLabelJustification? labelJustification, int? labelOffsetFromAxisPx, int? labelCollisionOffsetFromAxisPx, int? labelOffsetFromTickPx, int? labelCollisionOffsetFromTickPx, int? minimumPaddingBetweenLabelsPx, int? labelRotation, int? labelCollisionRotation})

Properties

axisLineStyle LineStyle
getter/setter pair
chartContext ChartContext
final
graphicsFactory GraphicsFactory
final
hashCode int
The hash code for this object.
no setterinherited
labelStyle TextStyle
getter/setter pair
minimumPaddingBetweenLabelsPx int
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
tickLabelJustification TickLabelJustification
getter/setter pair

Methods

calculateHeightForRotatedLabel(int rotation, double labelHeight, double labelLength) double
Returns the height of a rotated labels on a domain axis.
calculateWidthForRotatedLabel(int rotation, double labelHeight, double labelLength) double
Returns the width of a rotated labels on a domain axis.
collides(List<Tick<D>>? ticks, AxisOrientation? orientation) → CollisionReport<D>
Returns a CollisionReport indicating if there are any collisions.
override
decorateTicks(List<Tick<D>> ticks) → void
Decorate the existing list of ticks.
override
draw(ChartCanvas canvas, Tick<D> tick, {required AxisOrientation orientation, required Rectangle<int> axisBounds, required Rectangle<int> drawAreaBounds, required bool isFirst, required bool isLast, bool collision = false}) → void
Draws tick onto ChartCanvas.
inherited
drawAxisLine(ChartCanvas canvas, AxisOrientation orientation, Rectangle<int> axisBounds) → void
override
drawLabel(ChartCanvas canvas, Tick<D> tick, {required AxisOrientation orientation, required Rectangle<int> axisBounds, required Rectangle<int>? drawAreaBounds, required bool isFirst, required bool isLast, bool collision = false}) → void
getLabelHeight(Iterable<TextElement> labelElements) double
The height of the label (handles labels spanning multiple lines).
getLabelWidth(Iterable<TextElement> labelElements) double
The width of the label (handles labels spanning multiple lines).
labelOffsetFromAxisPx({required bool collision}) int
labelOffsetFromTickPx({required bool collision}) int
labelRotation({required bool collision}) int
measureHorizontallyDrawnTicks(List<Tick<D>> ticks, int maxWidth, int maxHeight, {bool collision = false}) ViewMeasuredSizes
Returns measurement of ticks drawn horizontally.
override
measureVerticallyDrawnTicks(List<Tick<D>> ticks, int maxWidth, int maxHeight, {bool collision = false}) ViewMeasuredSizes
Returns measurement of ticks drawn vertically.
override
normalizeVerticalAnchor(TickLabelAnchor anchor, bool isFirst, bool isLast) → _PixelVerticalDirection
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
splitLabel(TextElement wholeLabel) List<TextElement>
The wholeLabel is split into constituent chunks if it is multiline.
tickLabelAnchor({required bool collision}) TickLabelAnchor
toString() String
A string representation of this object.
inherited
updateTickWidth(List<Tick<D>> ticks, int maxWidth, int maxHeight, AxisOrientation orientation, {bool collision = false}) → void
Updates max tick width to match fit max size.
override

Operators

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

Static Properties

multiLineLabelPadding int
final