Optional
container: RootGraphModelRendered dot string
import React, { FC } from 'react';
import { Digraph, Node, Subgraph, renderToDot, Edge } from '@ts-graphviz/react';
const Example: FC = () => (
<Digraph>
<Node id="a" />
<Subgraph id="my_cluster">
<Node id="b" />
</Subgraph>
<Edge targets={['b', 'a']} />
</Digraph>
);
const dot = renderToDot(<Example />);
console.log(dot);
// digraph {
// "a";
// subgraph "my_cluster" {
// "b";
// }
// "b" -> "a";
// }
Generated using TypeDoc
Converts the given element to DOT language and returns it.