News for hackers. Stuff that matters.
Re:Create diagrams with code using Graphviz by Dayshine on Wednesday June 10, 2020 @10:05AM (#23477109)
> - find someone to donate a generic orthogonal routing algorithm based on a modern algorithm since people want this

> - it would be a big effort, but move the core algorithms to a framework that supports interaction with layout generation

Yup, I think these are the ones that mean I never actually end up using Graphviz for anything :)

If I'm generating graphs, I want them laid out in a hierarchical style.

To do that, I need a library which can do that layout.

Those libraries are often written in a higher level language like C#, Java, etc, which come with their own simple drawing layer.

And then I don't need Graphviz anymore! (not that I'm suggesting graphviz should change)

Re:Create diagrams with code using Graphviz by bmh100 on Wednesday June 10, 2020 @10:56AM (#23477693)
I'm curious to know which libraries you use.

Also, in my own experience, I was able to get hierarchical layouts Graphviz by using directional graphs with subgraphs.

Re:Create diagrams with code using Graphviz by criddell on Wednesday June 10, 2020 @10:12AM (#23477192)
So what library do you use for hierarchical layouts?
Re:Create diagrams with code using Graphviz by boublepop on Thursday June 11, 2020 @01:48AM (#23485563)
Not OP, but I find yEd by yworks is a really good editor, and they also have a really cool developer library yFiles for HTML. It’s all proprietary, but just amazing to work with. Here’s an example of what you can do they made for GDC2019: https://live.yworks.com/demos/promo/GDC2019/ (It’s not mobile friendly however).
Re:Create diagrams with code using Graphviz by ygra on Thursday June 11, 2020 @06:05AM (#23487083)
(yWorks employee here, having worked on that Graph Drawing Contest)

Thank you for the kind words.

I've tried to make it mobile-friendlier, after our marketing team told me that most people who come via Twitter use a phone. But we kinda ran out of time, so I only managed to fix the most egregious problems. By now I also have a few ideas how to get the edge paths to be much better (and built-in Bézier spline routing would have helped, but that was only released publicly ... two days ago). Admittedly, while that layout has been produced by yFiles' hierarchical layout it needed a bit massaging to do so properly (about 200 lines of custom layout code, if I remember correctly). However, a proper library that gives you that flexibility helps tremendously, of course. Sometimes, trying to get Graphviz to do the right thing can be pretty complicated and may involve hacks like invisible edges to force a certain layering (although that was way back and I didn't know about "rank=foo" back then; perhaps the invisible edges were really not needed).

In any case, yEd Live (https://www.yworks.com/yed-live/), built on yFiles for HTML, also has an undocumented, incomplete, and rudimentary Graphviz import. I've got a fairly exhaustive list of issues and missing features, but little time to tackle it, sadly. This is further complicated by the fact that the DOT language uses attributes to describe the graph structure, visual attributes of items, and to control layout settings. That makes mapping Graphviz to anything else a bit hard.