HourInterval not displaying

6 posts, 1 answers
  1. DSamani
    DSamani avatar
    15 posts
    Member since:
    Dec 2009

    Posted 31 Oct 2012 Link to this post

    I can't seem to get the hour interval to work the way I expect it to.

    If I use either this:

    <Rad:RadTimeBar.Intervals>
    	<Rad:MonthInterval />
    	<Rad:DayInterval />
    	<Rad:HourInterval />
    </Rad:RadTimeBar.Intervals>

    or this:

    <Rad:RadTimeBar.Intervals>
    	<Rad:MonthInterval />
    	<Rad:DayInterval />
    	<Rad:HourInterval  IntervalSpans="1" />
    </Rad:RadTimeBar.Intervals>

    I am unable to zoom into the 'hourly mode' (see first screenshot).  However 

    <Rad:RadTimeBar.Intervals>
    	<Rad:MonthInterval />
    	<Rad:DayInterval />
    	<Rad:HourInterval  IntervalSpans="1,8" />
    </Rad:RadTimeBar.Intervals>

    allows me to get into the hourly mode but shows the 8 hour interval (which I don't really want). Am I doing something wrong?
    The rest of the xaml ( mPlotsGrid is populated with RadLinearSparklines at runtime):
                      <Rad:RadTimeBar Name="mTimeBar"
                                      PeriodStart="{Binding Path=BeginHistory, Mode=TwoWay}"
                                      PeriodEnd="{Binding Path=EndHistory, Mode=TwoWay}"
                                      VisiblePeriodStart="{Binding Path=BeginView, Mode=TwoWay}"
                                      VisiblePeriodEnd="{Binding Path=EndView, Mode=TwoWay}"
                                      SelectionStart="{Binding Path=BeginDetail, Mode=TwoWay}"
                                      SelectionEnd="{Binding Path=EndDetail, Mode=TwoWay}"
                                      IsSnapToIntervalEnabled="True"
                                      MinSelectionRange="00:01:00"
                                      Margin="5">
                         <Rad:RadTimeBar.Intervals>
                            <Rad:MonthInterval />
                            <Rad:WeekInterval />
                            <Rad:DayInterval />
                            <Rad:HourInterval  IntervalSpans="1,8" />
                         </Rad:RadTimeBar.Intervals>
                         <Grid x:Name="mPlotsGrid" />
                      </Rad:RadTimeBar>
    
    
  2. Answer
    Tsvetie
    Admin
    Tsvetie avatar
    1517 posts

    Posted 01 Nov 2012 Link to this post

    Hi Byron Blattel,

    In case you are using the latest version of RadTimeBar for WPF - Q3 2012, you can specify a small value for the MinZoomRange property of the control that fits your requirements. By default, the value of this property is calculated in such a way, so that the width of the content panel does not become more than 30 000 pixels. As of Q3 2012 you can specify a custom value for this property.

    Greetings,
    Tsvetie
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  3. UI for WPF is Visual Studio 2017 Ready
  4. DSamani
    DSamani avatar
    15 posts
    Member since:
    Dec 2009

    Posted 01 Nov 2012 Link to this post

    I take it that property doesn't work properly in Q2 2012?

    I just tried to install Q3 and the new installer is giving me problems.
  5. DSamani
    DSamani avatar
    15 posts
    Member since:
    Dec 2009

    Posted 01 Nov 2012 Link to this post

    Thank you Tsvetie ,

    I got past the zoom issue with Q3  However the MinZoomRange doesn't seem to be limiting the zooming to what I define.  For example if I set it to MinZoomRange="01:00:00" I would expect the control to stop zooming when the VisiblePeriod was less than a day and MinZoomRange="00:06:00" would stop zooming when the VisiblePeriod was less than 6 hours...

    The documentation doesn't really indicate how MinZoomRange is supposed to work...


  6. Stanescu Mihai
    Stanescu Mihai avatar
    33 posts
    Member since:
    Aug 2009

    Posted 06 Nov 2012 Link to this post

    Hello Byron,

    One thing here, maybe this is the case. This: "MinZoomRange="01:00:00" is actually 1 hour, 1 day should be defined like this: "1.00:00:00" (day.hours:minutes:seconds). Same is for MinZoomRange="00:06:00"  which is 6 minutes.
  7. Tsvetie
    Admin
    Tsvetie avatar
    1517 posts

    Posted 06 Nov 2012 Link to this post

    Hi Byron,

    Stanescu Mihai is correct. The MinZoomRange property is of type TimeSpan. In order to set its value in XAML, you can use the syntax "[days.]hours:minutes:seconds[.fractionalSeconds]".

    All the best,
    Tsvetie
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Back to Top
UI for WPF is Visual Studio 2017 Ready