Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
600
Problem binding Axis Range Properties
posted

Hi


Our app is SL 4 and MVVM design pattern, it was using the XamWebChart version 10.1, we made bindings for axis’s ranges parameters:


<igWebChart:Axis AxisType="PrimaryX" AutoRange="False"
   Minimum="{Binding Path=ValorMinimoX, Mode=OneWay}"
   Maximum="{Binding Path=ValorMaximoX, Mode=OneWay}"
   Unit="{Binding Path=DivisionEscalaX, Mode=OneWay}"/>
 
We update to version 10.3.20103.1006, and it stopped working correctly, now constantly displays the message:


XamWebChart Warning: If the AutoRange is set to false, Maximum must be greater than Minimum and Unit value must be greater than zero.


The values of properties are: ValorMinimoX=0; ValorMaximoX=100; DivisionEscalaX=10;
 
PropertyChange event doesn’t update the bindings.
 
Could you help to find the cause of the problem?
 
Thank you


Jaimir G.

Parents
  • 30692
    Suggested Answer
    Offline posted

    Hi, are you sure that was working for you as presented in 10.1? The axis in your sample there never actually becomes part of the visual tree (its used as a template, this is just how the chart works). So I don't believe its going to inherit whatever DataContext you are trying to use there. You can get around this by explicitely providing the DataContext on the axis:

                    <igChart:Axis AxisType="PrimaryY" AutoRange="False" 
                                  DataContext="{StaticResource axisInfo}"
                                  Minimum="{Binding Minimum}" 
                                  Maximum="{Binding Maximum}" 
                                  Unit="{Binding Unit}" />
    

    If you can provide a sample of this sort of binding working in 10.1, but not in 10.3, I can look into why there might have been a change in behavior.

    Hope this helps!

    -Graham

Reply Children