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

RadChart Not Refreshing Correctly?

1 Answer 190 Views
Chart
This is a migrated thread and some comments may be shown as answers.
Randy Minder
Top achievements
Rank 1
Randy Minder asked on 27 Dec 2011, 07:54 PM
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?

1 Answer, 1 is accepted

Sort by
0
Petar Marchev
Telerik team
answered on 29 Dec 2011, 03:36 PM
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.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.

2)
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. 
<Window.Resources>
  <VM:MyViewModel x:Key="myVM" />
</Window.Resources>
 
...
 
<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 >>

Tags
Chart
Asked by
Randy Minder
Top achievements
Rank 1
Answers by
Petar Marchev
Telerik team
Share this question
or