Skip to content

pivotick v3.0.0


pivotick / GraphUI / Tooltip

Interface: Tooltip ​

Defined in: interfaces/GraphUI.ts:1044

Properties ​

allowPinning? ​

optional allowPinning: boolean

Defined in: interfaces/GraphUI.ts:1054


edgeHeaderMap ​

edgeHeaderMap: Partial<HeaderMapEntry<Edge>>

Defined in: interfaces/GraphUI.ts:1081


edgePropertiesMap() ​

edgePropertiesMap: (edge, ctx) => PropertyEntry[] | Promise<PropertyEntry[]>

Defined in: interfaces/GraphUI.ts:1085

May be async — the property list shows a placeholder until it resolves.

Parameters ​

edge ​

Edge

ctx ​

RenderContext

Returns ​

PropertyEntry[] | Promise<PropertyEntry[]>


enabled? ​

optional enabled: boolean | TooltipKinds | (element, kind) => boolean

Defined in: interfaces/GraphUI.ts:1053

Which hovers show a tooltip.

  • true / false: all or none.
  • { nodes, edges, groups }: per kind. A missing key is true, so { edges: false } means everything but edges.
  • (element, kind) => boolean: asked on every hover. One that throws counts as false.

Default ​

ts
true

nodeHeaderMap ​

nodeHeaderMap: Partial<HeaderMapEntry<Node>>

Defined in: interfaces/GraphUI.ts:1080


nodePropertiesMap() ​

nodePropertiesMap: (node, ctx) => PropertyEntry[] | Promise<PropertyEntry[]>

Defined in: interfaces/GraphUI.ts:1083

May be async — the property list shows a placeholder until it resolves.

Parameters ​

node ​

Node

ctx ​

RenderContext

Returns ​

PropertyEntry[] | Promise<PropertyEntry[]>


render? ​

optional render: string | HTMLElement | (element, ctx) => RenderResult

Defined in: interfaces/GraphUI.ts:1094

Custom renderer for the tooltip. This content will override the default tooltip

Default ​

ts
undefined

Example ​

ts
(element) => `element id: ${element.id}`

Remarks ​

A returned string renders as plain text; return an HTMLElement to render HTML. May be async, on the same terms as Tooltip.renderNodeExtra.


renderEdgeExtra()? ​

optional renderEdgeExtra: (edge, ctx) => RenderResult

Defined in: interfaces/GraphUI.ts:1070

Custom renderer for edge tooltips. This content is added after the default tooltip.

May be async, on the same terms as Tooltip.renderNodeExtra.

Parameters ​

edge ​

Edge

ctx ​

RenderContext

Returns ​

RenderResult

Default ​

ts
undefined

renderGroupExtra()? ​

optional renderGroupExtra: (group, ctx) => RenderResult

Defined in: interfaces/GraphUI.ts:1079

Custom renderer for a group's tooltip, made by UI.simplify. Added after its members and the nodes it links to. A group skips render and renderNodeExtra, which are about one node's data.

May be async, on the same terms as Tooltip.renderNodeExtra.

Parameters ​

group ​

GroupInfo

ctx ​

RenderContext

Returns ​

RenderResult

Default ​

ts
undefined

renderNodeExtra()? ​

optional renderNodeExtra: (node, ctx) => RenderResult

Defined in: interfaces/GraphUI.ts:1063

Custom renderer for node tooltips. This content is added after the default tooltip.

May be async — the tooltip shows a placeholder, then swaps in the content and repositions itself. Hovering another node first drops the stale result and aborts ctx.signal.

Parameters ​

node ​

Node

ctx ​

RenderContext

Returns ​

RenderResult

Default ​

ts
undefined

setPosition()? ​

optional setPosition: (tooltip, hoveredBCR, canvasBbox) => void

Defined in: interfaces/GraphUI.ts:1095

Parameters ​

tooltip ​

HTMLElement

hoveredBCR ​

DOMRect

canvasBbox ​

DOMRect

Returns ​

void