Circular Label Position Provider
class CircularLabelPositionProvider(labelSpacing: Float, labelPlacement: PieLabelPlacement = PieLabelPlacement.External) : LabelPositionProvider
Places labels circularly around the outer perimeter of the pie, adjusting them vertically to not overlap with adjacent labels.
Parameters
label Spacing
A value greater than 1 specifying the distance from the center of the pie at which to place external labels relative to the overall diameter of the pie, where a value of 1 is at the outer edge of the pie. Values between 1.05 and 1.4 tend to work well depending on the size of the labels and overall pie diameter.
label Placement
Specifies the locations the labels may be placed, including within the slice or externally. @see PieLabelPlacement.
Functions
Link copied to clipboard
open override fun computeLabelPositions(pieDiameter: Float, holeSize: Float, placeables: List<Placeable>, pieSliceData: List<PieSliceData>): List<LabelPosition>
Computes ExternalLabelPosition for every pie slice for a given pieDiameter and list of label placeables.