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

Timebar over 4 years time span?

5 Answers 113 Views
TimeBar
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Shawn
Top achievements
Rank 1
Shawn asked on 08 Jul 2011, 06:31 PM
Hear is a simple time bar with 5 years time span. How can I set this up to display days? When I run this I can only zoom in to months. If I change Period End to 12-31-2010 then it'll work. 
       
<telerik:RadTimeBar telerik:StyleManager.Theme="Office_Blue" 
                            Height="82" IsSnapToIntervalEnabled="False" 
                            HorizontalAlignment="Left" Margin="32,10,35,0" 
                            x:Name="radTimeBar1" 
                            PeriodStart="1-1-2007" 
                            PeriodEnd="12-31-2011" 
                            SelectionStart="12-1-2011" 
                            SelectionEnd="12-31-2011" 
                            VisiblePeriodStart="12-1-2011" 
                            VisiblePeriodEnd="1-1-2011" 
                            VerticalAlignment="Top" >
            <telerik:RadTimeBar.Intervals>
                <telerik:CenturyInterval />
                <telerik:DecadeInterval />
                <telerik:YearInterval />
                <telerik:MonthInterval />
                <telerik:DayInterval/>
            </telerik:RadTimeBar.Intervals>
        </telerik:RadTimeBar>

5 Answers, 1 is accepted

Sort by
0
Tsvetie
Telerik team
answered on 12 Jul 2011, 03:22 PM
Hello Shawn,
The timebar control decides which item/group interval is best to use out of the intervals, added to its Intervals collection, based on the values for its PeriodStart, PeriodEnd, VisiblePeriodStart, VisiblePeriodEnd properties and the minimum necessary width for an item label to fully show. That is why, in you case, you cannot show the days. There is not enough space to show 1825 items with enough width to show even one letter label in them (the least space consuming label string that is used for the day interval). This behavior is by design and you cannot change it.

Best wishes,
Tsvetie
the Telerik team

Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

0
Balaji
Top achievements
Rank 1
answered on 05 Aug 2011, 11:02 AM
Hi,
We have provided some 60yrs of time span (Period Start - 1-Jan-1950 and End- 1-jan-2011), we were able to zoom in till month level using mouse scroll.

But aftre that we were able to to with the mouse and shirk the Slider inside, howver we have to remove the minimumSpanRange in Slider control style or set it to period end. then only it works.

<telerik:RadSlider x:Name="PART_Slider" IsSelectionRangeEnabled="True" IsMouseWheelEnabled="False"
MinimumRangeSpan="{Binding PeriodEnd, Converter={StaticResource timespanConverter}, RelativeSource={RelativeSource TemplatedParent}}"
/>

However my question is , if we set the timebar visible period start and end from the selected region, the VisiblePeriodEnd alone setting to actualvisiblePeriodEnd instaed of SelectionEnd, this happening only if we give more that 3 or 4 yrs of time Span in the timeBar
[NotesHistoryRtb  is our RadTimeBar object  ]

NotesHistoryRtb.VisiblePeriodStart = NotesHistoryRtb.SelectionStart;

NotesHistoryRtb.VisiblePeriodEnd = NotesHistoryRtb.SelectionEnd;


Is there is i need to do some change in the XAML file to retrict this.

Regards
B.Balaji



0
Missing User
answered on 10 Aug 2011, 04:29 PM
Hi Balaji,

Basically, due to limitation in the framework, RadTimeBar restricts its content not to exceed the width of 30 000 pixels. This means that, the ActualMinZoomRange property is calculated based on this restriction and the TimeBar period range, so that when zooming in, it does not allow the content's width to become bigger than 30 000 pixels. Also, the visible period range is coerced according to the calculated ActualMinZoomRange and this will not allow you to set a range smaller that the ActualMinZoomRange. For example, with a period range of 5 years, the minimum ActualMinZoomRange will be TimeSpan of 62.02:39:36. Thus, the available maximum width is not enough for the TimeBar to draw the smaller labels for the DayInterval and you are not able to show days. Please excuse us for the inconvenience caused.

Kind regards,
Polina
the Telerik team

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

0
Ronika
Top achievements
Rank 1
answered on 20 Jul 2012, 06:54 AM
Hi,

   I am facing similar issue.
   I have data which span over 5 days. The minimum zoom in range available for this data is Hour. I want to display it for Minutes an second interval also.
 
   Is there any way to achieve this? Are you planning to support this feature in future release?

   Please update

Regards,
Ronika
   
0
Tsvetie
Telerik team
answered on 23 Jul 2012, 10:38 AM
Hello Ronika,

First of all, I would like to mention that the problem that leads to the necessity of such restriction is not in our code - you can easily reproduce it with the following XAML:

<Rectangle Width="100" Height="10" Fill="Red" />
<Rectangle  Width="36000" Height="10" Fill="Red" />
We are constantly trying to improve our controls and in case we find a workaround for this problem, we will fix it. However, I cannot commit a specific timeframe for such workaround.

Kind regards,
Tsvetie
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Tags
TimeBar
Asked by
Shawn
Top achievements
Rank 1
Answers by
Tsvetie
Telerik team
Balaji
Top achievements
Rank 1
Missing User
Ronika
Top achievements
Rank 1
Share this question
or