Better HN
topnewbestaskshowjobs
Log inSign up

kristw

18 karma · joined Dec 4, 2013 (12y ago) · 17 submissions

Visualize data at @twitter during the day. Battle with open data and code random stuffs at night.
Submissions

1.

How can I drink a bubble tea to ensure that I don’t finish the tea before bobas?(medium.com ↗)

20 points · by kristw · 8y ago · 11 comments

2.

The most discussed moment for each Game of Thrones character on Twitter(interactive.twitter.com ↗)

1 points · by kristw · 9y ago · discuss

3.

Idioms you should know for software development(medium.com ↗)

2 points · by kristw · 9y ago · discuss

4.

Creating Yeoman generators easily with yeoman-easily(medium.com ↗)

1 points · by kristw · 10y ago · discuss

5.

Every goal in EURO2016, when it happened, who scored, and reactions on Twitter(interactive.twitter.com ↗)

1 points · by kristw · 10y ago · discuss

6.

How every #GameOfThrones episode has been discussed on Twitter, visualized(interactive.twitter.com ↗)

1 points · by kristw · 10y ago · discuss

7.

Create your own Grid Map visualization, a semi-automatic way(medium.com ↗)

3 points · by kristw · 10y ago · discuss

comment 10y ago · link · parent

This example has text inside the boxes. I use svg's .getBBox() to obtain width/height for each label.

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.

comment 10y ago · link · parent

That was to showcase that you can render it in any orientation.

This example might be a more likely use case for left/right (all labels usually have same height)

http://twitter.github.io/labella.js/with_text.html

comment 10y ago · link · parent

http://twitter.github.io/labella.js/with_text.html

comment 10y ago · link · parent

Here it is. http://twitter.github.io/labella.js/with_text.html

comment 10y ago · link · parent

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.

comment 10y ago · link · parent

fixed.

comment 10y ago · link · parent

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.

comment 10y ago · link · parent

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.

comment 10y ago · link · parent

Nice idea. Will try to add that when I have time.

17.

A simple scaffold for angularjs + requirejs + d3(kristw.yellowpigz.com ↗)

2 points · by kristw · 12y ago · discuss