Skip to content

Type Alias: Graph3dTrace ​

ts
type Graph3dTrace = Omit<CommonTraceAttributes, 'hoverinfo'> & object;

Network graph in a 3D scene: nodes as lit spheres or sprites and the links between them as lines or tubes, at given positions or placed by a layout in space.

Type Declaration ​

NameTypeDescription
arrangement?"preset" | "force" | "layered" | "custom"The layout that places the nodes in space. 'preset': at node.x / node.y / node.z, which are data on the scene's axes. 'force': a force-directed layout in three dimensions (force). 'layered': a directed graph in planes, one per rank, the nodes of a plane spread by the force layout (layered). 'custom': the layout named by custom.name, which returns z as well. The computed arrangements hide the scene's axes and keep the layout's proportions. Default: 'preset' when every node has an x, a y and a z, else 'force'.
custom?GraphTraceCustomThe layout of arrangement: 'custom'.
force?Graph3dTraceForceOptions of the force layout in three dimensions: of arrangement: 'force', and of the nodes within their planes with 'layered' (where linkdistance defaults to layered.ranksep). Lengths are layout units.
highlight?Graph3dTraceHighlightHighlighting: the neighbourhood of the node or link under the pointer (or of highlight.nodes), and a shortest path between the two nodes of highlight.path. What is highlighted keeps its look, its label shows even where there was no room for it, and everything else is dimmed; only colors change. A hover comes first, then highlight.nodes, then a path.
hoverinfo?"all" | "none" | "skip"Hover of nodes and links: labels ('all'), events without labels ('none') or no hover at all ('skip'). The default of node.hoverinfo and link.hoverinfo.
labels?DataColumnTree input, as the hierarchical traces take it: the label of every node. With parents (and no link.source), every node with a parent gets a link from its parent. The default of node.label.
layered?Graph3dTraceLayeredThe layout of arrangement: 'layered': cycles are broken as in the 2D layered layout (the reversed links keep their direction in the drawing), every node gets a rank, each rank is a plane, and the nodes of a plane are spread by the force layout (force) with their coordinate along axis held.
link?Graph3dTraceLinkThe links.
node?Graph3dTraceNodeThe nodes.
parents?DataColumnTree input: the parent of every node, as its id (ids, else labels); '' for a root. A parent that is no node becomes a node of its own, after the others.
scene?"scene" | `scene${number}`The 3D scene this trace is drawn in: 'scene' (layout.scene), 'scene2' (layout.scene2), ….
type"graph3d"Trace type.

Released under the MIT License.