ScaleSpec
ScaleSpec =
object
Defined in: spec/scale.ts:54
One channel’s mapping from data values to visual positions.
Every field is optional: an omitted kind lets the renderer infer one from
the field’s type, and an omitted domain lets it read the extent off the
data. Nothing here is expressed in output units — see ScaleKind.
Properties
Section titled “Properties”
optionalbase?:number
Defined in: spec/scale.ts:72
Base for "log". Default 10.
clamp?
Section titled “clamp?”
optionalclamp?:boolean
Defined in: spec/scale.ts:66
Clamps out-of-domain values to the nearest bound instead of dropping them.
domain?
Section titled “domain?”
optionaldomain?: readonlyValue[]
Defined in: spec/scale.ts:60
Explicit domain. Absent means “derive it from the data”, which is what a renderer normally does.
exponent?
Section titled “exponent?”
optionalexponent?:number
Defined in: spec/scale.ts:70
Exponent for "pow". Default 1.
optionalkind?:ScaleKind
Defined in: spec/scale.ts:55
optionalnice?:boolean
Defined in: spec/scale.ts:64
Rounds a derived numeric domain outward to human-readable bounds.
padding?
Section titled “padding?”
optionalpadding?:number
Defined in: spec/scale.ts:74
Fraction of a band left empty between adjacent bands. 0 to 1.
reverse?
Section titled “reverse?”
optionalreverse?:boolean
Defined in: spec/scale.ts:68
Reverses the direction of the mapping.
scheme?
Section titled “scheme?”
optionalscheme?:ColorSchemeSpec
Defined in: spec/scale.ts:76
Colour channels only.
optionalzero?:boolean
Defined in: spec/scale.ts:62
Extends a derived numeric domain to include zero.