Articles in this section
Category / Section

How to customize the timescale range?

1 min read

Description:

This article describes how to customize timescale range.

Solution:

This requirement can be achieved by setting TimeScaleStartDate and TimeScaleEndDate properties in SfGantt.

The following code sample illustrates timescale range customization.

 

[XAML]
<!—Defining the time scale range in Gantt-->
<gantt:SfGantt x:Name="Gantt" 
                        TimescaleStartDate="2014/1/1" 
                        TimescaleEndDate="2014/7/1"
                        ItemsSource="{Binding TaskCollection}">
</gantt:SfGantt>
 

 

 

[C#]     
SfGantt gantt=new SfGantt();
gantt.ItemsSource = this.taskDetails.TaskCollection;
gantt.TimescaleStartDate=new DateTime(2014,1,1);
gantt.TimescaleEndDate=new DateTime(2014,7,1);
 

 

The following screenshot is the output of the above code.

Timescale range customization

 

Please find the required sample from the link.

 

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Please sign in to leave a comment
Access denied
Access denied