This is a migrated thread and some comments may be shown as answers.

Setting the timeline to seconds

1 Answer 112 Views
GanttView
This is a migrated thread and some comments may be shown as answers.
Montanner
Top achievements
Rank 1
Montanner asked on 22 Apr 2014, 04:36 PM
Can someone please help me set the timeline to show continuous seconds. At the moment it resets to zero every 60 seconds but I need the time line to continue, I.E. 0 to 300 seconds?

1 Answer, 1 is accepted

Sort by
0
Polya
Telerik team
answered on 23 Apr 2014, 11:16 AM
Hi Montanner,

In order to format the Ticks in a suitable way (0-300) we need to create a custom TickInterval and format it to return the total seconds difference between the current date and the start date. Hence, we need to preserve the start date somewhere so we can have it in the FormatValue method for the date difference extraction. This means, however, that the custom TickInterval should not be used as a shared resource between RadGanttViews, because the start date will be unreliable.
In order to display 0 - 300 time ruler range we need to change the RadGanttView.VisibleRange to 300 seconds.
To show each second in reasonable pixels we can modify the RadGanttView.PixelLength to something like 00:00:00.010.

Please find attached a sample project demonstrating this approach. 
Hopefully this helps and is suitable for your scenario.


Regards,
Polya
Telerik
 
Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
 
Tags
GanttView
Asked by
Montanner
Top achievements
Rank 1
Answers by
Polya
Telerik team
Share this question
or