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

Stacking options for groups/subgroups/items #620

Closed
billbither opened this issue Feb 6, 2015 · 16 comments
Closed

Stacking options for groups/subgroups/items #620

billbither opened this issue Feb 6, 2015 · 16 comments

Comments

@billbither
Copy link

billbither commented Feb 6, 2015

I would like to specify more stacking options. For example some items (or group of items) I'd like to stack, while others I would not.

As you can see with the below image, the bottom row shouldn't stack as it represents continuous time of different conditions, while the subgroup above are single events that I'd like to stack.
image

@AlexDM0
Copy link
Contributor

AlexDM0 commented Feb 6, 2015

@josdejong maybe we could look into setting stacking per group?

@josdejong
Copy link
Contributor

@AlexDM0 I guess you mean stacking per subgroup, stacking works already fine for groups (see example). Yes, that makes sense.

@AlexDM0
Copy link
Contributor

AlexDM0 commented Feb 6, 2015

Hi,

I think you misunderstood, I ment to select on a group to group basis if you want to use automatic stacking OR the subgroups.

Regards

@josdejong
Copy link
Contributor

Ah ok, so you can choose per group whether you want stacking or subgroups or no stacking. Sounds good.

@billbither
Copy link
Author

Thanks, that will be a great enhancement!

@carueda
Copy link

carueda commented Mar 27, 2015

👍

@Atala
Copy link

Atala commented Sep 3, 2015

@josdejong did you have time to work on this?
@bbseven did you found a solution/hack for this ?

@josdejong
Copy link
Contributor

I haven't yet worked on it, it's still on the list. Unless we want a hacky solution, it will involve a serious refactoring of the subgroups.

@Atala
Copy link

Atala commented Sep 3, 2015

Thanks, I will have a look a little bit later.

@simo9000
Copy link
Contributor

simo9000 commented Dec 1, 2015

I just ran into the need for this feature. Can't wait until it's added.

@odick
Copy link

odick commented Jan 4, 2016

Hi all, not sure if this would help
I got the solution from stackoverflow

var options = {
    margin: {
        item : {
            horizontal : 0
        }
    }
};

result:

pale moon 2016-01-04 22 48 43

@simo9000
Copy link
Contributor

simo9000 commented Jan 6, 2016

I just tried this and it is a perfectly acceptable solution for my specific
problem.

Thanks.

On Mon, Jan 4, 2016 at 6:57 AM, odick notifications@github.com wrote:

Hi all, not sure if this would help
I got the solution from stackoverflow
http://stackoverflow.com/questions/33310120/vis-js-timeline-dont-stack-items-with-no-time-overlap

var options = {
margin: {
item : {
horizontal : 0
}
}
};

result:

[image: pale moon 2016-01-04 22 48 43]
https://cloud.githubusercontent.com/assets/1612324/12092180/72f1b5b0-b336-11e5-930d-6205451e3292.png


Reply to this email directly or view it on GitHub
#620 (comment).

@scipilot
Copy link

A workaround I've just implemented is to turn stacking off (globally) but then create "fake" subgroups for the items you do want to stack within a group. Just increment or randomise a subgroup ID as you add items in the "stacked group" - or use something unique from the item data to separate them. You could get clever and limit the stacking to say four rows max (then of course this is starting to sound like properly sub-grouping and ordering them with some item semantics).

I would like this stackable-per-group feature too, but find this workaround so simple to implement it suffices.

@mojoaxel mojoaxel removed the Question label Nov 1, 2016
@emillykkejensen
Copy link

Any news on if and when this feature will be implemented?

@yotamberk
Copy link
Contributor

This can be done with what @scipilot suggested. see : http://visjs.org/examples/timeline/items/expectedVsActualTimesItems.html
Closing this feature unless someone thinks that the current solution is not enough

@webwakko
Copy link

I love this feature, but...it would be nice if it had some kind of binding to the item that is on top.
meaning.. when moving the upper layer item, the one below should move along with it.
Not breaking the separate resizing posibility offcourse...

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