Hi,
Although documentation and another thread here mean, it can zoom in to hours and minutes, I cant make it work... Here is my code:
<
telerik:RadTimeline
PeriodStart
=
"{Binding MinViewDate, Mode=TwoWay}"
PeriodEnd
=
"{Binding MaxViewDate, Mode=TwoWay}"
StartPath
=
"LastUpdate"
ItemsSource
=
"{Binding Activities}"
>
<
telerik:RadTimeline.Intervals
>
<
telerik:DayInterval
/>
<
telerik:HourInterval
/>
<
telerik:MinuteInterval
/>
</
telerik:RadTimeline.Intervals
>
</
telerik:RadTimeline
>
Max. zoom level is day - see "view.png". Can you explain me, what I am doing wrong?
This is the DataVizualization.dll version I am using: 2012.1.326.1050
Oleg
7 Answers, 1 is accepted
I was playing around with all properties of the RadTimeline and I found some strange behaviors of the control...
The smaller the range is (PeriodStart and PeriodEnd) - the closer zoom I get. If the range is ~1 year, then I can zoom out to month view and zoom in to week and day view. If the range is 5-10 years - the closest view is the month view...
Any ideas?
Your observation is correct and the behavior is actually expected. Due to a limitation in Silverlight framework, we have enforced a constraint for zoom-in to maximum of 30 000 pixels. That is why, depending on the period range that the timeline shows, the minimum interval that can be displayed, might be different from the minimum interval that you have added in the Intervals collection (the minute interval in your case).
Tsvetie
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
sounds a bit strange, but lets pretend it is so about the limitations... This doesnt explain my question with day+hour+minute scenario - i just cant zoom into hours or minutes... If I leave it this way...
<
telerik:RadTimeline.Intervals
>
<
telerik:HourInterval
/>
<
telerik:MinuteInterval
/>
</
telerik:RadTimeline.Intervals
>
...then I dont see anything in your control - no intervals, no items, nothing, and I cant zoom or move it. Is it a bug, a limitation or am I missing some important properties f the control?
The constraint that I mentioned in my previous post is enforced with our code because of a limitation. In case you want to, you can modify the code of the timeline and remove this constraint or modify its value so that it fits your scenario. In case you decide to build your custom DLL, I would suggest that you test your application thoroughly. Additionally, please note that we do not support custom modifications of the code of the controls.
This constraint actually leads to the result that you describe - I suppose you cannot zoom in to hours and minutes, because the time period that the timeline visualizes is big. As a result, when you try to zoom in to hours/minutes, you hit the 30 000 pixels limit and the control does not allow you to zoom in further.
Now, regarding your last question - let me explain how the timeline decides which intervals to show. Basically, it calculates the number of items it needs to create (e.g. for a 10-year-visible period, and year interval - 10 items) and the minimum number of pixels every item of the kind needs - this depends on the length of the strings representing the interval. In case none of the interval types can be displayed correctly - the strings should be fully visible, the timeBar does not create any interval items. However, once you zoom in, this condition changes to true and the timeBar creates the interval items. Once created, the interval items are not removed. However, during this process, the timeline makes sure that the width of the content does not become greater than the 30 000 pixel limit.
In this case, I would recommend that you add greater interval types to the intervals collection of the timeline or reduce the whole period that the timeline represents, so that the intervals can be displayed correctly no matter the zoom level.
Tsvetie
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
Hello. I have the same problem. I need zoom in year - minutes. Maximum years will be 5. I have the current snippet:
<
telerik:RadTimeline
PeriodStart
=
"01/01/2017"
PeriodEnd
=
"01/01/2018"
StartPath
=
"Date"
DurationPath
=
"Duration"
>
<
telerik:RadTimeline.Intervals
>
<
telerik:YearInterval
/>
<
telerik:MonthInterval
/>
<
telerik:DayInterval
/>
<
telerik:HourInterval
/>
<
telerik:MinuteInterval
/>
</
telerik:RadTimeline.Intervals
>
</
telerik:RadTimeline
>
and i can't see hours and minutes. How can I fix that?
Sorry for my English. I'm from Russia
To remove the zooming restriction you can set the MinZoomRange property. For example:
this
.timeline.MinZoomRange = TimeSpan.FromMinutes(1);
Regards,
Martin Ivanov
Progress Telerik