vis-timeline icon indicating copy to clipboard operation
vis-timeline copied to clipboard

Randomly stacked items that do not overlap.

Open payitforwardnow opened this issue 6 years ago • 4 comments

I'm using V5. For some unknown reason I'm getting stacked items in a group. First, the items don't overlap (I've verified the start/end dates). Second, I have the stack option set to false. Attached is a screen shot showing the problem.

image

All the items you see that are straddling the line between groups actually belong to the group above where they are positioned. Very strange.

FWIW - I am using nested groups. The issue appears to happen if I set showNested=false in each main group. If I set showNested=true I see what I would expect.

image

payitforwardnow avatar Sep 19 '19 02:09 payitforwardnow

Hi, I have a similiar issue.

vis-timeline version is 6.0.3

Screenshot from 2019-10-22 15-35-22

Timeline options: stack=false stackSubgroups=true

You are seeing items in a nested group, one level deep. Each item has a subgroup = item's id. If they have no subgroup specified OR share the same subgroup, then they will overlap. As you can see, there is a difference of 1 month between the items on the left side and those on the right side.

MartinManev avatar Oct 22 '19 12:10 MartinManev

Can you please supply a jsbin so I can reproduce this and solve the bug? I can;t reproduce the issue.

yotamberk avatar Nov 09 '19 21:11 yotamberk

Can you please supply a jsbin so I can reproduce this and solve the bug? I can;t reproduce the issue.

For my case: https://jsfiddle.net/j9otzmvx/

Setting stackSubgroups to false seems to fix the stacking issue and the items stack as expected, but then why do they stack when the option states that they should not stack... https://jsfiddle.net/j9otzmvx/1/

The docs for stackSubgroups state:

If true (default), subgroups will be stacked on top of each other such that they do not overlap.

MartinManev avatar Nov 11 '19 08:11 MartinManev

thanks a lot @MartinManev

0x6e69636f avatar Sep 11 '21 18:09 0x6e69636f