Skip to content

IScaleTransformer

InterfaceChartGuruChartGuru
public interface IScaleTransformer

Pluggable axis scale transformer. Swift Charts equivalent: ScaleTransformer (used by ChartXScale(transformer:) / ChartYScale(transformer:)).

When an ChartGuru.AxisConfig.CustomScaleTransformer is assigned, it overrides the built-in ChartGuru.AxisScaleType branches inside ChartGuru.AxisConfig.TransformValue(System.Single) / ChartGuru.AxisConfig.InverseTransformValue(System.Single). Implementations must be deterministic, allocation-free, and have Inverse(Forward(x)) ≈ x across the working domain.

float Forward(float value)

Map a raw data value into transformed (axis-coordinate) space.

Parameters

Name Type Description
value System.Single

Returns

System.Single — No return description is available.

float Inverse(float transformed)

Inverse of ChartGuru.IScaleTransformer.Forward(System.Single).

Parameters

Name Type Description
transformed System.Single

Returns

System.Single — No return description is available.

float[] SuggestTicks(float rawMin, float rawMax, int desiredCount)

Optional tick suggestion for non-uniform scales. May return null to fall back to the built-in linear tick generator (which the engine will run against the transformed domain). When non-null, the values are interpreted in raw data space.

Parameters

Name Type Description
rawMin System.Single
rawMax System.Single
desiredCount System.Int32

Returns

System.Single[] — No return description is available.