Skip to main content

Interface: AppendLegendOptions

Defined in: packages/sdvplot/src/d3/shots.ts:36

Options for appendLegend.

Properties​

caption?​

optional caption?: readonly string[] | null

Defined in: packages/sdvplot/src/d3/shots.ts:53

Caption and key in words (theme.ts:35, :120); null for none.


domain?​

optional domain?: readonly [number, number]

Defined in: packages/sdvplot/src/d3/shots.ts:47

Diffs the bar spans; default the scale's end stops. master's legend spanned [-0.30, 0.30] (ShootingSignature/Legend.js:36-38): { domain: [-0.3, 0.3], ticks: [-0.3, -0.15, 0, 0.15, 0.3] }.


format?​

optional format?: (d) => string

Defined in: packages/sdvplot/src/d3/shots.ts:51

Tick text; default signed points, "0" at 0 (theme.ts:140).

Parameters​

d​

number

Returns​

string


notes?​

optional notes?: readonly string[]

Defined in: packages/sdvplot/src/d3/shots.ts:55

More lines under the caption, wrapped to width (e.g. a shrinkage note).


size?​

optional size?: object

Defined in: packages/sdvplot/src/d3/shots.ts:57

A cell size key under the colour key: pixel size per attempt count and the counts (sizeCells(...).steps).

note?​

readonly optional note?: string

Default "hex size: attempts" or "square size: attempts".

px​

readonly px: (attempts) => number

Parameters​
attempts​

number

Returns​

number

shape?​

readonly optional shape?: BinShape

The key's cell shape; default "hex".

steps​

readonly steps: readonly number[]


ticks?​

optional ticks?: readonly number[]

Defined in: packages/sdvplot/src/d3/shots.ts:49

Tick diffs; default the domain's ends, and 0 when it lies inside them.


width?​

optional width?: number

Defined in: packages/sdvplot/src/d3/shots.ts:42

Space available, which the text wraps to; the bar is at most 240 px (theme.ts:122).


x?​

optional x?: number

Defined in: packages/sdvplot/src/d3/shots.ts:38

Top-left corner of the legend in px; default (0, 0).


y?​

optional y?: number

Defined in: packages/sdvplot/src/d3/shots.ts:40

See x.