JavaScript & React libraryAPI Generated Docs

Class: Labels

Manages the labels for the Cosmograph visualization. This class is responsible for updating, rendering, and handling the display of labels for the points in the Cosmograph.

Constructors

Constructor

new Labels(_, dispatchWheelEventElement): Labels

Parameters

ParameterType
_ICosmographInternalApi
dispatchWheelEventElementHTMLCanvasElement

Returns

Labels

Properties

PropertyModifierType
labelsContainerpublicHTMLDivElement

Methods

render()

render(): Promise<void>

Renders the labels for the Cosmograph visualization.

Returns

Promise<void>


update()

update(): Promise<void>

Updates labels against the latest settled configuration.

A column-existence query is asynchronous. If the project config changes while it is running, _updateCurrentConfig intentionally discards its stale result. This loop then makes one fresh pass, so the new config does not depend on another user interaction (such as selecting the label column again) to become visible.

Returns

Promise<void>


updatePositions()

updatePositions(): void

Returns

void


renderHoveredLabel()

renderHoveredLabel(pointIndexBy?, pointSpacePosition?): Promise<void>

Renders a hovered label for a point in the Cosmograph visualization.

Parameters

ParameterType
pointIndexBy?number
pointSpacePosition?PointPosition

Returns

Promise<void>


setZooming()

setZooming(isZooming, isManual): void

Set zooming state

Parameters

ParameterTypeDefault value
isZoomingbooleanundefined
isManualbooleantrue

Returns

void


destroy()

destroy(): void

Destroys the labels module, removing event listeners and destroying internal components.

Returns

void


clear()

clear(): void

Clears the labels data and resets the CSS labels renderer.

Returns

void