Timebar over 4 years time span?

6 posts, 0 answers
  1. Shawn
    Shawn avatar
    13 posts
    Member since:
    Sep 2010

    Posted 08 Jul 2011 Link to this post

    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" 
                                VerticalAlignment="Top" >
                    <telerik:CenturyInterval />
                    <telerik:DecadeInterval />
                    <telerik:YearInterval />
                    <telerik:MonthInterval />
  2. Tsvetie
    Tsvetie avatar
    1517 posts

    Posted 12 Jul 2011 Link to this post

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

  3. Balaji
    Balaji avatar
    19 posts
    Member since:
    Jul 2011

    Posted 05 Aug 2011 Link to this post

    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.


  4. Missing user
    Missing user avatar

    Posted 10 Aug 2011 Link to this post

    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,
    the Telerik team

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

  5. Ronika
    Ronika avatar
    1 posts
    Member since:
    May 2012

    Posted 20 Jul 2012 Link to this post


       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

  6. Tsvetie
    Tsvetie avatar
    1517 posts

    Posted 23 Jul 2012 Link to this post

    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,
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Back to Top