@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 ​
readonlyabove: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 ​
readonlybelow: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 ​
readonlybins: readonlyBindingPreviewBin[]
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 ​
readonlychannel:Channel
Defined in: graphty-element/src/session/styles/encoding.ts:2259
The channel it would paint.
defaulted ​
readonlydefaulted: readonlyPreviewDefaultedPart[]
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 ​
readonlydomain: 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 ​
readonlyendPercentiles: 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 ​
readonlyendTies: 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 ​
readonlyextent: 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 ​
readonlynoValue:number
Defined in: graphty-element/src/session/styles/encoding.ts:2285
How many elements carry no value (absent or null).
noValuePaints ​
readonlynoValuePaints: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 ​
readonlyoutsideScale: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 ​
readonlypalette: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 ​
readonlyscale: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 ​
readonlystepCounts: readonlynumber[]
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 ​
readonlysteps: readonlynumber[]
Defined in: graphty-element/src/session/styles/encoding.ts:2272
Where a stepped scale changes step, ascending, in the data's units; empty otherwise.