News for hackers. Stuff that matters.
Re:Ask HN: Wanted – a D3.js mentor by potatosareok on Saturday May 30, 2015 @01:00PM (#9630778)
Hi Colin - I had to implement something with d3 force before that might be kind of similar. I hadn't used d3 before so my solution is pretty hacky.

- http://bl.ocks.org/mbostock/3750558 - for basis of pinning nodes.

- setting CSS marker-end attribute on the line to get arrow (based off this example but in the end I didn't need as fancy as them so I just set it on all .link instead of dynamically: http://bl.ocks.org/mbostock/1153292)

I basically throw my data into there and let force directed work it out. Then I manually pin any of the nodes I want and basically have a save functionality, so next time I load the graph, any pinned nodes are back in the same place. I'd share the code but it's work and besides which, it's pretty simple (each graph has an id, there's a db I have where I store (id) => text(string(graph => json))).

As for boxes of text it shoudn't be too different then with circles - I personally went with onHover using qTip.s for extra data (my node are either circle or some custom images, and they all have a text besides them that is server fqdn).

Not entirely sure where you want the buttons to be in this graph though.

Re:Ask HN: Wanted – a D3.js mentor by ColinWright on Saturday May 30, 2015 @01:10PM (#9630828)
That's definitely part of the solution I need - thank you for that. I'll take a copy and see if I can munge it with some of the other things I need.

Cheers!