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

HourInterval not displaying

5 Answers 127 Views
TimeBar
This is a migrated thread and some comments may be shown as answers.
DSamani
Top achievements
Rank 1
DSamani asked on 31 Oct 2012, 10:26 PM
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>


5 Answers, 1 is accepted

Sort by
0
Accepted
Tsvetie
Telerik team
answered on 01 Nov 2012, 11:24 AM
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.

0
DSamani
Top achievements
Rank 1
answered on 01 Nov 2012, 01:14 PM
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.
0
DSamani
Top achievements
Rank 1
answered on 01 Nov 2012, 04:01 PM
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...


0
Stanescu Mihai
Top achievements
Rank 1
answered on 06 Nov 2012, 02:54 PM
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.
0
Tsvetie
Telerik team
answered on 06 Nov 2012, 03:37 PM
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.

Tags
TimeBar
Asked by
DSamani
Top achievements
Rank 1
Answers by
Tsvetie
Telerik team
DSamani
Top achievements
Rank 1
Stanescu Mihai
Top achievements
Rank 1
Share this question
or