KeRNeLith / QuikGraph

Generic Graph Data Structures and Algorithms for .NET
https://kernelith.github.io/QuikGraph/
Microsoft Public License
453 stars 65 forks source link

[FEATURE] Implement HTML-Like labels for Graphviz DOT generation #27

Closed ExusAltimus closed 2 years ago

ExusAltimus commented 3 years ago

Quick and useful feature request https://www.graphviz.org/doc/info/shapes.html#html https://www.graphviz.org/pdf/dotguide.pdf

Graphviz supports HTML in labels, but needs to be escaped with < and > instead of quotes. I suggest extending the DotEscapers helper class in order to support html like labels and adding a property to the GraphvizVertex class named something like "IsHtmlLabel" to enable the feature Capture

KeRNeLith commented 3 years ago

Hello @ExusAltimus! This seems to indeed be a nice improvement. Do you have any start of work on the subject? I can try to have a look otherwise.

KeRNeLith commented 3 years ago

@ExusAltimus I prepared a branch for the feature. You can have a look at the html_label_graphviz branch, and feel free to give me feedback. Then I will plan to merge it to the master branch.

EDIT: Here is a temporary package to test the feature.

fireflycons commented 2 years ago

UpVote UpVote Would love to see this released soon.

Thanks.

KeRNeLith commented 2 years ago

Feature implemented in 49cc7031423b1053e67edff4432117fb7d827f23 and is available on releases >= 2.3.1.