Simple Graph Builder Demo
This demo automatically builds a graph from business data using
GraphBuilder, TreeBuilder or
AdjacencyGraphBuilder.
The business data is stored in arrays or in JSON format.
The nodes are visualized by a TemplateNodeStyle instance that binds to the
business data objects which GraphBuilder, TreeBuilder and
AdjacencyGraphBuilder store in the graph item's
ITagOwner#tag.
See the the Developer's Guide section on
creating a Graph from Business Data for an in-depth
explanation of the relevant concepts.
Each builder provides a specific set of methods that allow to configure the builder on the
given data source.
GraphBuilder
createNodesSource
- Registers a data source that represents the nodes.
createGroupNodesSource
- Registers a data source that represents the group nodes.
createEdgesSource
- Registers a data source that represent the edges that connect the nodes.
NodesSource.createChildNodesSource
-
Registers a data source that represents the child nodes for a node in the NodesSource.
NodesSource.createParentNodesSource
-
Registers a data source that represents the group node for a node in the NodesSource.
TreeBuilder
createRootNodesSource
- Registers a data source that represents the root nodes.
TreeNodesSource.createChildNodesSource
- Registers a data source as child entities of a TreeNodesSource.
TreeNodesSource.addChildNodesSource
- Binds a collection of child data objects of a TreeNodesSource.
AdjacencyGraphBuilder
createNodesSource
- Registers a data source that represents the nodes.
createGroupNodesSource
- Registers a data source that represents the group nodes.
AdjacencyNodesSource.addPredecessorIds
- Registers a provider for source node IDs to which edges are created.
AdjacencyNodesSource.addSuccessorIds
- Registers a provider for target node IDs to which edges are created.
Input Data
The files
graph-builder-data.js
graph-builder-with-grouping-data.js
tree-builder-data-array.js
tree-builder-data-json.js
adjacent-builder-id-data-array.js
show how the data can be specified for the different builders.