Pan, remove pan and change ActualVisibleRange

1 Answer 72 Views
ChartView
Israel
Top achievements
Rank 1
Israel asked on 23 Jan 2023, 10:54 PM
Hello Teleriks. We are currently working on an application that has Telerik chart with a horizontal DateTimeContinuousAxis that is updating every second using ChartPanAndZoomBehavior so we can pan through timeline. What we are trying to accomplish is to have a few buttons one that show the latest 4hrs of chart data, another one that can show the entire chart data, and one other that will move the pan up the front so you can see the latest chart update; on the first 2 ones we want to remove the ChartPanAndZoomBehavior programmatically, but when we tried to set the ActualVisibleRange of the chart,  were not able to find a way. Can you point us in the right direction. Thanks in advance.

1 Answer, 1 is accepted

Sort by
1
Dilyan Traykov
Telerik team
answered on 26 Jan 2023, 02:36 PM

Hello Israel,

A good explanation of how to control the visible range of the RadChartView control can be found in the following forum thread: ActualVisibleRange and ActualRange.

As explained by my colleagues, you can use the Minimum and Maximum properties of the DateTimeContinuousAxis as well as the HorizontalZoomRangeStart and HorizontalZoomRangeEnd of the actual chart control to achieve the desired zoom levels. As you've probably found out, working directly with the ActualVisibleRange property of the axis is not possible.

Can you please give these properties a try and let me know if you're able to achieve the desired result? If that is not the case, please send over a small sample project which demonstrates your current setup and requirement and I will gladly try to come up with a suitable solution for your particular case.

Regards,
Dilyan Traykov
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Israel
Top achievements
Rank 1
commented on 27 Jan 2023, 03:48 PM

Hello Dilyan Thanks for your reply, I have read that article before, good forum thread it helped me a lot, but my issue was around MaxZoom and MinZoom I was not resetting those back, once I did everything was good, I will be using HorizontalRangeStart and End for the latest 4hrs next.

Thanks for all the help Dilyan.

Tags
ChartView
Asked by
Israel
Top achievements
Rank 1
Answers by
Dilyan Traykov
Telerik team
Share this question
or