Skip to content

RadialLabelPositioner

ClassChartGuruChartGuru
public class RadialLabelPositioner

Label positioning for radial charts (pie, donut) with collision avoidance. Places labels outside the chart with leader lines connecting to slices.

public const float CenteredAutoMinSlicePercent = 0.05

No description is available for this member.

Returns

System.Single — No return description is available.

public RadialLabelPositioner()

No description is available for this member.

public RadialLabelPositioner(RadialLabelPositioner.Config config)

No description is available for this member.

Parameters

Name Type Description
config ChartGuru.RadialLabelPositioner.Config

RequiresExternalLabelSpace(PieLabelMode, IReadOnlyList, float)

Section titled “RequiresExternalLabelSpace(PieLabelMode, IReadOnlyList, float)”
public static bool RequiresExternalLabelSpace(PieLabelMode labelMode, IReadOnlyList<IChartMark> marks, float minSlicePercent = 0.05)

No description is available for this member.

Parameters

Name Type Description
labelMode ChartGuru.PieLabelMode
marks System.Collections.Generic.IReadOnlyList{ChartGuru.IChartMark}
minSlicePercent System.Single

Returns

System.Boolean — No return description is available.

public static float GetInlineLabelRadius(float outerRadius, float innerRadius)

No description is available for this member.

Parameters

Name Type Description
outerRadius System.Single
innerRadius System.Single

Returns

System.Single — No return description is available.

public void SetConfig(RadialLabelPositioner.Config config)

Updates the configuration.

Parameters

Name Type Description
config ChartGuru.RadialLabelPositioner.Config
public float CalculateOptimalRadiusScale(List<RadialLabelPositioner.SliceLabel> labels, float maxLabelWidth = 0)

Calculates the optimal pie radius that ensures all labels fit within bounds. Returns a scale factor (0-1) to apply to the original radius.

Parameters

Name Type Description
labels System.Collections.Generic.List{ChartGuru.RadialLabelPositioner.SliceLabel} The slice labels to position.
maxLabelWidth System.Single Maximum estimated label width.

Returns

System.Single — Scale factor to apply to the pie radius (1.0 = no scaling needed).

public void ClampToBounds(List<RadialLabelPositioner.PositionedLabel> labels)

Clamps positioned labels to fit within the configured bounds. Labels are moved inward horizontally and vertically to fit. Leader line endpoints are adjusted to match.

Parameters

Name Type Description
labels System.Collections.Generic.List{ChartGuru.RadialLabelPositioner.PositionedLabel}
public void ClampToBounds(List<RadialLabelPositioner.PositionedLabel> labels, int startIndex)

No description is available for this member.

Parameters

Name Type Description
labels System.Collections.Generic.List{ChartGuru.RadialLabelPositioner.PositionedLabel}
startIndex System.Int32