I have a scheduler that works great using the built-in Tree Timeline view. I want to create custom view which still uses the Tree Timeline but loads a different data set. I added a new tab called cyclic_tab and need help getting the proper display and data loaded. Here is the usage cases:
- The page loads to standard view (tree timeline)
- The user clicks Cyclic tab and the view stays in tree timeline but the data set changes
The views in this case server as a different way to view the same data set. When I click the cyclic button using the code below the view changes to day view and not tree timeline. Ideas?
scheduler.locale.labels.timeline_tab = "Standard"
scheduler.locale.labels.cyclic_tab = "Cyclic"
scheduler.config.xml_date = "%n/%j/%Y %H:%i";
scheduler.config.drag_resize = false;
scheduler.config.drag_create = false;
scheduler.config.dblclick_create = false;
scheduler.config.fix_tab_position = false;
scheduler.createTimelineView({
section_autoheight: false,
name: "timeline",
x_unit: "hour",
x_date: "%H",
x_step: 1,
x_size: eval(data.d.Size),
x_start: eval(data.d.Start),
x_length: eval(data.d.Size),
y_unit: eval(data.d.YUnit),
y_property: "section_id",
render: "tree",
folder_events_available: true, // Make true when you want to show the supplier breakdown
dy: 20
});
scheduler.attachEvent("onTemplatesReady", function () {
scheduler.date.cyclic_start = scheduler.date.timeline_start;
scheduler.templates.cyclic_date = scheduler.templates.timeline_date;
scheduler.templates.cyclic_scale_date = scheduler.templates.timeline_scale_date;
scheduler.date.add_cyclic = function (date, inc) { return scheduler.date.add_timeline(date, inc); }
});
var scheduler_id = $('[id$=MyTimeline]').attr("id");
scheduler.init(scheduler_id, new Date("01/01/1900"), "timeline");
loadScheduler(data);