Skip to content

Interface: GraphModel ​

Experimental

Properties ​

PropertyModifierTypeDescription
boxreadonlybooleanExperimental Nodes are boxes around their labels (node.shape: 'box').
degreereadonlyInt32ArrayExperimental Link ends at each node: indegree counts the links that end at it, outdegree those that start at it, and degree is their sum (so a self-link counts twice, as in graph theory).
droppedreadonlynumberExperimental Links left out because an end is not a node (or closes a cycle of parents).
fanreadonlyFloat32ArrayExperimental Curvature that fans out the links between the same two nodes; 0 for a single link.
givenreadonlynumberExperimental How many of the nodes the trace gives (the others are implied parents).
groupreadonlyInt32ArrayExperimental Group index of each node (node.group), -1 for none, and the groups' names by index.
groupNamesreadonlyreadonly string[]Experimental
halfHeightreadonlyFloat64ArrayExperimental
halfWidthreadonlyFloat64ArrayExperimental Half the extent of each node in px: the radius twice, or half a box's width and height.
impliedreadonlyreadonly string[]Experimental
indegreereadonlyInt32ArrayExperimental
labelsreadonlyArrayLike<unknown> | undefinedExperimental Where labels come from: node.label, else labels; and the labels of implied parents.
linkIndexreadonlyInt32ArrayExperimental Index of each kept link in the trace's link arrays (tree input: the child's row).
linksreadonlynumberExperimental Number of links kept.
loopreadonlyInt32ArrayExperimental For a self-link, its number among its node's self-links (0, 1, …); -1 for other links.
nodesreadonlynumberExperimental Number of nodes: the rows the trace gives, then the parents tree input implied.
nodeValuereadonlyFloat64Array<ArrayBufferLike> | undefinedExperimental node.value as numbers, NaN where a node has none; unset when the trace gives no finite value at all. What a dendrogram's heights, tree.sort: 'value' and hive.position: 'value' read.
outdegreereadonlyInt32ArrayExperimental
parentreadonlyInt32Array<ArrayBufferLike> | undefinedExperimental Tree input: each node's parent, -1 for a root. Unset for node / link input.
sizereadonlyFloat32ArrayExperimental Drawn diameter of each node in px (a box node: its larger side).
sourcereadonlyInt32ArrayExperimental Node index of each kept link's ends.
targetreadonlyInt32ArrayExperimental
valuereadonlyFloat64ArrayExperimental link.value as given; NaN where a link has none.
weightreadonlyFloat64ArrayExperimental link.value where it is a positive number, else 1: the weight layouts use.

Released under the MIT License.