ArcLabelDecorator<D> class

Renders labels for arc renderers.

This decorator performs very basic label collision detection. If the y position of a label positioned outside collides with the previously drawn label (on the same side of the chart), then that label will be skipped.

Implementers

Constructors

ArcLabelDecorator({TextStyleSpec? insideLabelStyleSpec, TextStyleSpec? outsideLabelStyleSpec, ArcLabelLeaderLineStyleSpec? leaderLineStyleSpec, ArcLabelPosition labelPosition = _defaultLabelPosition, int labelPadding = _defaultLabelPadding, bool showLeaderLines = _defaultShowLeaderLines, Color? leaderLineColor})

Properties

hashCode int
The hash code for this object.
no setterinherited
insideLabelStyleSpec TextStyleSpec
Configures TextStyleSpec for labels placed inside the arcs.
final
labelPadding int
Space before and after the label text.
final
labelPosition ArcLabelPosition
Configures where to place the label relative to the arcs.
final
leaderLineStyleSpec ArcLabelLeaderLineStyleSpec
Configures ArcLabelLeaderLineStyleSpec for leader lines for labels placed outside the arcs.
final
outsideLabelStyleSpec TextStyleSpec
Configures TextStyleSpec for labels placed outside the arcs.
final
renderAbove bool
Render the labels on top of series data.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
showLeaderLines bool
Whether or not to draw leader lines for labels placed outside the arcs.
final

Methods

calculateLabelPosition(TextElement labelElement, TextStyle labelStyle, int insideArcWidth, int outsideArcWidth, ArcRendererElement arcRendererelement, ArcLabelPosition labelPosition) ArcLabelPosition
decorate(List<ArcRendererElementList<D>> arcElementsList, ChartCanvas canvas, GraphicsFactory graphicsFactory, {required Rectangle<num> drawBounds, required double animationPercent, bool rtl = false}) → void
detectOutsideLabelCollision(num labelY, bool labelLeftOfChart, num? previousOutsideLabelY, bool? previousLabelLeftOfChart) bool
Detects whether the current outside label collides with the previous label.
getLabelRadius(ArcRendererElementList<D> arcElements) double
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited
updateCollisionDetectionParams(List<Object> params) → void

Operators

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