Skip to content

Class: D3PProbe ​

Defined in: core/probe.ts:82

What is under the pointer on one chart: the service tooltips, cursors and markers read.

It answers from a D3PPointerEvent, which is the cache: the value along an axis and the hit of a renderer are computed when someone first asks, and once. An event may come from another chart (the tooltip and the cursor follow the pointer across charts); the axes then match by name, by join, or by sharing a domain.

The probe also drives the markers of its renderers: as soon as a renderer is attached, the pointer events of the chart show and hide them.

Extends ​

Constructors ​

Constructor ​

ts
new D3PProbe(chart): D3PProbe;

Defined in: core/probe.ts:85

Parameters ​

chart ​

D3PChart

Returns ​

D3PProbe

Overrides ​

D3PObject.constructor

Methods ​

destroy() ​

ts
destroy(): void;

Defined in: core/object.ts:51

Detaches the object from all its charts, announces destroyed and releases its subscriptions. The object cannot be used afterwards.

Returns ​

void

Inherited from ​

D3PObject.destroy


fire() ​

ts
protected fire<P>(event, ...args): void;

Defined in: core/object.ts:41

Emits one of its own events on the bus.

Type Parameters ​

P ​

P

Parameters ​

event ​

D3PEvent<P>

args ​

...P extends void ? [] : [payload: P]

Returns ​

void

Inherited from ​

D3PObject.fire


hide() ​

ts
hide(): void;

Defined in: core/probe.ts:165

Hides the markers of all the renderers.

Returns ​

void


hit() ​

ts
hit(
   event, 
   renderer, 
   joins?
): D3PProbeHit | undefined;

Defined in: core/probe.ts:137

What renderer reports for event on this chart (computed once per event).

Parameters ​

event ​

D3PPointerEvent

renderer ​

D3PSeriesRenderer

joins? ​

readonly D3PJoinGroup[] = []

Returns ​

D3PProbeHit | undefined


hits() ​

ts
hits(
   event, 
   joins?, 
   renderers?
): D3PProbeHit[];

Defined in: core/probe.ts:143

The hits of the visible renderers of the chart (or of renderers), in the order of the renderers.

Parameters ​

event ​

D3PPointerEvent

joins? ​

readonly D3PJoinGroup[] = []

renderers? ​

readonly D3PSeriesRenderer<any, any>[] = ...

Returns ​

D3PProbeHit[]


onDestroy() ​

ts
protected onDestroy(): void;

Defined in: core/object.ts:46

Hook run first on destroy (detach from partners, release DOM...).

Returns ​

void

Inherited from ​

D3PObject.onDestroy


projectFrom() ​

ts
projectFrom(
   event, 
   axis, 
   joins?, 
   cache?
): D3PDomainValue | undefined;

Defined in: core/probe.ts:106

The value axis should read for event: the one under the pointer when the event is on this chart, otherwise (or when the pointer is outside the system of the axis) the one of an axis of the event's chart with the same name, then of a joined one (explicit joins of the chart or joins), then of one sharing the domain of axis.

Parameters ​

event ​

D3PPointerEvent

axis ​

D3PAxis

joins? ​

readonly D3PJoinGroup[] = []

cache? ​

D3PProjectionCache = event

Returns ​

D3PDomainValue | undefined


show() ​

ts
show(event, joins?): void;

Defined in: core/probe.ts:153

Show the marker of every renderer that has a hit for event, hide the others.

Parameters ​

event ​

D3PPointerEvent

joins? ​

readonly D3PJoinGroup[] = []

Returns ​

void


track() ​

ts
track(): void;

Defined in: core/probe.ts:91

Make the pointer events of the chart drive the markers of its renderers (once).

Returns ​

void

Properties ​

bus ​

ts
readonly bus: D3PBus;

Defined in: core/object.ts:27

The bus the object uses for its events.

Inherited from ​

D3PObject.bus


chart ​

ts
readonly chart: D3PChart;

Defined in: core/probe.ts:85


e ​

ts
readonly e: D3PEventTable<M & object>;

Defined in: core/object.ts:29

The events of the object, by name: destroyed for all, and its own (axis.e.scaleChanged).

Inherited from ​

D3PObject.e


isDestroying ​

ts
isDestroying: boolean = false;

Defined in: core/object.ts:31

Set when destroy starts: the object is not drawn after that.

Inherited from ​

D3PObject.isDestroying


subs ​

ts
protected readonly subs: D3PSubscriptions;

Defined in: core/object.ts:33

The subscriptions of the object, released when it is destroyed.

Inherited from ​

D3PObject.subs