更新时间:2023-01-28 13:30:26
考虑到rankdir有效地替换了给定图形的顶部"和底部"的概念,这并不奇怪.
Taking into account that rankdir effectively replaces the notion of "top" and "bottom" for the given graph, that's not surprising.
恐怕对此没有简单的补救方法,除非黑客窃取了源代码(这根本不是一件容易的事).您可以使用某种大规模搜索替换解决方案在"{}"中加上标签,以获得所需的效果:
I am afraid that there is no easy remedy for this, save hacking the source (and that would not be easy at all). You can surround your labels in "{}" with some kind of mass search-replace solution to get the requested effect:
digraph sample { graph [rankdir=TD]; node [shape=record];
A [label="{ShouldBeTop | ShouldBeBottom}"];
B [label="{Top | Bottom}"]; A -> B;
}