microsoft / automatic-graph-layout

A set of tools for graph layout and viewing
Other
1.36k stars 304 forks source link

Using WpfGraphControl. Want to export SVG. #372

Open MichaelHoffmeisterFesto opened 3 months ago

MichaelHoffmeisterFesto commented 3 months ago

Hello! Thank you for maintaining this. I am successfully using WpfGraphControl to visualize production bill-of-materials (BOMs). I want to export SVG.

However, the WpfGraphControl does not seem to seem to assign layout information to the nodes, so that

var svgWriter = new SvgGraphWriter(writer.BaseStream, drawingGraph);
svgWriter.Write();

does render very small elements and no node text (no Label.Width given).

Can you help?

image

levnach commented 3 months ago

I committed a fix. I hope it works now.

festo-i40 commented 3 months ago

Thank you, Sir! Will your commit end up in a new nuget version somehow in the future? (I am asking because adding source-code testwise to my 60+ project solution is not that easy).

levnach commented 3 months ago

Somehow, I have not produced a single nuget. Please feel free to produce one.