Time Bar - Intervals Formatters

5 posts, 0 answers
  1. Balaji
    Balaji avatar
    19 posts
    Member since:
    Jul 2011

    Posted 10 Aug 2011 Link to this post

    Hi,

    Currently the TimeBar controls support Collection of interval formatter, However is it possible to restrict the format to a some specific format alone for each interval, if so how should we do that?

    i.e for Month i need only Jan, Feb , Mar etc , For Day i need only 1,2, 3 ....

    Also if we give some 10 yrs period span which span across 2 decade (i.e if our Period range 2000-2012, It falls in 2000-2009 and 2010-2019 Decade ) , in that case as i have only 2 years in second decade(2010, 2011) , the group Label(2010-2019) is not visible?
    Attached the screen shot for reference

    Do i need to specifically set the label alignment for group container?


    Thanks
    B.Balaji
  2. Joel
    Joel avatar
    41 posts
    Member since:
    Nov 2010

    Posted 24 Aug 2011 Link to this post

    I would also like to control the interval formatting.

    For instance, intervals like "10:00 - 10:05, 10:05 - 10:10, 10:10 - 10:15" are somewhat redundant.  I'm displaying a large range of time, so I can't just display an interval for every minute, but I would rather display just "10:00, 10:05, 10:10" with the labels left adjusted.

    Is there a way to accomplish this?

    I've also noticed the issue where the interval label won't be displayed if the remaining area is smaller than the interval.  (If the interval is hours, but there's only minutes left, there won't be a label.)  Is this a bug?
  3. DevCraft banner
  4. Tsvetie
    Admin
    Tsvetie avatar
    1517 posts

    Posted 29 Aug 2011 Link to this post

    Hello B.Balaji and Joel,
    Currently, there is no way to change the formatter strings of a predefined interval. We have already logged this feature request and you can track the progress on it and vote for it in our Public Issue Tracking system - http://www.telerik.com/support/pits.aspx#/public/silverlight/7118.

    The second problem that you both report is not exactly a bug. Indeed, I agree that this behavior seems like a bug at first, but let me explain the logic behind it. Basically every item (and group) interval of the same kind, has the same actual size (Width) and the label for that interval is displayed centered in that item (or group) interval. As a result, in case less than half an item (group) interval is displays, the label will be only partially visible or not visible at all.

    At this point, you might wonder why we make partially visible intervals with the same size as fully visible intervals and not as wide as their visible part. The most important reason for that is probably because this is not actually a solution - we cannot guarantee that there will be enough space for the label, in case we make one interval smaller than the rest. Another reason that I can point out, is that such change raises additional questions - for example, should we use a different format string, in case some of the shorter format strings fits in the smaller space. Still, there will be cases, in which a partially visible interval will not appear as expected. Consider the century interval - in case only 1 year is visible of a century, should we display a part of a letter or not?

    We would really appreciate your opinion on the matter. How would you expect a partially visible interval to display?

    Best wishes,
    Tsvetie
    the Telerik team

    Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

  5. Joel
    Joel avatar
    41 posts
    Member since:
    Nov 2010

    Posted 01 Sep 2011 Link to this post

    For most of the cases I'm seeing, I would prefer to just center the label in the available space with no regard for whether the available space is less than the group interval.  If the available space really was too small for the label, then it would be understandable to start clipping the label and it might be understandable to hide it entirely.  Though, for what I'm doing, clipping the label would be much preferrable to hiding it entirely.

    If you gave us some kind of PreviewIntervalLabel event and made sure to tell us the available width, I'm sure we could figure out where to go from there.
  6. Tsvetie
    Admin
    Tsvetie avatar
    1517 posts

    Posted 03 Sep 2011 Link to this post

    Hello Joel,
    Thank you for your feedback. I will forward it to our developers.

    All the best,
    Tsvetie
    the Telerik team

    Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

Back to Top
DevCraft banner