Skip to content

LogScaleHelper

ClassChartGuruChartGuru
public static class LogScaleHelper

Generates “nice” tick values for a logarithmic axis. Emits decade boundaries (powers of ChartGuru.AxisConfig.LogBase) inside the requested raw-data range, with optional intra-decade minor ticks (2, 3, … 9) when the axis only spans a small number of decades and there is room for them. The returned values are in raw data space — callers should run them through ChartGuru.AxisConfig.TransformValue(System.Single) to convert to plot-coordinate space.

public static List<float> GenerateTicks(float minRaw, float maxRaw, float logBase, int desiredCount)

Produces tick values for a log-scaled axis spanning minRaw through maxRaw. Both are in raw (un-transformed) space.

Parameters

Name Type Description
minRaw System.Single
maxRaw System.Single
logBase System.Single
desiredCount System.Int32 Hint for how many ticks to emit. Decades are always preferred; minor ticks are inserted only when the decade count is small enough that the requested count cannot be reached otherwise.

Returns

System.Collections.Generic.List{System.Single} — No return description is available.

GenerateTicks(float, float, float, int, List, List)

Section titled “GenerateTicks(float, float, float, int, List, List)”
public static void GenerateTicks(float minRaw, float maxRaw, float logBase, int desiredCount, List<float> result, List<float> minorScratch)

No description is available for this member.

Parameters

Name Type Description
minRaw System.Single
maxRaw System.Single
logBase System.Single
desiredCount System.Int32
result System.Collections.Generic.List{System.Single}
minorScratch System.Collections.Generic.List{System.Single}