Gantt color

How do i change gantt bar color?




1 Reply

MS Monisha Sivanthilingam Syncfusion Team June 29, 2021 09:57 AM UTC

Hi Vin, 
 
Greetings from Syncfusion support. 
 
We can change the color of the taskbar using the queryTaskbarInfo event in Gantt Chart. The following code snippets demonstrate the solution. 
 
App.component.html 
 
<ejs-gantt 
      id="TaskMode" 
      height="450px" 
      [dataSource]="data" 
      [taskFields]="taskSettings" 
      [columns]="columns" 
      [treeColumnIndex]="1" 
      [splitterSettings]="splitterSettings" 
      [labelSettings]="labelSettings" 
      [editSettings]="editSettings" 
      height="450px" 
      [allowSelection]="true" 
      [projectStartDate]="projectStartDate" 
      [projectEndDate]="projectEndDate" 
      [highlightWeekends]="true" 
      [toolbar]="toolbar" 
      taskMode="Manual" 
      (queryTaskbarInfo)="queryTaskbarInfo($event)"> 
    </ejs-gantt> 
 
 
App.component.ts 
 
public queryTaskbarInfo(args: any) { 
    args.taskbarBgColor = 'red'; 
    args.progressBarBgColor = 'pink'; 
  } 
 
 
We have prepared a sample for your reference. 
 
Please contact us if you require any further assistance. 
 
Regards, 
Monisha. 


Loader.
Up arrow icon