block by emeeks a666ed4846a7f8bb334d

Nested Timelines

Full Screen

Nested timelines in d3.layout.timeline.

You enable nested support by setting the timeline.children() accessor (which by default returns null) and pass the timeline either an array of time bands with child elements or a hierarchically structured JSON object (as in this example).

Child timeline heights are relative to the top-level parent(s).

Note that with nested timelines maxBandHeight only applies to the top-level parent (in the case of a single root node like this, it is the exact same as the height setting of timeline.size()).

index.html

art_movements.json

d3.layout.timeline.js