Skip to main content

Function: getScaleConfig()

getScaleConfig(config: unknown, axis: "x" | "y"): ValueOf<ChartScalesConfig>

Defined in: src/utils/chartUtils.ts:86

Safely get scale configuration, returning undefined when absent.

Parametersโ€‹

configโ€‹

unknown

Chart configuration.

axisโ€‹

Axis name ("x" or "y").

"x" | "y"

Returnsโ€‹

ValueOf<ChartScalesConfig>

Scale configuration or undefined when the scale is missing.