RadTimeline behavior understanding | Overlapping Items

1 Answer 61 Views
TimeLine
Shivam
Top achievements
Rank 1
Iron
Shivam asked on 10 Nov 2022, 06:50 AM
I have a two items in radtimeline for example item 0 and item 1. Both Items are 4 week long duration. Our radtimeline is also a week display for each month. Now Item 1 overlaps item 0 from 3rd week, in this scenario item 1 is not visible on timeline(there are many items on timeline apart from items discussing). Now item 1 will only be visible when I horizontally scroll the timeline view to start from item 1's start date. I have not included MinimumItemGap attribute to my timeline. 

Can we have a understanding regarding the attribute and why such scenario is occurring?

1 Answer, 1 is accepted

Sort by
0
Martin Ivanov
Telerik team
answered on 14 Nov 2022, 01:39 PM

Hello Shivam,

I am not sure that I understand your setup completely, but here is some information on the items overlapping behavior in RadTimeline. Basically, the timeline control is always trying to avoid items overlapping. This happens if the duration of an item overlap the duration of another item. In this case, the overlapping item will be moved to a new row, under the previous item. So, if you have a lot of overlapping items you will have a lot of rows arranged in the timeline. 

The MinimumItemGap allows you to extend the overlapping area. For example, in the default case, if you have item from 3 o'clock to 4 o'clock and another from 4:10 to 5 o'clock, they won't be considered overlapped and they will be drawn on the same row. However, you may consider the 10 minutes gap between the items to be too small for your needs. In this case, you can tell that the minimum gap between two items should be, lets say, 30 minutes, so you can say that the MinimumItemGap is 30 minutes. This way, the item that starts at 4:10 will be considered overlapping the one that ends at 4:00 and it will be move to the next available row.

To customize this behavior even further, you can implement a custom ItemRowIndexGenerator. This will allow you to manually assign the RowIndex of each timeline item and position them in the desired manner.

All this information is provided also in the following help article: https://docs.telerik.com/devtools/wpf/controls/radtimeline/features/howto-control-vertical-position-of-items

I hope this helps.

Regards,
Martin Ivanov
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Shivam
Top achievements
Rank 1
Iron
commented on 16 Nov 2022, 11:15 AM | edited

Hello Martin,

Thanks for the explanation it cleared my understanding on MinimumItemGap.

Let me explain our current scenario, I have an item say item1 staring from 1st Nov 2022 to 29th Nov 2022 and Item2 starting from 23rd Nov 2022 to 21st Dec 2022. Now these items are clearly overlapping and should be placed in different rows by default. But what's happening is my item2 is not at all displaying in timeline. Item2 only appears if I horizontal scroll the timeline to start from 23rd Nov 2022 or past 29th Nov 2022(end date of item1). In my case MinimumItemGap is default (not set).

Note: The timeline not just has these two items it has many items that could overlap item1 and item2 anywhere. Also, item2 disappears only in specific overlapping scenario.

This only happens when my timeline is set to display entire duration of the items (I can also set to display item only in its start week). I use Weekly display in my timeline as per

"https://docs.telerik.com/devtools/wpf/controls/radtimeline/features/images/radtimeline-howto-control-vertical-position-of-timeline-items_01.png"

Thanks, in advance

Martin Ivanov
Telerik team
commented on 18 Nov 2022, 08:16 AM

Thank you for the explanation. However, I am not sure that I understand what exactly happens. Can you send over screenshots showing the issue? Also, a project demonstrating your setup will be useful to check this out.
Tags
TimeLine
Asked by
Shivam
Top achievements
Rank 1
Iron
Answers by
Martin Ivanov
Telerik team
Share this question
or