computeLabelPositions

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.

placeables and pieSliceData are ordered according to the data values provided to PieChart, and the returned List of ExternalLabelPosition must be in the same order.

This function may be called multiple times per composition as part of the process for maximizing the pie diameter and should not rely on the results of prior invocations or save state for use between invocations.

Parameters

holeSize

A relative size for an inner hole of the pie, creating a donut chart, with a value between 0 and 1. See PieChart.