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

Time Bar - Intervals Formatters

4 Answers 76 Views
TimeBar
This is a migrated thread and some comments may be shown as answers.
Balaji
Top achievements
Rank 1
Balaji asked on 10 Aug 2011, 10:22 AM
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

4 Answers, 1 is accepted

Sort by
0
Joel
Top achievements
Rank 1
answered on 24 Aug 2011, 03:57 PM
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?
0
Tsvetie
Telerik team
answered on 29 Aug 2011, 02:18 PM
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 >>

0
Joel
Top achievements
Rank 1
answered on 01 Sep 2011, 08:36 PM
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.
0
Tsvetie
Telerik team
answered on 03 Sep 2011, 07:51 AM
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 >>

Tags
TimeBar
Asked by
Balaji
Top achievements
Rank 1
Answers by
Joel
Top achievements
Rank 1
Tsvetie
Telerik team
Share this question
or