Graphviz: Difference between revisions

From Fundamental Ramen
Jump to navigation Jump to search
 
(42 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="檢查價格與庫存"];
   C [label="檢查庫存是否充足"];
   C [label="排程更新價格與庫存"];
   D1 [label="進入 JTR 專用流程"];
   D1 [label="進入 JTR 專用流程"];
   D2 [label="進入 TKM 專用流程"];
   D2 [label="進入 TKM 專用流程"];
Line 18: Line 82:
   label="JTR 專用流程";
   label="JTR 專用流程";
   E1 [label="下訂"];
   E1 [label="下訂"];
   E2 [label="載入訂單"];
   E2 [label="同步訂單資訊"];
   E3 [label="付款"];
   E3 [label="付款"];
}
}


Z [label="完成訂單"];
subgraph cluster_tkm {
  label="TKM 專用流程";
  F1 [label="TODO"];
}
 
subgraph cluster_bmg {
  label="BMG 專用流程";
  G1 [label="TODO"];
}
 
Z1 [label="完成訂單"];
Z2 [label="下訂失敗"];


A -> B -> C -> {D1 D2 D3};
A -> B;
D1 -> E1 -> E2 -> E3 -> Z;
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
  • URL labelURL headURL tailURL edgeURL
  • lp head_lp tail_lp xlp
  • headclip tailclip
  • href headhref tailhref edgehref labelhref
  • label headlabel taillabel xlabel
  • headport tailport
  • headtarget tailtarget edgetarget labeltarget
  • headtooltip tailtooltip edgetooltip labeltooltip
  • label_scheme
  • labelangle
  • labeldistance
  • labelfloat
  • labelfontcolor
  • labelfontname
  • labelfontsize

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

Direction of subgraph

Position of xlabel