Skip to main content
cngx-src documentation

BandScale

Interface

projects/common/chart/scales/band.ts

Import#

import { BandScale } from '@cngx/common/chart'

Description#

Pure-TS band scale. Maps a discrete categorical domain to evenly spaced positions along a numeric range. Each band reserves equal width; padding shrinks the band by a fraction of its slot.

Result is a callable carrying a bandwidth() method so layer atoms (<cngx-bar>, ...) can read both the position and the slot width.

by reference equality on lookup; pass primitives or stable refs. Default 0 (no gap). Range [0, 1). the band, with a bandwidth() method returning the band width. Lookup of an unknown value returns NaN.

Index#

Properties

Methods

Instance Properties#

Methods#

bandwidth#number