Viz.js: 更改形状的边框颜色
Viz.js: Change border color of a shape
我有以下 Viz.js 的 DOT 脚本:
digraph G {
subgraph cluster_1 {
color=red;
node [style=filled, color=grey];
b0 -> b1 ;
label = "process #2";
}
start -> b0;
start [shape=Mdiamond];
}
我想更改形状 b0
的边框。在文档中有一个 属性 color.border,但我无法在没有错误的情况下将其插入到此上下文中。我怎样才能改变边框的颜色,例如变蓝?
您需要使用 color
和 fillcolor
的组合。如果未提供 fillcolor
,则填充默认为 color
值,因此边框和填充相同。
以下是您的示例的一种方法:
digraph G {
subgraph cluster_1 {
color=red;
node [style=filled, color=grey];
b0 [color=blue, fillcolor=grey]
b0 -> b1 ;
label = "process #2";
}
start -> b0;
start [shape=Mdiamond];
}
我有以下 Viz.js 的 DOT 脚本:
digraph G {
subgraph cluster_1 {
color=red;
node [style=filled, color=grey];
b0 -> b1 ;
label = "process #2";
}
start -> b0;
start [shape=Mdiamond];
}
我想更改形状 b0
的边框。在文档中有一个 属性 color.border,但我无法在没有错误的情况下将其插入到此上下文中。我怎样才能改变边框的颜色,例如变蓝?
您需要使用 color
和 fillcolor
的组合。如果未提供 fillcolor
,则填充默认为 color
值,因此边框和填充相同。
以下是您的示例的一种方法:
digraph G {
subgraph cluster_1 {
color=red;
node [style=filled, color=grey];
b0 [color=blue, fillcolor=grey]
b0 -> b1 ;
label = "process #2";
}
start -> b0;
start [shape=Mdiamond];
}