Skip to content

Documentation / @ripl/core / DivergingScaleOptions

Interface: DivergingScaleOptions

Defined in: packages/core/src/scales/diverging.ts:20

Options for a diverging scale, adding a midpoint to the base linear scale options.

Extends

Properties

PropertyTypeDescriptionInherited fromDefined in
clamp?booleanConstrains mapped values to the range bounds, so out-of-domain inputs never overshoot.LinearScaleOptions.clamppackages/core/src/scales/_base/index.ts:38
midpoint?numberThe domain value that maps to the centre of the range. Defaults to the domain's midpoint.-packages/core/src/scales/diverging.ts:22
nice?number | booleanExpand the domain to round, tick-aligned boundaries at construction. true uses ~10 ticks; a number sets the target tick count. This is a construction-time option by design — scales stay plain callable objects with no chained .nice() method.LinearScaleOptions.nicepackages/core/src/scales/_base/index.ts:46
padToTicks?number | booleanExpands the mapping domain to tick-aligned boundaries. true uses ~10 ticks; a number sets the target tick count.LinearScaleOptions.padToTickspackages/core/src/scales/_base/index.ts:40