Is there a way to add color to only a field in a record-based node. Like in the following example, can the field struct2:f0 alone be in different color?
digraph structs {
node [shape=record];
struct1 [label="<f0> left|<f1> mid\ dle|<f2> right"];
struct2 [label="<f0> one|<f1> two"];
struct3 [label="hello\nworld |{ b |{c|<here> d|e}| f}| g | h"];
struct1:f1 -> struct2:f0;
struct1:f2 -> struct3:here;
}
Thx
I don't think this is possible.
You may consider using HTML-like labels - you should be able to do everything you can do with record-based nodes, and more.
From the above linked documentation page:
The record-based shape has largely been superseded and greatly generalized by HTML-like labels. That is, instead of using
shape=record
, one might consider usingshape=none
and an HTML-like label.
and
Although HTML labels are not, strictly speaking, a shape, they can be viewed as a generalization of the record shapes described above. In particular, if a node has set its shape attribute to
none
orplaintext
, the HTML label will be the node's shape.
Try this:
digraph G {
"Record" [ label=<<table>
<tr>
<td>A</td>
<td bgcolor='#00CC11'>B</td>
</tr>
</table>
>
];
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With