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

How to tell if a user scrolls the chart manually vs programatically?

1 Answer 15 Views
Chart
This is a migrated thread and some comments may be shown as answers.
Maxwell
Top achievements
Rank 1
Maxwell asked on 06 Feb 2020, 10:03 PM

     I am programatically moving the scroll bar on my chart as data comes in but I want it to stop if a user takes control of the scroll bar on the horizontal axis.

Is there a simple way to do this?

Right now I am keying off of the rangechanged event to see if my minimum is less than the previous minimum but this only works for scrolling backwords and I cannot do this for forwards since the event is fired when I need to shift it programatically also. 

1 Answer, 1 is accepted

Sort by
0
Dinko | Tech Support Engineer
Telerik team
answered on 11 Feb 2020, 09:56 AM

Hi Maxwell,

What you can try is to get the PanZoomBar element which represents the pan/zoom functionality of our chart component. You can subscribe to its PreviewMouseDown and PreviewMouseUp events. In the first event handler, you can set a flag that the user is starting an operation. In the second event, you can release the flag.

I have prepared a sample project which demonstrates what I have in mind. Give this approach a try and let me know if it works for you.

Regards,
Dinko
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
Chart
Asked by
Maxwell
Top achievements
Rank 1
Answers by
Dinko | Tech Support Engineer
Telerik team
Share this question
or