Hi Mark,
We have analyzed your requirement and we have achieved this in workaround by using “create” client side event, this event will be triggered after the Gantt control get rendered.
Please find the code snippet below.
|
[HTML]
<ej-gantt #GanttControl id="GanttControl" [dataSource]="datasource" (create)="create($event)" ... >
</ej-gantt> |
|
[TS]
export class AppComponent {
//..
create(args) {
var ganttObj = $("#GanttControl").ejGantt("instance"),
date = new Date('01/10/2013'), // Set date as per your requirement
scrollObj = $("#GanttControl").find(".e-ganttviewerbodyContianer").ejScroller("instance"),
updatedLeft = ganttObj._getTaskLeft(date);
scrollObj.scrollX(updatedLeft)
}
} |
Please find the sample from the below location.
Please let us know if you need any other assistance.
Regards,
Suriyaprasanth R.