Lost mouse movement of RadRangeSelector during real time updating

4 posts, 1 answers
  1. Kun
    Kun avatar
    44 posts
    Member since:
    Aug 2018

    Posted 01 Feb 2019 Link to this post

    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

  2. Hristo
    Admin
    Hristo avatar
    1520 posts

    Posted 04 Feb 2019 Link to this post

    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.
  3. Kun
    Kun avatar
    44 posts
    Member since:
    Aug 2018

    Posted 04 Feb 2019 in reply to Hristo Link to this post

    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,

  4. Answer
    Hristo
    Admin
    Hristo avatar
    1520 posts

    Posted 05 Feb 2019 Link to this post

    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.
Back to Top