DayPilot.Gantt(id, options);
You can set the Gantt properties using options parameter. It accepts all Gantt properties and events and the following special properties:
HTML
<div id="dp"></div>
JavaScript
var gantt = new DayPilot.Gantt("dp"); gantt.theme = "gantt_white"; gantt.tasks.list = [ { id: 1, start: "2015-01-01T00:00:00", end: "2015-01-01T15:00:00", text: "Task 1" } ]; gantt.init(); gantt.scrollTo("2015-01-01");
Initialization with properties
var gantt= new DayPilot.Gantt("dp", { theme: "gantt_white", tasks: [ { id: 1, start: "2015-01-01T00:00:00", end: "2015-01-01T15:00:00", text: "Task 1" } ], scrollTo: "2015-01-01" }); gantt.init();