DefaultIterativeLabelLayoutStrategy class

Strategy of achieving that labels do not overlap ("fit") on an axis.

Currently only used on the X axis, this strategy defines a sequence of steps, each performing a specific strategy to achieve labels fit.

When the layout finds labels overlap, the following steps are taken to achieve "fit" of labels: LabelFitMethod.rotateLabels, LabelFitMethod.decreaseLabelFont and LabelFitMethod.skipLabels.

The steps are repeated at most maxLabelReLayouts times. If a "fit" is not achieved on last step, the last step is repeated until maxLabelReLayouts is reached.

Inheritance

Constructors

DefaultIterativeLabelLayoutStrategy({required ChartOptions options})
Constructor uses default values from ChartOptions

Properties

hashCode int
The hash code for this object.
no setterinherited
isRotateLabelsReLayout bool
Should return true if the layout strategy rotates labels during the current reLayout. This is needed by paint methods to rotate canvas.
no setteroverride
labelFontSize double
no setteroverride
labelTiltMatrix → Matrix2
Rotation matrix corresponding to the angle by which labels are tilted.
no setteroverride
labelTiltRadians double
In addition to the rotation matrices, hold on radians for canvas rotation.
no setteroverride
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
showEveryNthLabel int
Always showing first label, and after, label on every nth dimension point. Allows to "thin" labels to fit.
no setteroverride

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
onContainer(AdjustableLabelsChartAreaContainer adjustableLabelsContainer) → void
inherited
reLayout(LayoutExpansion parentLayoutExpansion) → void
Core of the auto layout strategy.
override
toString() String
A string representation of this object.
inherited

Operators

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