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

Lost mouse movement of RadRangeSelector during real time updating

3 Answers 66 Views
RangeSelector
This is a migrated thread and some comments may be shown as answers.
Kun
Top achievements
Rank 2
Kun asked on 01 Feb 2019, 02:23 PM

Hello,

My RadRangeSelector associates to a RadChartView.

The RadChartView updates in real time, likewise for the RadRangeSelector by using:

RadRangeSelector1.RangeSelectorElement.InitializeElements()
RadRangeSelector1.RangeSelectorElement.ResetLayout(True)

 

Two controls update perfectly.

But if I move the RangeSelector or RangeSelectorScrollElement to change the range of the chart during updating, the move is very difficult.

Some time I cannot drag the selector or I cannot keep dragging for long time. It seems the mouse move event has been blocked for a while during the update.

But when I stop the update, it works ok.

The dragging is more smoothly for the static data chart than live data chart.

You can find the demo here:

https://www.dropbox.com/s/ag04nuonewr0y4a/TelerikWinFormsApp1.rar?dl=0

Thank you by advance.

Regards

3 Answers, 1 is accepted

Sort by
0
Hristo
Telerik team
answered on 04 Feb 2019, 02:11 PM
Hi Kun,

Thank you for writing. The observed behavior is caused by the range selector which is trying to change the pan/zoom factors of the chart while at the same time it is being updated. In this kind of setup, I can suggest setting the UpdateMode property of the range selector to Deferred. With this setting, it will update the chart only one time upon releasing the mouse: 
Me.RadRangeSelector1.UpdateMode = RangeSelector.InterfacesAndEnum.UpdateMode.Deferred

You can also check the following documentation article providing additional information: https://docs.telerik.com/devtools/winforms/controls/rangeselector/properties-and-events.

I hope this will help. Let me know if you need further assistance.

Regards,
Hristo
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.
0
Kun
Top achievements
Rank 2
answered on 04 Feb 2019, 04:17 PM

Hello Hristo,

I've tried deferred update mode. It cannot resolved the problem.

UpdateMode works for the direction "rangeselector to chartview". Deferred mode does stop refreshing the chartview when range selector is moving. But the mouse move in the rangeselector is always blocking sometimes.

My problem is quite in the opposite update direction "chartview to rangeselector". My chartview is in live data mode, but when I use 

RadRangeSelector1.RangeSelectorElement.InitializeElements() in my refresh timer to update RangeSelector ,RangeSelector draws well but the mouse moving performs badly. I think the function InitializeElements does something to mouse moving handler. Without InitializeElements, the dragging works perfect, but no mirroring display effect.

So I've found another solution. I create my own deferred mode in direction "chartview to rangeselector" for RadRangeSelector.

I do RadRangeSelector.RangeSelectorElement.InitializeElements() when mouse is not down.

It works perfect. When I drag the selector, the rangeselector stops drawing but it change the range of the chartview. And new data continues loading in the chart serie. The move is smoothly.

 

Regards,

0
Accepted
Hristo
Telerik team
answered on 05 Feb 2019, 12:38 PM
Hi Kun,

I confirm that this is a valid approach. Calling the InitializeElements method will result in clearing the elements added to the range selector and this may cause a delay inside the associated chart view.

The not updating RangeSelector can be considered as an issue and I can relate it to the following item on our feedback portal: FIX. RadRangeSelctor - the series are not rendered when the chart is populated at run-time. In other words, the range selector should have been updated after the addition of new data points. I have added a vote for the item on your behalf. Additionally, you can subscribe to it and be updated when its status changes.

Let me know if you have other questions.

Regards,
Hristo
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
RangeSelector
Asked by
Kun
Top achievements
Rank 2
Answers by
Hristo
Telerik team
Kun
Top achievements
Rank 2
Share this question
or