create-graph-from-dot

Description

create-graph-from-dot adaptor creates a graph structure from text in DOT language format.

Inputs

dot Type: text Required: Yes The text in DOT language format.

Outputs

graph Type: graph A graph structure defining nodes and edges.

Examples

Example 1: Default behaviour.

Inputs:

dot:

graph graphname {
    a -- b -- c;
    b -- d;
}

Outputs:

list:

{ 
    "nodes": [ 
                { "id": "a", "label": "a" },
                { "id": "b", "label": "b" },
                { "id": "c", "label": "c" },
                { "id": "d", "label": "d" }
    ],
    "edges": [ 
                { "id": "edge-0", "from": "a", "to": "b", "direction": "none", "attributes": {} },
                { "id": "edge-1", "from": "b", "to": "c", "direction": "none", "attributes": {} },
                { "id": "edge-2", "from": "b", "to": "d", "direction": "none", "attributes": {} } 
    ]
}

-> Created an undirected graph from a DOT text.

Use Cases

  • This adaptor is useful for converting DOT data to graph format enables users to reformat the graph's nodes through the apply-force-directed-layout adaptor.

  • This adaptor is useful for converting a Dot file to a graph allows for detailed analysis of the relationships and connections within the dataset

Last updated