如何为使用 DOT 生成的节点创建一些属性?
digraph{rankdir="TB";
node[shape=box];
0[label=<0<br/><i><b>Inspect the fridge</b></i><br/>Claw Hammer x1> tag="SpeakEasySwapFridgeDoorClosedF3" ID="0" status="off" data="[{'Item': 'Claw Hammer', 'Qty': 1}]"];
1[label=<1<br/><i><b>Unlock the Music Studio</b></i>> tag="MusicianRoomUnlock" ID="1" status="off" data="[]"];
标签部分工作正常,得到斜体和粗体。但生成的结果没有 tag、ID、status 或 data 属性。
<g id="node1" class="node">
<title>0</title>
<polygon fill="none" stroke="#000000" points="367.4264,-7184 252.3724,-7184 252.3724,-7134 367.4264,-7134 367.4264,-7184"></polygon>
<text text-anchor="start" x="306.3994" y="-7168.4" font-family="Times,serif" font-size="14.00" fill="#000000">0</text>
<text text-anchor="start" x="260.9211" y="-7154.4" font-family="Times,serif" font-weight="bold" font-style="italic" font-size="14.00" fill="#000000">Inspect the fridge</text>
<text text-anchor="start" x="260.1364" y="-7140.4" font-family="Times,serif" font-size="14.00" fill="#000000">Claw Hammer x1</text>
</g>
Graphviz 程序确实接受用户定义的属性作为输入,但仅当输出格式为 dot、canon、gv 或 xdot
时才传递这些属性