RadiantQ jQuery Gantt Package
How to adjust the chart's zoom level to make it show all the tasks in the project?
|
This topic shows how to change the zoom level of the GanttChart to show all the tasks in view.
Here is the code.
//Gantt Chart Instance var ganttChartInstance = $GanttChart.data("GanttChart"); //Earlier Task Start var earliestTaskStart = ganttControl.Model.Activities.StartTime; //later Task Start var latestTaskEnd = ganttControl.Model.Activities.EndTime.addDays(1); ganttChartInstance.SetStartTime(earliestTaskStart); ganttChartInstance.TrySetEndTime(latestTaskEnd); |
Here is the default gantt with hiding three or more tasks in view:
Here is the resultant gantt with showing all the tasks in view:
This is illustrated in this samples:
In HTML : ..\Samples\TimeScaleStartAndEnd.htm.
In ASP.NET MVC : ..\Views\Home\Common\TimeScaleStartAndEnd.cshtml.
In ASP.NET : ..\Samples\Common\TimeScaleStartAndEnd.aspx.
� RadiantQ 2022. All Rights Reserved.