1
我有以下代码:如何设置标签上Graphviz4Net API使用HTML标签
通过API生成的代码无法正常工作:
digraph g {
graph [rankdir="LR" ,nodesep="1" ,compound="true" ];
subgraph cluster0 {
graph [label="<TABLE><TR><TD>End</TD></TR></TABLE>" ,shape="plaintext" ];
1 [ shape="none" ,fontcolor="white" ];
};
}
改变产生这种工作原理:
digraph g {
graph [rankdir="LR" ,nodesep="1" ,compound="true" ];
subgraph cluster0 {
graph [label=< <TABLE><TR><TD>End</TD></TR></TABLE> > ,shape="plaintext" ];
1 [ shape="none" ,fontcolor="white" ];
};
}
简单的使用Label=<
而不是Label="
使它工作。
我使用最新版本的Graphviz API,并使用C#进行编码。我添加如下标签:
var newBlockSubgraph = new SubGraph<MyClass> { Label = stringBuilder.ToString()};
是否可以在生成的代码中进行更改?我需要的标签为Label=<