Skip to content
This repository was archived by the owner on Mar 17, 2024. It is now read-only.

Commit 3e7bed4

Browse files
committed
update README
1 parent 8d5ed2e commit 3e7bed4

File tree

3 files changed

+62
-4
lines changed

3 files changed

+62
-4
lines changed

README.md

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,17 @@ import React, { FC } from 'react';
2626
import { Digraph, Node, Subgraph, renderToDot, Edge, DOT } from '@ts-graphviz/react';
2727

2828
const Example: FC = () => (
29-
<Digraph dpi={150}>
29+
<Digraph
30+
dpi={150}
31+
rankdir="TB"
32+
edge={{
33+
color: 'blue',
34+
fontcolor: 'blue',
35+
}}
36+
node={{
37+
shape: 'none',
38+
}}
39+
>
3040
<Node
3141
id="nodeA"
3242
shape="none"
@@ -58,9 +68,17 @@ console.log(dot);
5868
```dot
5969
digraph {
6070
dpi = 150;
71+
rankdir = "TB";
72+
edge [
73+
color = "blue",
74+
fontcolor = "blue",
75+
];
76+
node [
77+
shape = "none",
78+
];
6179
"nodeA" [
6280
shape = "none",
63-
label = <<table BORDER="0" CELLBORDER="1" CELLSPACING="0"><tr><td>left</td><td PORT="m">middle</td><td PORT="r">right</td></tr></table>>,
81+
label = <<TABLE BORDER="0" CELLBORDER="1" CELLSPACING="0"><TR><TD>left</TD><TD PORT="m">middle</TD><TD PORT="r">right</TD></TR></TABLE>>,
6482
];
6583
"nodeB";
6684
subgraph "cluster" {
@@ -72,12 +90,12 @@ digraph {
7290
}
7391
// Edge from node A to B
7492
"nodeB" -> "nodeA":"m" [
75-
label = <<b>A to B</b>>,
93+
label = <<B>A to B</B>>,
7694
];
7795
}
7896
```
7997

80-
![dot](./example/example.png)
98+
![dot](./example/example.svg)
8199

82100
## See Also
83101

example/example.png

-22.5 KB
Binary file not shown.

example/example.svg

Lines changed: 40 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)