RadChart Not Refreshing Correctly?

2 posts, 0 answers
  1. Randy Minder
    Randy Minder avatar
    20 posts
    Member since:
    Aug 2009

    Posted 27 Dec 2011 Link to this post

    I have a RadChart (2011-Q3) with a single X axis and 2 Y axis's. The right Y axis gets its MaxValue and Step from binding to properties in my associated view model. Every three minutes the underlying data in the VM refreshes itself. I'm noticing that when the underlying data refreshes itself, the data on the chart refreshes, but the right Y axis does not. It does not attempt to retrieve new values for the MaxValue and Step. I've determined this by setting breakpoints on my getter properties. The getter is called once, when the chart first loads, and is never called again, even when the chart data refreshes.

    Is this a bug in the Chart control, or is there something I need to do to cause the entire chart to refresh (including the axix's) when the underlying data refreshes?
  2. Petar Marchev
    Petar Marchev avatar
    996 posts

    Posted 29 Dec 2011 Link to this post

    Hello Randy,

    After some testing I was able to reproduce this issue. Indeed there seems to be a problem with the bindings on the additional axes.

    I have logged this as a bug and published it on our Public Issue Tracking System. Here you can follow the bug's status and vote for it. I have also updated your Telerik Points as a small gesture of our appreciation for bringing this issue to our attention.

    As a solution for now I can suggest the following work-around.
       1.1  Give a Name to the additional axis so you can access it from code behind.
       1.2  Manually attach an event handler to the Refresh event in your view model.
       1.3  In the event handler simply set the Min and Max values of the additional axis accordingly.

    If you don't want to use code behind you can use another approach. You need to place the view model in the resources (give it a key) and explicitly set a source for all the bindings. 
      <VM:MyViewModel x:Key="myVM" />
    <telerik:AxisY AutoRange="False" MinValue="{Binding MinValue, Source={StaticResource myVM}}"  />

    We apologize for the caused inconvenience and hope that ate least one of the suggested work-arounds is a feasible solution.

    All the best,
    Petar Marchev
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Back to Top