我只找到了一个不太正式的解决方案:添加(不可见)约束来表示顺序。node1 -> node2 [style=invis] node2 -> node3 [style=invis] ... 更紧凑的版本:node1 -> node2 -> node3 -> node4 [style=invis]