new cola_layout( [id])
dc_graph.cola_layout
is an adaptor for cola.js layouts in dc.graph.js
Parameters:
Name | Type | Argument | Default | Description |
---|---|---|---|---|
id |
String |
<optional> |
uuid() | Unique identifier |
- Source:
Returns:
- Type
- dc_graph.cola_layout
Methods
-
baseLength( [baseLength])
-
Gets or sets the default edge length (in pixels) when the
.lengthStrategy
is 'individual', and the base value to be multiplied for 'symmetric' and 'jaccard' edge lengths.Parameters:
Name Type Argument Default Description baseLength
Number <optional>
30 - Source:
Returns:
-
- Type
- Number
-
- Type
- dc_graph.cola_layout
-
flowLayout( [flowLayout])
-
If
flowLayout
is set, it determines the axis and separation for cola flow layout. If it is not set,flowLayout
will be calculated from the rankdir and ranksep; ifrankdir
is also null (the default for cola layout), then there will be no flow.Parameters:
Name Type Argument Default Description flowLayout
Object <optional>
null - Source:
Example
// No flow (default) diagram.flowLayout(null) // flow in x with min separation 200 diagram.flowLayout({axis: 'x', minSeparation: 200})
-
handleDisconnected( [handleDisconnected])
-
Instructs cola.js to fit the connected components.
Parameters:
Name Type Argument Default Description handleDisconnected
Boolean <optional>
true - Source:
Returns:
-
- Type
- Boolean
-
- Type
- dc_graph.cola_layout
-
lengthStrategy( [lengthStrategy])
-
Currently, three strategies are supported for specifying the lengths of edges:
- 'individual' - uses the
edgeLength
for each edge. If it returns falsy, uses thebaseLength
- 'symmetric', 'jaccard' - compute the edge length based on the graph structure around the edge. See the cola.js wiki for more details. 'none' - no edge lengths will be specified
Parameters:
Name Type Argument Default Description lengthStrategy
function | String <optional>
'symmetric' - Source:
Returns:
-
- Type
- function | String
-
- Type
- dc_graph.cola_layout
- 'individual' - uses the