SunburstArcLabelDecorator<D> class

Renders labels for sunburst arc renderers. Configures label based on arc's position via innerRingArcLabelPosition, innerRingLeafArcLabelPosition, and outerRingArcLabelPosition. Currently label for non-leaf arcs in the inner ring may only be drawn inside until there's better collision detection for inner arcs' label versus the outer arcs.

TODO: Improve label handling for sunburst chart.

Inheritance

Constructors

SunburstArcLabelDecorator({TextStyleSpec? insideLabelStyleSpec, TextStyleSpec? outsideLabelStyleSpec, ArcLabelLeaderLineStyleSpec? leaderLineStyleSpec, int labelPadding = 5, bool showLeaderLines = true, Color? leaderLineColor, bool extendLeaderLine = false, ArcLabelPosition innerRingArcLabelPosition = ArcLabelPosition.inside, ArcLabelPosition innerRingLeafArcLabelPosition = ArcLabelPosition.inside, ArcLabelPosition outerRingArcLabelPosition = ArcLabelPosition.auto})

Properties

extendLeaderLine bool
When set to true, extend the leader line to outside of the outer most ring to avoid collision between inner arc's label with outer arcs.
final
hashCode int
The hash code for this object.
no setterinherited
innerRingArcLabelPosition ArcLabelPosition
Configures the ArcLabelPosition for the non-leaf arcs in the inner ring. Label can only be rendered inside, If set to ArcLabelPosition.outside, label will not be rendered.
final
innerRingLeafArcLabelPosition ArcLabelPosition
Configures the ArcLabelPosition for the leaf arcs in the inner ring.
final
insideLabelStyleSpec TextStyleSpec
Configures TextStyleSpec for labels placed inside the arcs.
finalinherited
labelPadding int
Space before and after the label text.
finalinherited
labelPosition ArcLabelPosition
Configures where to place the label relative to the arcs.
finalinherited
leaderLineStyleSpec ArcLabelLeaderLineStyleSpec
Configures ArcLabelLeaderLineStyleSpec for leader lines for labels placed outside the arcs.
finalinherited
outerRingArcLabelPosition ArcLabelPosition
Configures the ArcLabelPosition for the arcs in the outer most ring.
final
outsideLabelStyleSpec TextStyleSpec
Configures TextStyleSpec for labels placed outside the arcs.
finalinherited
renderAbove bool
Render the labels on top of series data.
finalinherited
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.
finalinherited

Methods

calculateLabelPosition(TextElement labelElement, TextStyle labelStyle, int insideArcWidth, int outsideArcWidth, ArcRendererElement arcRendererElement, ArcLabelPosition labelPosition) ArcLabelPosition
override
decorate(List<ArcRendererElementList<D>> arcElementsList, ChartCanvas canvas, GraphicsFactory graphicsFactory, {required Rectangle<num> drawBounds, required double animationPercent, bool rtl = false}) → void
override
detectOutsideLabelCollision(num labelY, bool labelLeftOfChart, num? previousOutsideLabelY, bool? previousLabelLeftOfChart) bool
Detects whether the current outside label collides with the previous label.
override
getLabelRadius(ArcRendererElementList<D> arcElements) double
override
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
override

Operators

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