Skip to content

Interface: D3PSlotOptions ​

Defined in: core/slot.ts:10

Options of a slot: the side it sits on, its size, its span, its order, and what it does when it is placed.

Properties ​

bus? ​

ts
bus?: D3PBus;

Defined in: core/slot.ts:12

The bus the slot uses (the global bus by default).


order? ​

ts
order?: number;

Defined in: core/slot.ts:23

Where the strip goes among those of its side: the lowest is the outermost (default 1; a title is 0, the title of an axis 2).


place? ​

ts
place?: (chart) => object;

Defined in: core/slot.ts:28

Where the slot is, in the coordinates of the svg, when it is not on a strip (for a slot of inside side): it is asked again whenever the chart changes size or its layout changes.

Parameters ​

chart ​

D3PChart

Returns ​

object

height ​
ts
height: number;
width ​
ts
width: number;
x ​
ts
x: number;
y ​
ts
y: number;

side ​

ts
side: D3PSide | "inside";

Defined in: core/slot.ts:17

Which side of the plot the slot sits on: it reserves a strip there, taken from the plot. inside reserves nothing: the slot covers the plot, for something that floats over it (a legend in a corner).


size? ​

ts
size?: number;

Defined in: core/slot.ts:19

Height of a strip on the top or the bottom, width of a strip on the left or the right, in pixels (default 28).


span? ​

ts
span?: D3PBandSpan;

Defined in: core/slot.ts:21

Along the side: the whole chart, or only the plot (default), so a title is centered over the plot.


style? ​

ts
style?: Partial<CSSStyleDeclaration>;

Defined in: core/slot.ts:30

CSS of the element that holds the content.