Not really. You probably want to do the collision detection ("is there
already a label in this position?") and resolution yourself. If you
want to be clever you could try using the constraint relaxation used
by the force layout. See the Dorling cartogram for example, which
involves detecting and resolving collisions between circles; the same
technique could be adapted for label placement.
Mike
I added links between consecutive labels and set gravity to 0. Then I fiddled
with the friction parameter until it looked ok. I also added lines from the
axis position to the actual position to make it clear where each label belongs.
You can see it here -- http://www.larsko.org/v/igdp/
Getting the spacing between the labels approximately equal was the most
difficult bit. I guess there're better ways to do it, but I simply adjusted the
friction parameter until I got it.
Lars
Awesome, thanks for sharing! Great demonstration of the technique.
Your page will load faster (and GitHub will thank you) if you don't
serve files from raw.github.com. Instead say:
http://mbostock.github.com/d3/d3.min.js
Mike
Thanks! I copied this from somewhere a while ago and never bothered to change it
:)
Lars
Impressive work Lars!
I’ll be sure to have a closer look.
Ollie
--
@ollicle