Skip to content
This repository has been archived by the owner on Jul 29, 2019. It is now read-only.

Timeline 4.17.0 layout with margin.item.horizontal = 0 is broken #2318

Closed
achimschrepfer opened this issue Nov 15, 2016 · 8 comments
Closed

Comments

@achimschrepfer
Copy link

In previous versions setting the margin to zero worked like this
Vis Timeline 4.16.1

Now in 4.17.0 it seems to be broken:
Vis Timeline 4.17.0

My options are as follows:
var options = { start: Date.now() - 60 * 60 * 1000, end: new Date(Date.now() + 8 * 60 * 60 * 1000), editable: true, margin: { item: { horizontal: 0 } } };

Here is an example of the data used:
[{"id":1080,"group":2027,"content":"13 (Crips-A)","start":"2016-11-15T13:01:33","end":"2016-11-15T18:11:55.43","setupSeconds":1800,"materialNumber":"Crips-A","targetQuantity":4000.00,"actualQuantity":4000.00,"orderNumber":"13","orderStatus":"Finished"},{"id":1094,"group":2027,"content":"27 (Flakes)","start":"2016-11-15T18:11:56","end":"2016-11-15T23:36:19.551","setupSeconds":1800,"materialNumber":"Flakes","targetQuantity":4200.00,"actualQuantity":0.0,"orderNumber":"27","orderStatus":"Planned"},{"id":1100,"group":2027,"content":"33 (Flakes)","start":"2016-11-15T23:36:20","end":"2016-11-16T05:00:43.551","setupSeconds":1800,"materialNumber":"Flakes","targetQuantity":4200.00,"actualQuantity":3990.00,"orderNumber":"33","orderStatus":"Running"},{"id":1102,"group":2027,"content":"35 (Choc1)","start":"2016-11-16T05:00:44","end":"2016-11-16T10:32:08.112","setupSeconds":1800,"materialNumber":"Choc1","targetQuantity":4300.00,"actualQuantity":0.0,"orderNumber":"35","orderStatus":"Planned"},{"id":1105,"group":2027,"content":"38 (Whitey7c)","start":"2016-11-16T10:32:09","end":"2016-11-16T15:07:28.626","setupSeconds":1800,"materialNumber":"Whitey7c","targetQuantity":3500.00,"actualQuantity":0.0,"orderNumber":"38","orderStatus":"Planned"},{"id":1107,"group":2027,"content":"40 (Flakes)","start":"2016-11-16T15:07:29","end":"2016-11-16T19:35:48.065","setupSeconds":1800,"materialNumber":"Flakes","targetQuantity":3400.00,"actualQuantity":3400.00,"orderNumber":"40","orderStatus":"Finished"}]

@yotamberk
Copy link
Contributor

Thanks for reporting! (A temporary solution is to set it to margin: { item: { horizontal: -1 } })

@mojoaxel
Copy link
Member

have you tried the option stack: false ?

@yotamberk
Copy link
Contributor

If stacking is still important to you, try margin: { item: { horizontal: -0.5 } }

@yotamberk
Copy link
Contributor

@achimschrepfer Can we close this issue? Does our solutions satisfy the problem?

@yotamberk yotamberk removed their assignment Nov 25, 2016
@achimschrepfer
Copy link
Author

Please let me check out the suggestions first. I think I can do this during this day.

@achimschrepfer
Copy link
Author

Hi all,

i finally made a test again with 4.17.0 (from npm). It all works fine now! Since my last test I only changed some options like this:

options = { start: Date.now() - 60 * 60 * 1000, end: new Date(Date.now() + 16 * 60 * 60 * 1000), editable: true, autoResize: true, orientation: "top", clickToUse: true, groupOrder: "position", margin: { item: { horizontal: 0 } } };

So I don't know why it works but I think you can close this issue.

@achimschrepfer
Copy link
Author

Or at least I can :-)

Thanks
Achim

@achimschrepfer
Copy link
Author

BTW: today I've seen this issue again (with the exact same settings as mentioned above, so to me it seem's like a rounding issue or something like that). I gave @mojoaxel's suggestion a try and added "stack: false" to my options wich works like a charm.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants