Hi Team,
We have recently bought Gantt License and we were integrating it.
We have a dropdown and on change in the value in Dropdown Gantt needs to re-rendered.
First time it’s loading fine, but 2nd time i.e. when we change value from Dropdown, Gantt Chart is not rendering.
On changing value in Dropdown, Data to be displayed in the Gantt Chart changes so we are taking destructuring approach.
Following is the Code.
renderGanttChart() {
if(this.ganttInst) {
this.ganttInst.destructor();
this.ganttInst = null;
}
if(this.data.length > 0) {
this.ganttInst = Gantt.getGanttInstance();
this.setGanttData(); // Setting Gantt Data
this.setDefaultGanttConfig(); // Setting Gantt Config's
this.ganttInst.init(this.ganttContainer.nativeElement);
this.ganttInst.parse(this.ganttData);
} }
Can you please help me out here if I am doing wrong?
Also please suggest me if this is the suggested approach.
Thanks,
Bhavesh Kumar.