Skip to content

RadarDomainHelper

ClassChartGuruChartGuru
public static class RadarDomainHelper

Shared helper that resolves the radial-axis upper bound used to normalize radar-mark values into the [0..1] polygon radius. Mirrors the “extend display domain” behaviour applied to Cartesian charts: when the user has not supplied an explicit Y-axis domain, the data maximum is pushed up to a “nice” round value so the polygon never grazes the outer ring. This keeps numeric data labels (drawn at the data-point radius) from overlapping the spoke-tip category labels (drawn just outside the outer ring).

Used by: • ChartRenderer.RenderRadarGL — polygon geometry • ChartLayoutEngine.ComputeRadarDataLabels — data-label anchors • RadarLabelLayout.Build — ring tick labels All three must agree on the radial max so labels stay visually aligned with the polygon.

public static float ResolveRadialMax(Chart chart)

Returns the value that should map to the outer polygon ring (radius * 1.0). Honours an explicit Y-axis domain when supplied; otherwise returns a nice-rounded ceiling that leaves visible headroom above the data max. Always returns a strictly-positive value.

Parameters

Name Type Description
chart ChartGuru.Chart

Returns

System.Single — No return description is available.

public static float ComputeNiceCeiling(float dataMax)

Picks a “nice” upper bound >= dataMax such that the data sits at roughly <= 85% of the outer ring, then snapped up to a clean multiple (1, 1.25, 1.5, 2, 2.5, 3, 4, 5, 6, 8, 10) of a power of ten. Public for unit-testability.

Parameters

Name Type Description
dataMax System.Single

Returns

System.Single — No return description is available.