Labella.js – placing labels on a timeline without overlap
twitter.github.io
twitter.github.io
EDIT: Some inspiration of what's possible: https://www.google.co.uk/search?q=graphviz&source=lnms&tbm=i...
You saw the same problems with XFree86 WM/DEs. I spent months trying to get XFCE to be perfect in the late '00s, but it just always looked off. I'm a keyboard-consoler 98% of the time anyways, so staying in my `screen' instance was fine (in fact preferable,)with a nicely configured Konsole (or was it aterm, or did E17 have it's own Term? One of those..) full-screened. But such is the folly of projects like DIA and GV. It's getting better as NYT and all end up hiring people who have multi-disciplinarian abilities (I think Square or AirBNB open-sourced their dashboard which has a lot of good vis tools) but I really just want a standard, declarative language I can embed in Pandoc that looks good whether I export to PDF, HTML or print it.
*LaTeX not withstanding. Knuth brilliantly applied mathematical rules to typesetting and I maintain it still beats out InDesign in certain scenarios, granted I've heard many-a-grad-student's yells of frustration as they try to embed their results into a .tex, so YMMV. Look at this TeX and I defy anyone to tell me it's not pretty: https://bloerg.net/2014/09/20/a-modern-beamer-theme.html
The defaults are pretty wretched.
Sadly, osx only I think.
It would be nice though if someone made a "Twitter Bootstrap for Graphviz" that at least starts you off with some prettier defaults. :)
Looks fun, though.
As an exercise, set it to 200 points, wait for it to generate (will take a while), pick a point and find its label visually. It's surprisingly easy. I was able to do it.
Of course, the difference is, this isn't a physical ribbon cable you're breaking out - online, you should just be able to hover over the point and have the label pop right up! :-D
And for a clearer layout ( on a lot of labels), change the min-width and max-width for a "better" overview.
Here it is: http://codepen.io/Pestov/pen/BLpgm
Naturally you wouldn't be able to use their default tree layout because it assumes identically sized nodes but creating your own layout should be doable. If I remember correctly D3's tree layout code is 200LOC.
I am heading down this path now so I'm sorry to see both you and poster above giving up on D3 for this.
http://twitter.github.io/labella.js/with_text.html
The max width parameter is optional. I am not sure what are you trying to do with the graphs though. This library is not for graphs or trees. It's for points on single axis.
Reingold–Tilford was referenced below but doesn't seem applied in this case.
I've attempted to look through the code here but comments are limited and it is pretty imperative.
The slogan should be changed to "Labels on a timeline without overlap", just like the hacker news thread title. :)
This example might be a more likely use case for left/right (all labels usually have same height)
The current version is artsy. Thanks for sharing this though. Looks very cool.
The problem with the 90 degrees bends might be that they might look too similar and you end up a spaghetti monster where it's hard to see what line leads to were.
I need to look into this a little more.
However, you have the choice to draw it your own way. https://github.com/twitter/labella.js/blob/master/docs/Rende...
renderer.getWaypoints(node) will give you the positions on the route and you can draw the connector as you like.
What about the restrictions on the height imposed on the labels?
But it won't support placing label on a zigzag path.
You need something better than a linear progression of ticks if you want to track and label lot of events that have happened.
Also, it is a futile to suggest that automatically placing labels is scalable for any number of labels beyond 40 or so. The resulting diagram beyond 40 or so points is incomprehensible. I tried 200, but 50 or 70 would also most likely result in messy diagram.