Hi team,
After loading my gantt the date headers in the viewpreset does not change to reflect the new project start date from the loaded json. how can i achieve this
g.project.startDate reflects the new date but the gantt view preset is not reflecting it
const data = info.file.response.tasks.rows;
const g = window.gantt.store;
g.removeAll();
[b] g.project.setStartDate(info.file.response.project.startDate);[/b]
g.taskStore.loadData(data);
g.dependencyStore.loadData(info.file.response.dependencies.rows);
Hi Mat, Thanks for you reply but i have gantt.zoomToFit() already but still not resolved.my project startdate is 2018-10-08 but the gantt view pres is still showing start of June 2008 even with zoom to fit called as showed in the attached file
const data = info.file.response
const gantt = window.gantt;
gantt.store.removeAll();
gantt.store.project.setStartDate(data.project.startDate); //"2018-10-08"
gantt.store.taskStore.loadData(data.tasks.rows);
gantt.store.dependencyStore.loadData(
data.dependencies.rows //dependencies data
);
gantt.zoomToFit();