Nitin Nitin
Top achievements
Rank 1
Nitin Nitin
asked on 28 Mar 2013, 12:41 PM
Hello,
I am working with RadCartesianChart and had a requirement where zooming and panning needs to be implemented without using scrollbars.
Users would actually use the mouse to zoom and pan whenever they require.
Please suggest me a solution.
Thanks,
Nitin R
I am working with RadCartesianChart and had a requirement where zooming and panning needs to be implemented without using scrollbars.
Users would actually use the mouse to zoom and pan whenever they require.
Please suggest me a solution.
Thanks,
Nitin R
3 Answers, 1 is accepted
0
Hi Nitin,
By default you can zoom-in by dragging a box with the mouse (see scn1.png and scn2.png). Additionally you can zoom-out by attaching to the mouse wheel event of RadCartesianChart and changing Zoom/PanOffset properties of the chart. I have attached a sample project demonstrating that.
Kind regards,
Petar Kirov
the Telerik team
By default you can zoom-in by dragging a box with the mouse (see scn1.png and scn2.png). Additionally you can zoom-out by attaching to the mouse wheel event of RadCartesianChart and changing Zoom/PanOffset properties of the chart. I have attached a sample project demonstrating that.
Kind regards,
Petar Kirov
the Telerik team
Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.
0
Nitin Nitin
Top achievements
Rank 1
answered on 02 Apr 2013, 08:07 AM
Thankyou for the reply.
I had looked at the demo that you sent.
It works well with zooming but the problem is that it still shows the horizontal scrollbar there.
Also I cannot pan it just by dragging the mouse.
You can have a look at this in another 3rd party charting control.
I want to achieve the functionality using mouse and without showing the scrollbars
http://goo.gl/lSza0
Thanks,
Nitin
I had looked at the demo that you sent.
It works well with zooming but the problem is that it still shows the horizontal scrollbar there.
Also I cannot pan it just by dragging the mouse.
You can have a look at this in another 3rd party charting control.
I want to achieve the functionality using mouse and without showing the scrollbars
http://goo.gl/lSza0
Thanks,
Nitin
0
Hi Nitin,
The scrollbars that you see in the previously attached project are showd because a ChartPanZoomBehavior is present. If you remove this behavior you will not see the scrollbars.
Unfortunately we do not have a built-in feature for neither scroll-to-zoom nor drag-to-pan. We have plans to introduce this with the next Q2 official release (scheduled at the beginning of June). However, I have attached a simple project to demonstrate one possible way to achieve this functionality. Give it a try and see if you can apply this approach to your actual app.
Kind regards,
Petar Marchev
the Telerik team
The scrollbars that you see in the previously attached project are showd because a ChartPanZoomBehavior is present. If you remove this behavior you will not see the scrollbars.
Unfortunately we do not have a built-in feature for neither scroll-to-zoom nor drag-to-pan. We have plans to introduce this with the next Q2 official release (scheduled at the beginning of June). However, I have attached a simple project to demonstrate one possible way to achieve this functionality. Give it a try and see if you can apply this approach to your actual app.
Kind regards,
Petar Marchev
the Telerik team
Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.