Skip to content

Interface: HierNode ​

Experimental

One node of a hierarchy: Plotly's calcdata item (cdi) and its d3 node in one object.

Properties ​

PropertyModifierTypeDescription
childrenpublicHierNode[]Experimental Children in data order (sorted by value with sort); empty for leaves.
colorpublicstringExperimental CSS fill color, resolved by the trace's cross-trace step ('' until then).
depthpublicnumberExperimental Levels below the root (d3 depth).
generatedreadonly"implied" | "multiple" | undefinedExperimental A root the data does not have: 'implied' (the one parent id that is no node id, Plotly's hasImpliedRoot) or 'multiple' (the root of several roots, Plotly's hasMultipleRoots).
heightpublicnumberExperimental Levels to the deepest leaf below (d3 height).
ireadonlynumberExperimental Data index, or -1 for a generated root.
idreadonlystringExperimental Node id: ids[i], else labels[i] (stringified); a generated root's id.
labelreadonlystringExperimental labels[i] (stringified, '' when unset); a generated root's label.
parentpublicHierNode | nullExperimental
pidreadonlystringExperimental Parent id ('' for the root).
vreadonlynumber | undefinedExperimental values[i] as a number (only when the trace has values).
valuepublicnumberExperimental The node's size: summed, total or counted (d3 value).

Released under the MIT License.