Live data from Hacker News

Labella.js – placing labels on a timeline without overlap

twitter.github.io

71–80 of 83 posts

Re: Labella.js – placing labels on a timeline without overlap

#71
post #63

Earlier quoted context omitted.

So down voting a question about why my critical feedback was being voted down without legitimate argument (or even just an educated one) proves that HN can be a myopic mob sometimes (actually often) I suppose this will be down voted too? Silencing critical feedback feels good, eh?

I will always downvote complaints about downvotes. I do this because * I don't want to see complaints about downvotes * I believe that they are unconstructive 99% of the time * I don't think anyone else wants to see them

Oh wow you're an idiot.

Re: Labella.js – placing labels on a timeline without overlap

#72
post #64
post #63

Earlier quoted context omitted.

I will always downvote complaints about downvotes. I do this because * I don't want to see complaints about downvotes * I believe that they are unconstructive 99% of the time * I don't think anyone else wants to see them

HN also has a rule about it: Please resist commenting about being downvoted. It never does any good, and it makes boring reading. https://news.ycombinator.com/newsguidelines.html

It doesnt mean anyone should accept the rules. That is BS.

Re: Labella.js – placing labels on a timeline without overlap

#74
post #38

Wouldn't it look more readable if the connectors are straight lines with 90 degree bends instead of curves (like a neatly laid out circuit or wire diagram or tube network). The current version is artsy. Thanks for sharing this though. Looks very cool.

I am not sure it would although that was also my first thought. 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.

That's how I felt with the 90 degrees bends.

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.

Re: Labella.js – placing labels on a timeline without overlap

#76
post #28

Is this restricted to a straight line or can it be used to label any svg (?) path?

The intention of this work was to find ways to put labels on any axis (1D). So if you want to use this to label peaks of area chart you can run labella to get the x position and then figure out y position by yourself.

But it won't support placing label on a zigzag path.

Re: Labella.js – placing labels on a timeline without overlap

#78

Can someone briefly explain, at a high level, the positioning algorithm that one would use to solve a problem like this? 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.

This is not reingold-tilford. The algorithm has two parts. The first part is a heuristic to distribute nodes into multiple layers when it won't fit in one. Then for each layer, it is a physics simulation with the labels. Each label has attraction force to the desired position, but they also push each other.

Re: Labella.js – placing labels on a timeline without overlap

#79
post #63

Earlier quoted context omitted.

I will always downvote complaints about downvotes. I do this because * I don't want to see complaints about downvotes * I believe that they are unconstructive 99% of the time * I don't think anyone else wants to see them

Oh wow you're an idiot.

> Oh wow you're an idiot.

Your comments have repeatedly broken the HN guidelines by being both uncivil and unsubstantive. We ban accounts that do that, so please (re-)read the guidelines and follow them from now on.

https://news.ycombinator.com/newsguidelines.html

https://news.ycombinator.com/newswelcome.html

https://news.ycombinator.com/showhn.html

Re: Labella.js – placing labels on a timeline without overlap

#80

It'd be cool if the creator used some filler text on the labels generated on the home page so that we could see what it looks like that way.

Yes, I thought I was missing something.

Here it is. http://twitter.github.io/labella.js/with_text.html
Post reply on HN