Using dot, I’m trying to create a rounded node with a complex label encoded using an HTML table. The top title row needs a color background, and the remaining rows need to be white.
I have it almost working in terms of basic behavior, but it seems to add a small border of the table background color even with cellpadding="0"
set on the table. This occurs in both PNG and SVG output. Is there any way to avoid this?
Note, you need to set the background color on the table so that it clips to the rounded border. Setting it on the table row results in the background color rendering outside of the rounded corner.
Example DOT graph that generated the above is:
digraph render_graph
{
rankdir="LR"
node [shape="none"]
mynode [label=<
<table bgcolor="#FF0000" border="1" cellspacing="0" cellborder="0" style="rounded">
<tr>
<td cellpadding="2">Title</td>
</tr>
<tr>
<td cellpadding="10" bgcolor="#FFFFFF">Data</td>
</tr>
</table>
>]
}