Ruby-Graphviz icon indicating copy to clipboard operation
Ruby-Graphviz copied to clipboard

label HTML with table not working

Open andresgutgon opened this issue 7 years ago • 1 comments

Hi, I'm running example73.rb but adding this line:

g.add_nodes "TABLE_EXAMPLE", label: '<TABLE><TR><TD>Hello World</TD></TR></TABLE>'

The result is not parsed as an HTML table: image

Any idea why this is not working?

andresgutgon avatar Apr 21 '17 10:04 andresgutgon

@andresgutgon probably because you didn't include the enclosing angle brackets in the label string. Try:

g.add_nodes "TABLE_EXAMPLE", label: '<<TABLE><TR><TD>Hello World</TD></TR></TABLE>>'

See the graphviz docs for more info: http://graphviz.org/content/node-shapes#html

waynr avatar May 17 '17 15:05 waynr