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

Option to always stack timeline items #329

Closed
medowlock opened this issue Sep 18, 2014 · 10 comments
Closed

Option to always stack timeline items #329

medowlock opened this issue Sep 18, 2014 · 10 comments

Comments

@medowlock
Copy link

Hi,

Have you considered adding an option to the timeline so that items are always stacked on top of each other. Currently, with the stack option set to true, the items are still displayed on the same line when not overlapping.

One "hack" for this would be using one group for each item, but that limits the usage of groups.

Or maybe there is a way to do this now and I missed it...

Thanks!

@josdejong
Copy link
Contributor

I can't think of any usecases for this. Indeed, if you need this you can put each item in an other group.

@medowlock
Copy link
Author

I don't agree.

Any "Gantt chart" like representation, where the user would want to see the "activities" on separate lines for a clear view, rather than having them squashed together in one row, seems like a possible usecase. Then what happens if you actually need to use groups for what they were designed for ... ?

I believe this is the first thing that comes to mind when the user reads the docs and finds the "stack" option. Don't really understand why would someone want to have items overlapping each other, which is the case when using "stack:false" and items sharing the same time period.

This library has been awesome for our needs, with this small exception, which doesn't really seem to make sense (the current way "stack" works, I mean).

Anyway ... my 2 cents...

@AlexDM0
Copy link
Contributor

AlexDM0 commented Sep 23, 2014

Wouldn't it be useful if the items could be given an absolute (custom) height (elevation, css top) if stack was disabled? I can think of numerous use cases for this.. Have different bands of items etc. The user could choose these based on the usecase, where he is essentially manually stacking. This can be better than automatic because the user knows what data is coming in and what CAN overlap with other items.

Regards

@josdejong
Copy link
Contributor

@medowlock In the case of Gantt charts, you typically want a label on the left side of each row, and have each row contain a single item. To realize this with the Timeline you can use one group for each row and let each group contain one item, no problem right? Don't you need labels on the left side for your gantt chart or did you have some idea on how to realize this without using groups?

Then what happens if you actually need to use groups for what they were designed for ... ?

I guess that would be the case when you would want to have a series of gantt charts in one Timeline, where every gantt chart is another group? I'm not sure whether there are concrete use cases for this but maybe you can come up with some ;)

Don't really understand why would someone want to have items overlapping each other, which is the case when using "stack:false" and items sharing the same time period.

When showing a calendar or a planning on the Timeline for a single person or resource, items typically do (or should) not overlap but exactly align with each other. In these cases you want to have the items always neatly aligned besides each other and prevent the items to accidentally get stacked due to round off errors, and turning stacking off also improves performance. We use stack:false this quite regularly ourselves.

This library has been awesome for our needs, with this small exception, which doesn't really seem to make sense (the current way "stack" works, I mean).

I still don't fully get why you think the stacking works so weird right now. You clearly have a very different usage of the Timeline in mind than we had when building it :). It's good to see the Timeline applied in such different use cases. Maybe you can explain your idea of stacking with a screenshot?

@AlexDM0 that's an interesting idea, to be able to give items a fixed vertical position. I would like to think a little bit more about when you would need this, and in these cases, see whether there are no "easier" solutions (such as what we solved already by introducing groups, removing the need to manually position items within artificial groups).

@AlexDM0
Copy link
Contributor

AlexDM0 commented Sep 24, 2014

In my current case, I have a group per worker, I might want to use vertical positioning to classify different tasks per worker? The subgroups mentioned elsewhere would essentially be this, probably better as well.

Cheers!

@medowlock
Copy link
Author

@josdejong AlexDM0 says it better than I can in his last comment. This is something similar to what I had in mind when opening this ticket.

I created a picture of what was going through my mind when saying “Gantt chart” like. What is hopefully noticeable is that once the user has made use of groups, there is no possibility for the timeline items to be set on separate rows.
timeline-example

The reason “stack” seems (better said used to seem, thanks to your explanation) weird to me is because the only difference between false and true is when items overlap (might be wrong here, if so, sorry :)). What I personally expected was that “stack: false” to have the current behavior of “stack: true”, while the latter would behave like in the picture. Again though, I understand now why stack does what it does and why it is useful.

@AlexDM0’s idea, by my understanding of it, is better because it would allow users to set multiple items on the same row, while having multiple rows within the same group (subgroups).

@AlexDM0
Copy link
Contributor

AlexDM0 commented Sep 24, 2014

@medowlock we see stack is true to be the allowance of vertically moving items so they stack upon eachother like books on a table. You mean stacking like filling the same space. This is a definition issue and we have adhered to this one, which is valid by itself. With that, I think we can close the discussion on whether it makes sense because the same arguments can be made for both sides.

There are multiple other issues handling this, gantt charts and subgroups. It is on the to-do list but we cannot give an ETA. Don't expect this in the next few months though.

Regards,

Alex

@AlexDM0
Copy link
Contributor

AlexDM0 commented Oct 1, 2014

Hi Medowlock,

Since there are multiple issues on this, I'll close this issue. It is on our todo list. Hopefully it will be here in the next month.

Regards,

Alex

@AlexDM0 AlexDM0 closed this as completed Oct 1, 2014
@medowlock
Copy link
Author

Great !

Thank you!

@AlexDM0
Copy link
Contributor

AlexDM0 commented Oct 1, 2014

I'll refer you to #325 where I'm trying to collect all people needing this.

Regards,

Alex

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