All,
I have implemented the Gantt functionality using jQuery. I load some dummy tasks.
HTML:
<div class"mygantt" id="chart" style="width:100%; height:100%;"><div>
JS:
this.$chart = this.$("#chart");
this.$chart.dhx_gantt({
scale_unit: "month",
date_scale: "%M",
readonly: true
});
var tasks = {
data: [{
id: 1,
text: "Intake",
start_date: "01-09-2015",
duration: 11,
open: true,
color: "green"
}, {
id: 2,
text: "Preparation",
start_date: "12-09-2015",
duration: 15,
open: true,
color: "red"
}]
};
gantt.parse(tasks);
My issue is that the tasks are not showing in the timeline with the initial call.
I have implemented a “refresh” button and when I use this calling gantt.refreshData(), the tasks appear on the timeline.
I have implemented the refresh function also in the initial function and the loadTasks function, but every time the tasks are not showing on the initial load.
What am I doing wrong? How can I solve this issue?