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

Timeline Zoom Speed

1 Answer 26 Views
TimeLine
This is a migrated thread and some comments may be shown as answers.
Nate
Top achievements
Rank 1
Nate asked on 15 May 2019, 01:55 AM
     I have a timeline showing events at a millisecond granularity.  I have min zoom set to 1 seconda and max set to 30 seconds. I am able to use the scroll wheel to zoom in on this graph, but the zoom is very very slow.  Is there a way to set the speed of the zoom?  For instance i would like to be able to get from the min zoom to the max zoom or vice versa in ~20 mouse wheel clicks (right now the zoom is so slow it would probably take 1000).

1 Answer, 1 is accepted

Sort by
0
Martin Ivanov
Telerik team
answered on 17 May 2019, 09:20 AM
Hello Nate,

To achieve your requirement you can disable the default zooming on mouse wheel and implement a custom one. Basically, you can get the scroll delta from the event arguments and calculate the new visible range. Then you can use the VisiblePeriodStart and VisiblePeriodEnd property of RadTimeline to manually zoom-in/out. 
private void Timeline_PreviewMouseWheel(object sender, System.Windows.Input.MouseWheelEventArgs e)
{
    e.Handled = true;
    // calculate the new visible range
    // set RadTimeline's  VisiblePeriod or VisiblePeriodStart and VisiblePeriodEnd properties
}

Regards,
Martin Ivanov
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
TimeLine
Asked by
Nate
Top achievements
Rank 1
Answers by
Martin Ivanov
Telerik team
Share this question
or