Skip to main content

CrossToolComponent

CrossToolComponent API

CrossToolComponent.registerDefaultDrawerTypes
CrossToolComponent.registerDefaultDrawerTypes(): void

Registers default drawer types for the chart.

Returns
void
CrossToolComponent.setVisible
CrossToolComponent.setVisible(visible: boolean): void

Sets the cross tool visibility.

Parameters
visible: boolean
Returns
void
CrossToolComponent.setType
CrossToolComponent.setType(type: string): void

Sets the crosstool type. - cross-and-labels - both the crosshair and X/Y labels - only-labels - only the X/Y label - none

Parameters
type: string
Returns
void
CrossToolComponent.observeCrossToolChanged
CrossToolComponent.observeCrossToolChanged(): BehaviorSubject<CrossToolHover>

Returns an Observable that emits the current hover subject.

Returns
BehaviorSubject<CrossToolHover>
CrossToolComponent.setMagnetTarget
CrossToolComponent.setMagnetTarget(target: MagnetTarget): void

Sets magnet target for cross tool. Supported only for 'cross-and-labels' type. Default magnet target is none.

Parameters
target: MagnetTarget
Returns
void
CrossToolComponent.registerCrossToolTypeDrawer
CrossToolComponent.registerCrossToolTypeDrawer(drawerName: string, drawerImpl: CrossToolTypeDrawer): void

Adds a new drawer type for cross tool, so you can add your own implementation of cross tool (or override existing)

Parameters
drawerName: string
- an unique drawer type name
drawerImpl: CrossToolTypeDrawer
- CrossToolTypeDrawer object
Returns
void
;