RadialLabelPositioner
public class RadialLabelPositionerLabel positioning for radial charts (pie, donut) with collision avoidance. Places labels outside the chart with leader lines connecting to slices.
Fields
Section titled “Fields”
CenteredAutoMinSlicePercent
Section titled “CenteredAutoMinSlicePercent”public const float CenteredAutoMinSlicePercent = 0.05No description is available for this member.
Returns
System.Single — No return description is available.
Constructors
Section titled “Constructors”
RadialLabelPositioner()
Section titled “RadialLabelPositioner()”public RadialLabelPositioner()No description is available for this member.
RadialLabelPositioner(Config)
Section titled “RadialLabelPositioner(Config)”public RadialLabelPositioner(RadialLabelPositioner.Config config)No description is available for this member.
Parameters
| Name | Type | Description |
|---|---|---|
config |
ChartGuru.RadialLabelPositioner.Config |
Methods
Section titled “Methods”
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.
GetInlineLabelRadius(float, float)
Section titled “GetInlineLabelRadius(float, float)”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.
SetConfig(Config)
Section titled “SetConfig(Config)”public void SetConfig(RadialLabelPositioner.Config config)Updates the configuration.
Parameters
| Name | Type | Description |
|---|---|---|
config |
ChartGuru.RadialLabelPositioner.Config | |
CalculateOptimalRadiusScale(List, float)
Section titled “CalculateOptimalRadiusScale(List, float)”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).
ClampToBounds(List)
Section titled “ClampToBounds(List)”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} | |
ClampToBounds(List, int)
Section titled “ClampToBounds(List, int)”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 |