I think d3 has a thing for this :)