Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Timeline: stack events even with groups #5

Open
Buttyx opened this issue Jul 3, 2012 · 28 comments
Open

Timeline: stack events even with groups #5

Buttyx opened this issue Jul 3, 2012 · 28 comments
Labels

Comments

@Buttyx
Copy link

Buttyx commented Jul 3, 2012

It would be useful to have a stacking feature to avoid overlapping events when working with groups.

Thanks for this nice library!

@josdejong
Copy link
Contributor

That makes sense, stacking the items per group. Before this can be implemented, the code must get more modular, right now the stacking only works for the complete data set.

thanks.

@tigist
Copy link

tigist commented Jul 7, 2012

Hi,

Yes it is good approach to have this feature.

Regards,
Tigist

On Tue, Jul 3, 2012 at 10:28 PM, Xavier Butty <
reply@reply.github.com

wrote:

It would be useful to have a stacking feature to avoid overlapping events
when working with groups.

Thanks for this nice library!


Reply to this email directly or view it on GitHub:
#5

@nadnerb
Copy link

nadnerb commented Aug 31, 2012

Is there any traction to implement this feature? Cheers.

@josdejong
Copy link
Contributor

Not yet started - there are still other ongoing projects with higher priority...

I hope we can implement clustering within a month.

@abmirayo
Copy link

abmirayo commented Oct 8, 2012

Hi Jos,

First of all, thanks a lot for the hard work. It's an excellent library and judging by the existing timeline JS solutions out there, this one is slowly becoming a standard.

I've seen the latest commits you've done, modularizing code and testing out clustering of events. I think that's a great start for a much anticipated stacking feature in groups. If I come up with a useful contribution, I will send you a request.

@josdejong
Copy link
Contributor

Thanks Antonio. The visualizations started as small, cute, single-page components. They have grown, and it is really necessary right now to modularize the code, break it into separate files, and create some builder to built the (minified) libraries for the components from the sources. We don't want to "just" modularize the code to keep the source maintainable, but also want to create a solution where the different parts of the visualizations can be combined. For example combine the Graph and the Timeline (and add bar graph?), combine the TreeGrid and Timeline, where the TreeGrid can act as flat or nested "groups" of the Timeline, etc.

Contributions are of course appreciated! This does not necessarily need to be contributing some full-fledged new feature, but can also be help with hunting bugs down, contributing with more documentation/examples/tutorials, etc.

@tmbo
Copy link

tmbo commented Dec 26, 2012

Is there any progress on this one? I really like the library, but this one is an essential feature for us.

Keep up the great work!

@josdejong
Copy link
Contributor

Hi Tom, there hasn't been progress on this issue, due to an ordinary lack of time. It is hard to give an estimation on when we can address this issue, though I'm afraid it will not be on short term.

@tmann-ttc
Copy link

Note that the docs for groups says "When events overlap each other, the will be stacked automatically." So this is the promised behavior. Without this, the groups feature is worthless if there are overlapping events. I would be happy to help with this fix, so let me know.

@josdejong
Copy link
Contributor

I'm not sure what you try to achieve with accusations of failed promises. Yes, we all want this feature and indeed, the feature is currently missing. As for the paragraph in the documentation that you are quoting: I see this is paragraph can be interpreted in different ways. The explanation on group was intended like this:

This column is optional.
explanation when groups are used:
When the group column is provided, all events with the same group are placed on one line. A vertical axis is displayed showing the groups. Grouping events can be useful for example when showing availability of multiple people, rooms, or other resources next to each other.
explanation when groups are not used:
If none of the events has a group, the events will be drawn on top of the horizontal axis. When events overlap each other, the will be stacked automatically.

It would be great if you could implement this feature. I'm afraid it will not be so trivial. The Timeline is currently at a point where the code as grown very rapidly and needs more abstraction/modularization. If you need extra explanation on the code please let me know.

@tmann-ttc
Copy link

I was trying out your Timeline because it was the only one with decent grouping functionality. The docs say that grouped events "will be stacked", so discovering that they did not was frustrating. I am not accusing you of "failed promises", but I do feel compelled to point out that the docs are incorrect.

I gave up on the Timeline for now and just did a simple CSS-based implementation. Not nearly as powerful, but sufficient for my needs.

If you decide you want to work on this project some more and want coding help, let me know. I don't want to go it alone if you already know the code quality needs improving.

@josdejong
Copy link
Contributor

Yeah I totally understand... for me its quite frustrating too: so many great plans and features waiting to get addressed and only so little time in a day. This project has been on the back burner latest months because of higher priority projects needing attention, but I hope that will change soon.

Thanks for your offer, we sure appreciate that! I think though that it will be handier to wait until we have restructured the code, that will make quite some of the awaiting feature requests much easier to accomplish.

@jeriley
Copy link

jeriley commented Feb 28, 2013

Got any ideas or guidance on where this would need to be plugged in? We're going to use it and I'd be happy to give you a pull request with the updates

@josdejong
Copy link
Contributor

The code structure of the Timeline is currently not very suitable for this kind of feature, so I'm afraid it will not be an easy task to "plug in" this feature. We are working on a large revision which will better suit more advanced/flexible functionality with groups, clusters, filters, dynamic data, etc.

@jeriley
Copy link

jeriley commented Mar 1, 2013

Completely aware it isn't easy -- I've spent a good bit of time yesterday digging around in the stackCalculateFinal, stackItems and a few other places where this might (should?) come into play and have a couple decent ideas on how to make that work. Are you close to getting your side done (should I wait?) or should I keep hacking away?

@josdejong
Copy link
Contributor

I can't give a tight schedule/deadline for this. I suppose this revision will be done within months, it depends on how much time I can free for this. But if you are really depending on it I would rather work on a solution independent from our schedule.

@ova2
Copy link
Contributor

ova2 commented Apr 17, 2013

The month is gone :-).

This is a must to have feature in my opinion. My customer would like to have the stacking for grouped events too and I think many of us would like to see this feature in the Timeline.

I realized it is not quite simple to extend the Timeline to support stacking for grouped events. Right?

@josdejong
Copy link
Contributor

Ok some explanation of the current status:

The grouping functionality of the Timeline is very limited. The current architecture of the Timeline is not suitable for advanced grouping functionality. And neither for clustering (#11, #53, #89), dynamic data handling (#39, #50), a vertical scrolling (#14), providing HTML as item/group contents instead of String, combining Timeline and Graph into one, and other feature requests. In short: the current code is at its end and need a big revision. There is no easy fix for all these feature requests, only some temporary workarounds.

We are working on a completely new version of the visualizations, which is much more flexible, component-based, and focuses on dynamic and manipulable data. It's going to be awesome. But it takes time to get there. You can have a very early look at our brand new project vis if you're curious.

I will not give a time estimate (as these estimates of mine turn out not to be that accurate - I'm sorry ;) ). If you need some extra functionality on short term please be creative and do some hacking yourself.

@mack-ludwin
Copy link

Great job on the Timeline!
Just wanted to say I'm looking foreward to this functionality as well.

For now, I'm generating multiple timelines to imitate stacking in groups. Not perfect, but does the job.

@ova2
Copy link
Contributor

ova2 commented May 4, 2013

He-he, I came up with multiple synchronized timelines too to imitate stacking in groups.

@hanfas
Copy link

hanfas commented Sep 29, 2013

Great work! I'm looking forward to this feature as well.

For anyone interested out there, I found a workaround for stacked grouped events.

For each event, before calling draw([data]) and setData([data]), first order your [data] appropriately the way you want them stacked within each group, Then find overlapping events and add a space as suffix for each group value that overlap.
User's can't see it, and Timeline respects my spaces as separate groups - dirty but works great!
You will get a slight performance hit for many events. I recommend using Underscore _.where and _.indexOf for fast operations on [data].
Hope this helps someone. =)

@pdaems
Copy link

pdaems commented Nov 4, 2013

Looking forward for this feature aswell any update on this ?

@hanfas Do you have some example code that could demonstrate this workaround ?

Thanks in advance !

@JulienOrain
Copy link
Contributor

+1 for the workaround example ;-)
Thanks !

@Muzahidul
Copy link

I was facing problem with stacking events in groups and also needed a vertical scrollbar to accommodate many overlapping events. So, I have developed a wrapper of timeline for myself. You guys can have a look: http://muzahidul-islam.blogspot.com/2014/03/a-timelinejs-wrapper-with-item-grouping.html

@jrosseel
Copy link

Hello Josdejong, great job on the timeline! I was wondering wether this functionallity is already implemented in the new vis library?

@jrosseel
Copy link

Just found out the answer myself: http://visjs.org/examples/timeline/05_groups.html Great!

@mmmppp101010
Copy link

Its too long time for this problem is initialized by Buttyx commented on 4 Jul 2012

I wish it should be available afap.

Thanks

@josdejong
Copy link
Contributor

Feel free to contribute, it's an open source project :)

Note that the successor of chap-links-library, vis.js, has support for stacking items in groups. We actively develop vis.js, and only maintain the chap-links-library.

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

No branches or pull requests