Graphviz: Difference between revisions
Jump to navigation
Jump to search
(→Order) |
(→Test) |
||
| (32 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
= Test = | |||
<quickgv name="N" theme="warm"> | |||
rankdir=BT; | |||
skcom_dll [label="SKCOM.dll"]; | |||
skcom_py [label="AsyncQuoteReceiver"]; | |||
eq [label="Event Queue"]; | |||
hq [label="History Queue"]; | |||
websockets [label="Websockets\n(ws://127.0.0.1:8080)"]; | |||
frontend [label="Frontend"]; | |||
skcom_dll -> skcom_py; | |||
skcom_py -> eq; | |||
eq -> hq [label="backup", constraint=false]; | |||
eq -> websockets; | |||
hq -> websockets; | |||
websockets -> frontend; | |||
frontend -> websockets; | |||
</quickgv> | |||
= Beautify Edges = | = Beautify Edges = | ||
== OTP == | |||
<quickgv name="otp" theme="warm"> | |||
rankdir=TB; | |||
A [label="接到衛生所的電話"]; | |||
B [label="配合(不確定是不是)衛生所的人加入 Line 好友"]; | |||
C [label="電話中詢問對方分機"]; | |||
D [label="掛掉對方打來的電話, 照衛生所官網提供的號碼,\n主動打去衛生所與分機"]; | |||
E1 [label="隨機給對方一組數字,\n請他在 Line 裡面輸入"]; | |||
E2 [label="對方要求打去指定的電話號碼"]; | |||
F1 [label="輸入正確"]; | |||
F2 [label="輸入錯誤"]; | |||
F3 [label="輸入錯誤3次"]; | |||
G [label="身分核對完成"]; | |||
H [label="視為詐騙"]; | |||
A -> B -> C -> D; | |||
D -> E1; | |||
D -> E2; | |||
E1 -> {F1 F2 F3}; | |||
F2 -> E1; | |||
F1 -> G; | |||
E2 -> H; | |||
F3 -> H; | |||
</quickgv> | |||
== Record shape == | |||
https://graphviz.org/doc/info/shapes.html#record | |||
<quickgv name="test0" theme="warm" usage="ram"> | |||
rankdir=TB; | |||
spline=ortho; | |||
FW [label="{Vigor 2926 | { <1> P1 | <2> P2 | <3> P3 | <4> P4 | <w1> WAN1 | <w2> WAN2 }}"]; | |||
Hinet [label="種花電信肛世代"]; | |||
Office [label="office switch"] | |||
FW:w1 -> Hinet; | |||
FW:1 -> Office; | |||
</quickgv> | |||
== Order == | == Order == | ||
| Line 6: | Line 70: | ||
subgraph cluster_common { | subgraph cluster_common { | ||
label=" | label="共用流程2"; | ||
A [label="收到下訂請求"]; | A [label="收到下訂請求"]; | ||
B [label="檢查價格與庫存"]; | B [label="檢查價格與庫存"]; | ||
| Line 35: | Line 99: | ||
Z2 [label="下訂失敗"]; | Z2 [label="下訂失敗"]; | ||
A -> B; | |||
B -> C [xlabel="錯誤",color="#f00000"]; | |||
B -> {D1 D2 D3} [xlabel="正確"]; | |||
C -> Z2; | |||
D1 -> E1 -> E2 -> E3 -> Z1; | |||
D2 -> F1; | |||
D3 -> G1; | |||
E1 -> Z2 [color="#f00000"]; | |||
E3 -> Z2 [color="#f00000"]; | |||
</quickgv> | </quickgv> | ||
Latest revision as of 06:03, 7 June 2021
Test
Beautify Edges
OTP
Record shape
https://graphviz.org/doc/info/shapes.html#record
Order
GDS
Edge Attributes
| label | arrow | other |
|---|---|---|
|
arrowhead arrowsize arrowtail color colorscheme comment constraint decorate dir fillcolor fontcolor fontname fontsize id len lhead ltail minlen nojustify penwidth pos samehead sametail showboxes target tooltip weight
Edge label
All kinds of labels
| label | xlabel | headlabel | taillabel |
|---|---|---|---|
Difference between label and xlabel 1
Attribute label works not good as expected while using in subgraph.
| label | xlabel | label in subgraph | xlabel in subgraph |
|---|---|---|---|
Difference between label and xlabel 2 (constraint=false)
- The label is gone.
- Space of xlabel is not enough.
| label | |
|---|---|
| xlabel | |
| xlabel with minlen=4 |
|
| label in subgraph |
|
| xlabel in subgraph |
|
| xlabel in subgraph with minlen=4 |