pfTopologyMap
patternfly.charts
Component for rendering topology chart on Canvas element. This is just a simple component. It has no searching/filtering or other methods. Will only render given data and return data about selected objects.
Component also supports semantic zooming. Only distance between nodes is growing/shrinking, but node size remains the same. Canvas will zoom around the mouse cursor.
<pf-topology-map
nodes="{array}"
edges="{array}"
[show-node-labels="{boolean}"]
[show-edge-labels="{boolean}"]
[tooltip-style="{object}"]
[select-node="{function (node) }"]
[multi-select-nodes="{function (array) }"]
[select-edge="{function (edge) }"]
[multi-select-edges="{function (array) }"]>
</pf-topology-map>
| Param | Type | Details |
|---|---|---|
| nodes | array | array containing objects representing graph nodes. Each node has these attributes. Only node id is mandatory parameter.
|
| edges | array | array of objects. Each object represents one edge between two nodes. Source and target are mandatory attributes.
|
| show-node-labels (optional) | boolean | show/hide all node tooltips |
| show-edge-labels (optional) | boolean | show/hode all edge tooltips |
| tooltip-style (optional) | object | object used for tooltip styling. This is an optional parameter.
|
| select-node (optional) | function (node) | function that return selected(clicked) node from graph |
| multi-select-nodes (optional) | function (array) | function that returns array of selected nodes. Multiple nodes are selected while holding the ctrl/shift key and clicking |
| select-edge (optional) | function (edge) | function that return selected(clicked) edge from graph |
| multi-select-edges (optional) | function (array) | function that returns array of selected edges. Multiple edges are selected while holding the ctrl/shift key and clicking |