Is there a way to add a background to edge labels? I tried fillcolor but it only colors the arrow, and the edge labels kept having a transparent background.
You can use an “HTML” label (Node Shapes | Graphviz)
graph C {
y--z [label=<<table bgcolor="orange" border="0" cellspacing="0"><tr><td>table text</td></tr></table>>]
}
Giving:
Is there a bug with that? A long edge label overflows the background
digraph g1 {
a->b [label=<<table bgcolor="orange" border="0" cellspacing="0"><tr><td>aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa</td></tr></table>>];
}
[dot]
digraph g1 {
a->b [label=<<table bgcolor=“orange” border=“0” cellspacing=“0”><tr><td>aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa</td></tr></table>>];
}
[/dot]
Result on Graphviz Visual Editor


