d3 refactor: rotate instead of sin/cos
make d3 svg responsive and webkit compatible (using a <g> to translate origin)