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

Hour, Minute and Second zoom level

7 Answers 294 Views
TimeLine
This is a migrated thread and some comments may be shown as answers.
Oleg
Top achievements
Rank 1
Oleg asked on 11 Jun 2012, 09:45 AM

Hi,

Although documentation and another thread here mean, it can zoom in to hours and minutes, I cant make it work... Here is my code:

<telerik:RadTimeline
             PeriodStart="{Binding MinViewDate, Mode=TwoWay}"
             PeriodEnd="{Binding MaxViewDate, Mode=TwoWay}"
                               
             StartPath="LastUpdate"
                                                                 
             ItemsSource="{Binding Activities}">
         <telerik:RadTimeline.Intervals>
               
             <telerik:DayInterval />
             <telerik:HourInterval />
             <telerik:MinuteInterval />
         </telerik:RadTimeline.Intervals>
     </telerik:RadTimeline>

Max. zoom level is day - see "view.png". Can you explain me, what I am doing wrong?

This is the DataVizualization.dll version I am using: 2012.1.326.1050

Oleg

7 Answers, 1 is accepted

Sort by
0
Oleg
Top achievements
Rank 1
answered on 12 Jun 2012, 07:52 AM

I was playing around with all properties of the RadTimeline and I found some strange behaviors of the control...

The smaller the range is (PeriodStart and PeriodEnd) - the closer zoom I get. If the range is ~1 year, then I can zoom out to month view and zoom in to week and day view. If the range is 5-10 years - the closest view is the month view...

Any ideas? 

0
Oleg
Top achievements
Rank 1
answered on 12 Jun 2012, 10:07 AM
It would be very nice if someone from the telerik developer crew could tell me atleast something like "Yeah, sorry, it's a bug, we will fix it" - I would stop trying to make it work right then...
0
Tsvetie
Telerik team
answered on 14 Jun 2012, 08:15 AM
Hello Oleg,

Your observation is correct and the behavior is actually expected. Due to a limitation in Silverlight framework, we have enforced a constraint for zoom-in to maximum of 30 000 pixels. That is why, depending on the period range that the timeline shows, the minimum interval that can be displayed, might be different from the minimum interval that you have added in the Intervals collection (the minute interval in your case).

Kind regards,
Tsvetie
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
Oleg
Top achievements
Rank 1
answered on 14 Jun 2012, 08:28 AM
Hi Tsvetie,

sounds a bit strange, but lets pretend it is so about the limitations... This doesnt explain my question with day+hour+minute scenario - i just cant zoom into hours or minutes... If I leave it this way...
<telerik:RadTimeline.Intervals>        
     <telerik:HourInterval/>
     <telerik:MinuteInterval/>
</telerik:RadTimeline.Intervals>

...then I dont see anything in your control - no intervals, no items, nothing, and I cant zoom or move it. Is it a bug, a limitation or am I missing some important properties f the control?
0
Tsvetie
Telerik team
answered on 19 Jun 2012, 08:15 AM
Hello Oleg,

The constraint that I mentioned in my previous post is enforced with our code because of a limitation. In case you want to, you can modify the code of the timeline and remove this constraint or modify its value so that it fits your scenario. In case you decide to build your custom DLL, I would suggest that you test your application thoroughly. Additionally, please note that we do not support custom modifications of the code of the controls.

This constraint actually leads to the result that you describe - I suppose you cannot zoom in to hours and minutes, because the time period that the timeline visualizes is big. As a result, when you try to zoom in to hours/minutes, you hit the 30 000 pixels limit and the control does not allow you to zoom in further. 

Now, regarding your last question - let me explain how the timeline decides which intervals to show. Basically, it calculates the number of items it needs to create (e.g. for a 10-year-visible period, and year interval - 10 items) and the minimum number of pixels every item of the kind needs - this depends on the length of the strings representing the interval. In case none of the interval types can be displayed correctly - the strings should be fully visible, the timeBar does not create any interval items. However, once you zoom in, this condition changes to true and the timeBar creates the interval items. Once created, the interval items are not removed. However, during this process, the timeline makes sure that the width of the content does not become greater than the 30 000 pixel limit.

In this case, I would recommend that you add greater interval types to the intervals collection of the timeline or reduce the whole period that the timeline represents, so that the intervals can be displayed correctly no matter the zoom level.

Kind regards,
Tsvetie
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
Максим
Top achievements
Rank 1
answered on 20 Feb 2018, 05:51 PM

Hello. I have the same problem. I need zoom in year - minutes. Maximum years will be 5. I have the current snippet:

<telerik:RadTimeline PeriodStart="01/01/2017"
                     PeriodEnd="01/01/2018"
                     StartPath="Date"
                     DurationPath="Duration">
    <telerik:RadTimeline.Intervals>
        <telerik:YearInterval/>
        <telerik:MonthInterval/>
        <telerik:DayInterval />
        <telerik:HourInterval/>
        <telerik:MinuteInterval/>
    </telerik:RadTimeline.Intervals>
</telerik:RadTimeline>

 

and i can't see hours and minutes. How can I fix that?

 

Sorry for my English. I'm from Russia

0
Martin Ivanov
Telerik team
answered on 23 Feb 2018, 11:05 AM
Hello Maxim,

To remove the zooming restriction you can set the MinZoomRange property. For example:
this.timeline.MinZoomRange = TimeSpan.FromMinutes(1);

Regards,
Martin Ivanov
Progress Telerik
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
TimeLine
Asked by
Oleg
Top achievements
Rank 1
Answers by
Oleg
Top achievements
Rank 1
Tsvetie
Telerik team
Максим
Top achievements
Rank 1
Martin Ivanov
Telerik team
Share this question
or