@dioramajs/data/graph
Exports of @dioramajs/data/graph.
On this page
import { backdrop, default, fitTo } from '@dioramajs/data/graph'Functions
backdrop | The colour painted behind an element: the first ancestor background that is not clear. |
fitTo | Layout positions stretched into `plot`, element px; a flat axis stays in the middle. |
layoutGraph | Positions of the nodes, x right and y down, in a frame of the box's proportions; the same graph, mode, aspect and seed always give the same picture. |
neighbors | Neighbors of every node, in the order the links were written. |
readGraph | Nodes and links of a list or a table. A list: every `<li>` is a node, a nested list links its items to the item it sits in, `data-dio-to` links to other items by id or label. A table: each row links the names in its first two cells, a number in the third is the link's weight. |
spanning | A spanning tree by breadth from node 0, then from the first node of each other part: the parent and depth of every node, and the roots of the parts. |
Constants
default | A list or a table of links drawn as a network: nodes in group colors sized by their links, laid out once from a seed, that grow in when the graph scrolls into view. The pointer or focus on a node lights it and its neighbors; the markup stays for screen readers and keyboards. |
MAX_NODES | Most nodes one graph draws; the rest of a longer list stays DOM only. |