Always show groups?

110 views
Skip to first unread message

Oleg Varaksin

unread,
Feb 2, 2014, 4:00:31 PM2/2/14
to chap-link...@googlegroups.com
Is it possible to always show groups when even no events for the group are available? My use case: events will be lazy loaded and added to the timeline when the timeline is being moved. Example http://www.primefaces.org/showcase-ext/sections/timeline/lazy.jsf That means, if no events with a specific group were lazy added, this group will not be shown. But users want to see groups always on screen.

I looked the code. There is a div with the style class "timeline-groups-axis". The style "display" is set to "none" if no events for that group exist. My idea is to add an attribite "groupsShowAlways". If it is true, the style "display" will not be set to "none". What do you mean, will it work? Can we add this attribite to the timeline? Are there other tricks maybe?

Thanks in advance for all tips.

Oleg.

Jos de Jong

unread,
Feb 5, 2014, 4:20:28 AM2/5/14
to chap-link...@googlegroups.com
This is indeed not supported, but is really useful. De grouping functionality of the Timeline is quite limited. Note that the successor of the library, vis.js, already supports these grouping features.

Oleg Varaksin

unread,
Feb 5, 2014, 5:17:57 AM2/5/14
to chap-link...@googlegroups.com
Are there limitations of vis.js in comparison to the current timeline lib? I mean, can we migrate to vis.js without some timeline functionality gets lost?

Thanks.


2014-02-05 Jos de Jong <j...@almende.org>:

--
You received this message because you are subscribed to a topic in the Google Groups "CHAP Links Library" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/chap-links-library/AEuJbNehKZk/unsubscribe.
To unsubscribe from this group and all its topics, send an email to chap-links-libr...@googlegroups.com.
To post to this group, send email to chap-link...@googlegroups.com.
Visit this group at http://groups.google.com/group/chap-links-library.
For more options, visit https://groups.google.com/groups/opt_out.

Jos de Jong

unread,
Feb 5, 2014, 5:22:34 AM2/5/14
to chap-link...@googlegroups.com, ovar...@googlemail.com
The Timeline of vis.js is already more advanced in a couple of areas, but hasn't yet support for draggable items and a lot of other smaller features. We are working on that.

So it depends on your use case whether the vis.js Timeline is already usable for you.

Raj Patel

unread,
Feb 5, 2014, 10:26:42 AM2/5/14
to chap-link...@googlegroups.com, ovar...@googlemail.com
When adding groups, try adding them with null dates...

Here's how I load groups only:

data = new google.visualization.DataTable();
data.addColumn('datetime', 'start');
data.addColumn('datetime', 'end');
data.addColumn('string', 'content');
data.addColumn('string', 'group');
data.addColumn('string', 'className');

view = new google.visualization.DataView(data);

$.get('timeline/getChannels', function(d) {
$(d.channels).each(function(i, channel) {
data.addRow([null ,null ,null ,channel.channelName ,null ]);
});
timeline.draw(data, options);
});

So try just adding the row without start/end dates

data.addRow([null ,null ,null ,channel.channelName ,null ]);
Reply all
Reply to author
Forward
0 new messages