worktile / ngx-gantt

A modern and powerful gantt chart component for Angular

Home Page:http://gantt.ngnice.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Repaint gantt control

Bykiev opened this issue · comments

Hi, is it possible to repaint gantt control? I'd like to implement 'fit to screen' feature by specifying columnWidth, but unfortunately after setting the new width it's not changes in UI.

Upd: workaround - hide and display component to cause repaint using ngIf

commented

Sorry, this is a defect that we will address in the future. Now I can provide you with a solution.

@ViewChild(NgxGanttComponent) ganttComponent: NgxGanttComponent;


changeWidth(){
    this.columnWidth=300;
    Promise.resolve().then(()=>{
        ganttComponent.detectChanges();       
   })
}