Nivo tree graph, supporting dendograms as well.
While it's part of the nivo internals, and not formally documented,
you should be able to use the useTree
hook directly in order to build
a fully custom graph, this hook takes a config object which
is very close to the component's props.
The hierarchical data object.
'id'
The key or function to use to retrieve nodes identity.
'dendogram'
Type of tree diagram.
'top-to-bottom'
Defines the diagram layout.
Chart width.
Chart height.
'Depends on device'
Adjust pixel ratio, useful for HiDPI screens.
Chart margin.
Define style for common elements such as labels, axes…
12
Defines the size of the nodes, statically or dynamically.
Defines the size of active nodes, statically or dynamically.
Defines the size of inactive nodes, statically or dynamically.
Defines the color of the nodes, statically or dynamically.
Infinity
Fix the node color past a certain depth, meaning descendant nodes
are going to inherit the parent color defined at that depth.
Use Infinity
to disable.
'bump'
Defines the type of curve to use to draw links.
1
Defines the thickness of the links, statically or dynamically.
Defines the size of active links, statically or dynamically.
Defines the thickness of inactive links, statically or dynamically.
Defines the color of the links.
true
Show labels for nodes.
'id'
Define what to use as a node label, if a string is provided it's used as a property path to access the value.
'outward'
Defines how to position the nodes labels.
true
Automatically orient labels according to the selected layout
.
Infinity
Prevent nodes from being detected if the cursor is too far away from the node.
Override the default label component.
Override the default label canvas rendering.
'links'
, 'nodes'
, 'labels'
, 'mesh'
]Defines the order of layers and add custom layers.
Override the default node component.
Override the default node canvas rendering.
Override the default link component.
Override the default link canvas rendering.
true
Enable/disable interactivity.
true
Use a voronoi mesh to detect mouse interactions. Always true
for the canvas implementation
Infinity
Prevent nodes from being detected if the cursor is too far away from the node.
false
Display mesh used to detect mouse interactions (voronoi cells).
Highlight active node ancestor nodes.
Highlight active node descendant nodes.
Highlight active node ancestor links.
Highlight active node descendant links.
onMouseEnter handler for nodes.
onMouseMove handler for nodes.
onMouseLeave handler for nodes.
onClick handler for nodes.
Define the tooltip positioning behavior.
'top'
Define the tooltip anchor.
onMouseEnter handler for links (useMesh
must be false
).
onMouseMove handler for links (useMesh
must be false
).
onMouseLeave handler for links (useMesh
must be false
).
onClick handler for links (useMesh
must be false
).
Tooltip component for links (useMesh
must be false
).
'top'
Define the tooltip anchor.
Main element role attribute.
Main element aria-label.
Main element aria-labelledby.
Main element aria-describedby.
true
Enable/disable transitions.
'gentle'
Motion config for react-spring, either a preset or a custom configuration.