rotate in position

805 views
Skip to first unread message

robert

unread,
Jan 14, 2012, 8:14:55 PM1/14/12
to d3-js
Dear All --

Curious to know if there are any (maybe new) facilities in d3 for
rotating in position, if you will -- around an origin centered on the
svg element.

I imagine that svg by default is rotating around an origin, which can
be problematic since items may have similar components in x but not y,
etc.

Any tips or techniques?

Thanks,
-Robert

Ian Johnson

unread,
Jan 14, 2012, 8:20:18 PM1/14/12
to d3...@googlegroups.com

The Svg rotate transformation takes an optional x,y pair so if you want to rotate 90deg about 10,10 it would be
.attr('transform', 'rotate(90, 10, 10)')

Reply all
Reply to author
Forward
0 new messages