All examples By author By category About

eesur

d3 | how old will we be

My youngest is always asking me, 'how old will you be when I'm x years? and by brother/sister is x years

So this sketch is for him! but it was weird doing it, actually made me pause.

Used moment.js to calculate the dates; no real need though, as they were just subtractions—but handy if I do anything more detailed with the sketch.

The nav/options are an array (caled dates in the code) that can just be added to and changed, and the rest get's worked out and displayed.