Documentation / @ripl/charts / resolveSegmentLabelLayout
Function: resolveSegmentLabelLayout()
resolveSegmentLabelLayout(
geometry,labels,text,minAngle?):SegmentLabelLayout
Defined in: charts/src/core/labels.ts:287
Resolves a segment's label into a ready-to-render layout (inside centroid or outside leader line), honouring visibility, an optional minimum-angle clutter guard, and position/font/colour options. Shared by the pie and polar-area charts so their label behaviour is identical.
The connector always has ≥2 points (a degenerate line at the anchor when hidden or inside) so Polyline.getBoundingBox stays safe and renders nothing for non-outside labels.
Parameters
| Parameter | Type | Default value |
|---|---|---|
geometry | RadialLabelInput | undefined |
labels | ChartSegmentLabelsOptions | undefined |
text | string | undefined |
minAngle | number | 0 |