Visualizations of http://jehiah.cz/one-one/

24 views
Skip to first unread message

subbu

unread,
Jan 16, 2012, 5:28:12 AM1/16/12
to d3...@googlegroups.com
Interesting wedge animations at the bottom here http://jehiah.cz/one-one/

Any ideas how they are being done?

Kyle Foreman

unread,
Jan 16, 2012, 6:29:56 AM1/16/12
to d3...@googlegroups.com
Unfortunately the code is minified so it'd be a pain to read through (http://jehiah.cz/one-one/static/one-one.min.js), but I imagine he's just changing the outer radius of an arc element (https://github.com/mbostock/d3/wiki/SVG-Shapes#wiki-arc_outerRadius).

Shripad K

unread,
Jan 16, 2012, 6:58:36 AM1/16/12
to d3...@googlegroups.com
no i guess its easier than that! just do scale transform on mouseover and back to (1,1) on mouseout.

Kyle Foreman

unread,
Jan 16, 2012, 7:25:30 AM1/16/12
to d3...@googlegroups.com
No, scale transform would cause it to grow in all directions. You need it to expand outward from the center of the circle.

Nelson Minar

unread,
Jan 16, 2012, 11:05:34 AM1/16/12
to d3...@googlegroups.com
On Mon, Jan 16, 2012 at 2:28 AM, subbu <subramani...@gmail.com> wrote:
Interesting wedge animations at the bottom here http://jehiah.cz/one-one/
Any ideas how they are being done?

It's a D3 site. I do something similar here (press the Play button in the middle of the calendar):


It's pretty simple. I use d3.svg.arc() to draw the arc. outerRadius is the thing that varies and I use .transition() to animate it. In my case D3's automatic transitions just work; the built in interpolator understands arcs, or else interpolates the underlying SVG path in a way that works right.

subbu

unread,
Jan 16, 2012, 1:28:21 PM1/16/12
to d3...@googlegroups.com
Thank you Nelson. Your visualizations are beautiful.
Reply all
Reply to author
Forward
0 new messages