Skip to content

Interface: D3PCursorIndicatorOptions ​

Defined in: core/cursor.ts:41

Options of the cursor: the axes it follows, its props and the bus.

Properties ​

axes? ​

ts
axes?: D3PAxisFilter;

Defined in: core/cursor.ts:45

Restrict the cursor to some axes (objects or names): it only shows their values.


bus? ​

ts
bus?: D3PBus;

Defined in: core/cursor.ts:43

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


props? ​

ts
props?: object;

Defined in: core/cursor.ts:47

Initial props of the cursor.

axisLabelStyle? ​

ts
axisLabelStyle?: object;

The labels on the axes. A label is never wider than maxWidth pixels, nor than the room the margin leaves it next to its axis, nor (above or under an axis) higher than that room: a longer text wraps onto several lines, and ends with an ellipsis where even that does not fit.

axisLabelStyle.background? ​
ts
background?: string;
axisLabelStyle.borderRadius? ​
ts
borderRadius?: number;
axisLabelStyle.color? ​
ts
color?: string;
axisLabelStyle.fontSize? ​
ts
fontSize?: number;
axisLabelStyle.maxWidth? ​
ts
maxWidth?: number;
axisLabelStyle.padding? ​
ts
padding?: number;

crossStyle? ​

ts
crossStyle?: object;

Style of the crosses: the colors of the vertical and horizontal ones, the width, the dash and the opacity.

crossStyle.opacity? ​
ts
opacity?: number;
crossStyle.strokeDasharray? ​
ts
strokeDasharray?: string;
crossStyle.strokeWidth? ​
ts
strokeWidth?: number;
crossStyle.strokeX? ​
ts
strokeX?: string;
crossStyle.strokeY? ​
ts
strokeY?: string;

showAxisLabels? ​

ts
showAxisLabels?: boolean;

Whether a label with the value under the pointer is drawn on each axis (default true). A long label wraps within the room its axis leaves.

showCrossX? ​

ts
showCrossX?: boolean;

Whether the vertical cross (the X position) is drawn (default true).

showCrossY? ​

ts
showCrossY?: boolean;

Whether the horizontal cross (the Y position) is drawn (default true).

valueFormatter? ​

ts
valueFormatter?: (axis, value, defaultFormatter) => string;

Custom label text: receives the axis, the value and the default formatter.

Parameters ​
axis ​

D3PAxis

value ​

D3PDomainValue

defaultFormatter ​

(v) => string

Returns ​

string