We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

databinding error

Hello

I have encountered a problem when i try to add data to your chart control. I encounter a databind error. It seems to be related to the BindinPathsY in the ChartSeries. I have tried to solve it in many different ways but the result is always the same. I have tried with my own data as well as the data provided by your examples.

I have a object set to the datacontext of the control i have the chart located in. The object has an enumeration containing a holderobject with two lists List that is set to the BindingPathX and BindingPathsY parameters of the chart.

The error I get is the following:

System.Windows.Data Error: 5 : Value produced by BindingExpression is not valid for target property.; Value='Infinity' BindingExpression:Path=Y; DataItem='ChartColumnSegment' (HashCode=57098480); target element is 'Rectangle' (Name=''); target property is 'Top' (type 'Double')

The last attempt I did was to copy paste an example from your website into my own solution and skip my own databinding attempt:

http://help.syncfusion.com/ug_71_new/chartwpf/defaultWPF.html

[XAML]


































I copied the example into my control, the xml into UserControl.Resources and the Chart itself I placed in a StackPanel below the rest of the content but the same error occurs.

The error doesn’t seem to affect the default Columnview visual but if I switch to a line for example it enters a continuous Loop with the same Data error.

System.Windows.Data Error: 5 : Value produced by BindingExpression is not valid for target property.; Value='Infinity' BindingExpression:Path=Y2; DataItem='ChartLineSegment' (HashCode=6820960); target element is 'Line' (Name=''); target property is 'Y2' (type 'Double')


I really can’t see where i go wrong.




1 Reply

PJ Pavithra J Syncfusion Team April 1, 2009 01:30 PM UTC

Hi Saad,

Thanks for your interest in Syncfusion products.

We are not able to reproduce your mentioned issue. There comes no exception while using binding in chart series.

Kindly make use of the attached sample in which the chart is hosted inside an usercontrol and also uses the dataBinding logic to plot the axes values.

DataBinding Sample

Please let us know if you have further queries.

Regards,
Pavithra.J


Loader.
Live Chat Icon For mobile
Up arrow icon