createTimelineView(configuration)

Required library edition: This method works with any edition of DHTMLX library
Required library file: dhtmlxscheduler_timeline.js

create a timeline view

Method accepts only one parameter - configuration object

scheduler.createTimelineView({
     name:		"timeline",
     x_unit:	"minute",
     x_date:	"%H:%i",
     x_step:	30,
     x_size:	24,
     x_start:	16,
     x_length:	48,
     y_unit:
     	[	{key:1, label:"Section A"},
        	{key:2, label:"Section B"},
        	{key:3, label:"Section C"},
        	{key:4, label:"Section D"}	],
     y_property:"section_id",
     render:	"bar"
});
Parameters of createTimelineView
  • name - name of mode, same as name of the tab in html template ( you can have few different timelines, with different name , at the same time )
  • render - need to be set as “bar”, this parameter is reserved for future updates

X scale

  • x_unit - size of units on X scale ( can be minute, hour, day, week, month, year )
  • x_step - size of single scale step ( size defined in “x_unit”s)
  • x_size - how must steps need to be shown
  • x_start - value of minimal step
  • x_length - how much x_step need to be used to fill the whole day ( it is necessary only if you are using minute or hour as x_unit )

Y scale

  • y_property - name of event's property
  • y_unit - list of options for the property