Hour, Minute and Second zoom level

6 posts, 0 answers
  1. Oleg
    Oleg avatar
    42 posts
    Member since:
    Oct 2011

    Posted 11 Jun 2012 Link to this post

    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

  2. Oleg
    Oleg avatar
    42 posts
    Member since:
    Oct 2011

    Posted 12 Jun 2012 Link to this post

    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? 

  3. DevCraft banner
  4. Oleg
    Oleg avatar
    42 posts
    Member since:
    Oct 2011

    Posted 12 Jun 2012 Link to this post

    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...
  5. Tsvetie
    Admin
    Tsvetie avatar
    1517 posts

    Posted 14 Jun 2012 Link to this post

    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 >>

  6. Oleg
    Oleg avatar
    42 posts
    Member since:
    Oct 2011

    Posted 14 Jun 2012 Link to this post

    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?
  7. Tsvetie
    Admin
    Tsvetie avatar
    1517 posts

    Posted 19 Jun 2012 Link to this post

    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 >>

Back to Top
DevCraft banner