Defines properties that allow customization of the appearance of timelines in a Resource view.
Namespace: MindFusion.Scheduling
File: TimelineSettings.js
JavaScript Copy Code |
---|
// class |
Use Calendar.currentView to set the view of your calendar to CalendarView.ResourceView.
The TimelineSettings class is used as a value for ResourceViewSettings.topTimelineSettings, ResourceViewSettings.middleTimelineSettings and ResourceViewSettings.bottomTimelineSettings.
The following code sets the time unit of the bottom timeline in a calendar to Days and the count of units between adjacent ticks to 3 (days). The code assumes you have initialized a <div> element with id "calendar" in a web page that references the JavaScript file, which contains this code:
JavaScript Copy Code |
---|
var p = MindFusion.Scheduling; // create a new instance of the calendar calendar = new p.Calendar(document.getElementById("calendar")); // set the view to ResourceView, which displays the distribution of resources over a period of time calendar.currentView = p.CalendarView.ResourceView; calendar.resourceViewSettings.bottomTimelineSettings.unit = p.TimeUnit.Days; calendar.resourceViewSettings.bottomTimelineSettings.unitCount = 3; |
MindFusion.Scheduling.TimelineSettings