Hi!
Is it possible to get the control to not separate items on different rows when they are sharing a common point.
first item has Datetime(2013,5,5,1,0,0) and duration 2 hours.
second item has Datetime(2013,5,5,3,0,0) and duration 2 hours.
I want them to be on the same line without changing the first item's duration to for example 1 hour, 59 minutes and 59 seconds...
Hope it makes sense.
Is it possible to get the control to not separate items on different rows when they are sharing a common point.
first item has Datetime(2013,5,5,1,0,0) and duration 2 hours.
second item has Datetime(2013,5,5,3,0,0) and duration 2 hours.
I want them to be on the same line without changing the first item's duration to for example 1 hour, 59 minutes and 59 seconds...
Hope it makes sense.
5 Answers, 1 is accepted
0
Hi Ola,
Currently the only mechanism for dealing with overlapping items that the RadTimeline supports is to position them on separate rows. Exposing additional options for controlling the behavior in this scenario is in our TODO list and this functionality is planned to be released with our 2013 Q3 release.
Since you were one of the first users to ask for this type of functionality we will appreciate if you provide more details on your requirements and your thoughts on how you would like this to be implemented (as API). Our development team is in the early stages of researching this feature, so they are open to any feedback.
Currently you can implement this by having an additional ItemsSource collection containing the combined (clustered) items. You will need to manually combine these items. Currently there are several ways of doing this that I can think of:
Regards,
Petar Kirov
the Telerik team
Currently the only mechanism for dealing with overlapping items that the RadTimeline supports is to position them on separate rows. Exposing additional options for controlling the behavior in this scenario is in our TODO list and this functionality is planned to be released with our 2013 Q3 release.
Since you were one of the first users to ask for this type of functionality we will appreciate if you provide more details on your requirements and your thoughts on how you would like this to be implemented (as API). Our development team is in the early stages of researching this feature, so they are open to any feedback.
Currently you can implement this by having an additional ItemsSource collection containing the combined (clustered) items. You will need to manually combine these items. Currently there are several ways of doing this that I can think of:
- Keep the second ItemsSource as items grouped by a specific interval - e.g. month. That way in the common case the user will see items grouped by month which are not overlapping. When the user zooms in, you can switch to showing the original ItemsSource for a more detailed visualization of the data. You can use the VisiblePeriodChanged event to swap the ItemsSource when this is needed.
- Dynamically group the items depending on the RadTimeline.CurrentItemInterval property.
- Instead of grouping the items by interval, combine only the ones that overlap. You can do this initially, as soon as you have the original ItemsSource.
Regards,
Petar Kirov
the Telerik team
Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.
0
Ola
Top achievements
Rank 1
answered on 17 May 2013, 03:47 AM
Hi Petar!
Thanks for the extensive answer!
I just would want to have the option of putting ObjectA next to ObjectB when ObjectA.EndTime == ObjectB.StartTime.
So if the component could split objects on separate lines when ObjectA.EndTime <= ObjectB.StartTime that would be perfect. Now it seems like the test is ObjectA.EndTime < ObjectB.StartTime
Example, Meeting A ends at 9.30am, Meeting B starts at 9:30am, Why put them on separate lines?
So for the API for the control I would love to have RadTimeLine.KeepAdjacentObjectsOnTheSameLinePlease = true/false :)
Regards,
Ola
Thanks for the extensive answer!
I just would want to have the option of putting ObjectA next to ObjectB when ObjectA.EndTime == ObjectB.StartTime.
So if the component could split objects on separate lines when ObjectA.EndTime <= ObjectB.StartTime that would be perfect. Now it seems like the test is ObjectA.EndTime < ObjectB.StartTime
Example, Meeting A ends at 9.30am, Meeting B starts at 9:30am, Why put them on separate lines?
So for the API for the control I would love to have RadTimeLine.KeepAdjacentObjectsOnTheSameLinePlease = true/false :)
Regards,
Ola
0
Ola
Top achievements
Rank 1
answered on 21 May 2013, 05:48 AM
Here is the example visualized:
Example
I would love to have those items on the same line without changing the startTime to one second in the future.
Please let me know if you understand, and if my request is possible with the existing control.
Best Regards
Ola
Example
I would love to have those items on the same line without changing the startTime to one second in the future.
Please let me know if you understand, and if my request is possible with the existing control.
Best Regards
Ola
0
Ola
Top achievements
Rank 1
answered on 21 May 2013, 06:09 AM
Workaround:
For anyone with similar problem, and want all activities in the timeline to be on one line when sharing same DateTime.
in the xaml, set your DurationPath like this:
Then from your datamodel, set the property like below. This just affects the visual representation of the items, and won't mess with your data.
For anyone with similar problem, and want all activities in the timeline to be on one line when sharing same DateTime.
in the xaml, set your DurationPath like this:
DurationPath="DurationWithOneLessSecond"
Then from your datamodel, set the property like below. This just affects the visual representation of the items, and won't mess with your data.
private
TimeSpan _Duration;
public
TimeSpan Duration {
get
{
return
_Duration; }
set
{ _Duration = value; NotifyPropertyChanged(
"Duration"
); } }
public
TimeSpan DurationWithOneLessSecond
{
get
{
return
Duration.Add(TimeSpan.FromSeconds(-1));
}
set
{
Duration = value.Add(TimeSpan.FromSeconds(1));
NotifyPropertyChanged(
"DurationWithOneLessSecond"
);
}
}
0
Hi Ola,
Thanks for the suggestion. It will certainly make a good addition to the control. I forwarded it to our development team, so they can consider it when planning the features for our future releases.
Petar Kirov
Telerik
Thanks for the suggestion. It will certainly make a good addition to the control. I forwarded it to our development team, so they can consider it when planning the features for our future releases.
Meanwhile you can use the workaround that you came with, as it looks correct to me.
Petar Kirov
Telerik
Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.