microsoft/automatic-graph-layout

[QUESTION] node with multi-line text

Closed this issue · 4 comments

Hi all,

Is it possible to put the text inside a node in multiple lines?

Example:
the node text is "foo bar" and I want to visualize it like this:
"foo
bar"

I think "foo\nbar" is going to work

I have tried modifying your sample MinWpfApp.
Wpf view renders it correctly, as you can see here:
MinWpfApp-screenshot

But if try to export the graph as svg image, I get this result:
MinWpfApp-export

To export the graph as svg image I have added this code at the end of the sample:

var gr = new GraphRenderer(graph);
gr.CalculateLayout();
SvgGraphWriter.Write(graph, path, null, null, 11);

Here the svg file exported:
MinWpfApp-export.svg.txt

Any ideas for the different behaviour?

@aPlacuzzi!

Obviously, there are at least two bugs there. One us not preserving the end of the line in a label , and another not keeping the octagon shape. It is open source; why don't you try to fix them?

@levnach
Ok, I should have found the two bugs.
I'll try to fix them, then I'll open a PR.