Skip to content

RadarLabelLayout

ClassChartGuruChartGuru
public static class RadarLabelLayout

Shared layout helper that builds the list of radar chart decoration labels (Y-axis ring tick values along the top spoke + X-axis spoke-tip category labels). Used at runtime by ChartGraphic and in the editor by the designer / inspector previews so both paths produce identical placement.

public const float RadiusFraction = 0.4

Radius ratio (plot-area min-extent * this) at which the radar polygon outer ring is drawn. Must match ChartRenderer.Special.RenderRadarGL.

Returns

System.Single — No return description is available.

public static void Build(Chart chart, List<ChartTextManager.RadarLabelInfo> output, float fontHeight = 12, float pointSymbolRadius = 0)

Populates output with the tick + category labels for a radar chart. Clears output first. Does nothing when the chart is invalid or has fewer than 3 marks. Uses chart.PlotArea (Cartesian / Y-up).

Parameters

Name Type Description
chart ChartGuru.Chart
output System.Collections.Generic.List{ChartGuru.ChartTextManager.RadarLabelInfo}
fontHeight System.Single
pointSymbolRadius System.Single

Build(Chart, Rect, bool, List, float, float)

Section titled “Build(Chart, Rect, bool, List, float, float)”
public static void Build(Chart chart, Rect plotArea, bool yIncreasesDownward, List<ChartTextManager.RadarLabelInfo> output, float fontHeight = 12, float pointSymbolRadius = 0)

Plot-area-explicit overload used by editor overlay drawing paths that compute the plot area in GUI coordinates (Y increases downward). The sign flip on yIncreasesDownward ensures the top spoke remains visually at the top of the chart in both systems.

Parameters

Name Type Description
chart ChartGuru.Chart
plotArea UnityEngine.Rect
yIncreasesDownward System.Boolean
output System.Collections.Generic.List{ChartGuru.ChartTextManager.RadarLabelInfo}
fontHeight System.Single
pointSymbolRadius System.Single
public static ChartTextAlignment ResolveAlignment(float cos, float sin)

Picks a ChartGuru.ChartTextAlignment so the text’s anchor sits on the edge of the glyph rectangle that faces the chart centre. Vertical-ish spokes keep the historical MiddleCenter alignment (the renderer’s coordinate system flips make the alternative pivots land on the wrong side); the extra breathing room comes from the font-height-aware label radius instead.

Parameters

Name Type Description
cos System.Single
sin System.Single

Returns

ChartGuru.ChartTextAlignment — No return description is available.