new Graph(props)
Constructs a new Graph
Parameters:
| Name | Type | Description | |||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
props |
Object | Object containing optional properties of the Graph
Properties
|
Methods
addEdge()
Add an Edge to the Graph. Upon adding, if the Edge contains Node string ID's, they will be looked up in the Graph and replaced with Node instances.
renderIn(elem) → {Graph}
Render the Graph in a DOM element
Parameters:
| Name | Type | Description |
|---|---|---|
elem |
Element | String | Element the Graph should be rendered in. Specify Element ID if string. |
Returns:
The Graph the method was called on
- Type
- Graph