English
Interface: D3PCursorProps
Defined in: core/cursor.ts:17
Props of the cursor: whether it draws a cross on each dimension and the labels on the axes, their styles, and a function that writes the values of the labels.
Properties
axisLabelStyle
ts
axisLabelStyle: object;Defined in: core/cursor.ts:35
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.
background
ts
background: string;borderRadius
ts
borderRadius: number;color
ts
color: string;fontSize
ts
fontSize: number;maxWidth
ts
maxWidth: number;padding
ts
padding: number;crossStyle
ts
crossStyle: object;Defined in: core/cursor.ts:29
Style of the crosses: the colors of the vertical and horizontal ones, the width, the dash and the opacity.
opacity
ts
opacity: number;strokeDasharray
ts
strokeDasharray: string;strokeWidth
ts
strokeWidth: number;strokeX
ts
strokeX: string;strokeY
ts
strokeY: string;showAxisLabels
ts
showAxisLabels: boolean;Defined in: core/cursor.ts:25
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;Defined in: core/cursor.ts:19
Whether the vertical cross (the X position) is drawn (default true).
showCrossY
ts
showCrossY: boolean;Defined in: core/cursor.ts:21
Whether the horizontal cross (the Y position) is drawn (default true).
valueFormatter?
ts
valueFormatter?: (axis, value, defaultFormatter) => string;Defined in: core/cursor.ts:37
Custom label text: receives the axis, the value and the default formatter.
Parameters
axis
value
defaultFormatter
(v) => string
Returns
string