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.
I found the solution to this problem after https://ko.infragistics.com/community/forums/f/retired-products-and-controls/40011/binding-to-a-series-collection/225604#225604.
I had change how I was linking up my view models and use the resources instead.
I need to bind Minimum, Maximum, and Unit to properties in an existing view model instance so setting the DataContext using a static resource doesn't work for me. I tried binding the DataContext using ElementName but this doesn't work. DataContext is still null and I get the AutoRange error. Now do I bind to the data context of the parent UserControl? I'm attaching a tiny app that shows this behavior.
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