d3.layout.timeline icon indicating copy to clipboard operation
d3.layout.timeline copied to clipboard

abstract layout

Open Fil opened this issue 9 years ago • 2 comments

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.

Fil avatar Sep 20 '16 20:09 Fil

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                                   ---------

Fil avatar Sep 21 '16 04:09 Fil

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).

Fil avatar Sep 21 '16 14:09 Fil