Interface: Tooltip
Defined in: interfaces/GraphUI.ts:1044
Properties
allowPinning?
optionalallowPinning: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
ctx
Returns
PropertyEntry[] | Promise<PropertyEntry[]>
enabled?
optionalenabled: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 istrue, so{ edges: false }means everything but edges.(element, kind) => boolean: asked on every hover. One that throws counts asfalse.
Default
truenodeHeaderMap
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
ctx
Returns
PropertyEntry[] | Promise<PropertyEntry[]>
render?
optionalrender:string|HTMLElement| (element,ctx) =>RenderResult
Defined in: interfaces/GraphUI.ts:1094
Custom renderer for the tooltip. This content will override the default tooltip
Default
undefinedExample
(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()?
optionalrenderEdgeExtra: (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
ctx
Returns
Default
undefinedrenderGroupExtra()?
optionalrenderGroupExtra: (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
ctx
Returns
Default
undefinedrenderNodeExtra()?
optionalrenderNodeExtra: (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
ctx
Returns
Default
undefinedsetPosition()?
optionalsetPosition: (tooltip,hoveredBCR,canvasBbox) =>void
Defined in: interfaces/GraphUI.ts:1095
Parameters
tooltip
HTMLElement
hoveredBCR
DOMRect
canvasBbox
DOMRect
Returns
void