Skip to content

@graphty/graphty-element / session / BindingPreview

Interface: BindingPreview ​

Defined in: graphty-element/src/session/styles/encoding.ts:2257

What a binding would paint, read before it is written: the bins of its scale with their counts and what each paints, its step bounds, and the elements it leaves at the ends or has no place for. Every figure comes from the same preparation the repaint runs, so a written layer paints what its preview showed.

Since ​

3.26.0

Properties ​

above ​

readonly above: number

Defined in: graphty-element/src/session/styles/encoding.ts:2283

How many elements carry a number above the domain, painted as its upper end.


below ​

readonly below: number

Defined in: graphty-element/src/session/styles/encoding.ts:2281

How many elements carry a number below the domain, painted as its lower end.


bins ​

readonly bins: readonly BindingPreviewBin[]

Defined in: graphty-element/src/session/styles/encoding.ts:2270

The bins, lowest first. A numeric scale's bins are equal stretches of the scale's own space (equal ratios on a logarithmic scale), or of the data's units on a stepped one; a scale of categories has one bin per category, largest first, then the ones folded into "other".


channel ​

readonly channel: Channel

Defined in: graphty-element/src/session/styles/encoding.ts:2259

The channel it would paint.


defaulted ​

readonly defaulted: readonly PreviewDefaultedPart[]

Defined in: graphty-element/src/session/styles/encoding.ts:2305

The parts of the binding the element filled in because the binding left them out: the palette (a session default), the scale (linear), the domain (the data's extent) and the range (the channel's default output). A part the binding names is never listed.

Since ​

3.26.0


domain ​

readonly domain: readonly [number, number] | null

Defined in: graphty-element/src/session/styles/encoding.ts:2263

The extent it reads values against, in the data's units; null for a scale of categories.


endPercentiles ​

readonly endPercentiles: readonly [number, number] | null

Defined in: graphty-element/src/session/styles/encoding.ts:2314

Where the domain's ends sit in the data, as percentiles from 0 to 100: the share of the numbers below the lower end, and the share at or below the upper end. Null for a scale of categories or a column with no numbers.

Since ​

3.26.0


endTies ​

readonly endTies: readonly [number, number] | null

Defined in: graphty-element/src/session/styles/encoding.ts:2320

How many elements carry exactly the value at each end of the domain. A large count means moving a percentile end a little moves nothing: the tie is the reason.

Since ​

3.26.0


extent ​

readonly extent: readonly [number, number] | null

Defined in: graphty-element/src/session/styles/encoding.ts:2307

The values' own extent, lowest and highest number carried; null when none is a number.

Since ​

3.26.0


noValue ​

readonly noValue: number

Defined in: graphty-element/src/session/styles/encoding.ts:2285

How many elements carry no value (absent or null).


noValuePaints ​

readonly noValuePaints: EncodedValue | null

Defined in: graphty-element/src/session/styles/encoding.ts:2292

What an element with no value is painted, or null when it is left to the layers beneath.


outsideScale ​

readonly outsideScale: number

Defined in: graphty-element/src/session/styles/encoding.ts:2290

How many elements carry a value the scale has no place for: text on a numeric scale, or zero and below on a logarithmic one.


palette ​

readonly palette: PaletteId | null

Defined in: graphty-element/src/session/styles/encoding.ts:2298

The palette painting a colour channel: a catalogue palette's id, "custom" for a binding carrying its own stops, null on a channel that carries no colour.

Since ​

3.26.0


scale ​

readonly scale: string

Defined in: graphty-element/src/session/styles/encoding.ts:2261

The scale it reads through: a built-in scale's name, or a registered one's.


stepCounts ​

readonly stepCounts: readonly number[]

Defined in: graphty-element/src/session/styles/encoding.ts:2279

How many elements each step paints, lowest step first: one more entry than steps, a value on a cut counted in the step above it, and a value beyond the domain in the end step it is painted as. Empty when the scale is not stepped.

Since ​

3.26.0


steps ​

readonly steps: readonly number[]

Defined in: graphty-element/src/session/styles/encoding.ts:2272

Where a stepped scale changes step, ascending, in the data's units; empty otherwise.