d3.layout.timeline
d3.layout.timeline copied to clipboard
abstract layout
One issue I have with the current layout is that it computes x,y positions in pixels, and I think it would be better to have positions in abstract units (like "[ lane 1, datestart, dateend ]") and use X() and Y() scales to convert them to pixels. I feel it would be more logical this way.
Another example where abstract lane units would be useful is when we want lanes that are alternatively towards "top" and towards "bottom"
3 -- ----------
1 ------ ---------------- ---
0 ----------- ---- ------- --------- ------
2 ----- ------ ---------
4 ---------
I'm sorry I hadn't seen that the “features” I wanted are there, if I use d.originalStart, d.originalEnd and d.lane. So this is more a question of programming style (data mutability etc, abstraction level, dependencies).