DHTMLX Docs & Samples Explorer

Load from XML

Source
<link type="text/css" rel="stylesheet" href="../../codebase/dhtmlxgantt.css">
<script type="text/javascript" language="JavaScript" src="../../codebase/dhtmlxcommon.js"></script>
<script type="text/javascript" language="JavaScript" src="../../codebase/dhtmlxgantt.js"></script>
<script type="text/javascript" language="JavaScript">
/*<![CDATA[*/
function createChartControl(htmlDiv1)
{
    // Create Gantt control
    var ganttChartControl = new GanttChart();
    // Setup paths and behavior
    ganttChartControl.setImagePath("../../codebase/imgs/");
    // Build control on the page
    ganttChartControl.create(htmlDiv1);
    // Load data structure        
    ganttChartControl.loadData("data/data.xml",true,true);
}
/*]]>*/
</script>
 
<div style="width:950px; height:620px; position:relative" id="GanttDiv"></div>