Jump to content
Software FX Community

Chart Binding Issue


jseymour
 Share

Recommended Posts

This could very well be an error on my part but I am getting an Null Reference error when attempting to data bind a ObservableCollection<T> to a Chart control in WPF.  I am attempting to drill down into an object contained in my collection as follows:

 

  <cfx:Chart         ItemsSource="{Binding Collection}"         Gallery="Line">           <cfx:Chart.AxisX>           <cfx:Axis>             <cfx:Axis.Labels>               <cfx:AxisLabelAttributes                 Format="Date"                 CustomFormat="M/d H:mm" />             </cfx:Axis.Labels>           </cfx:Axis>         </cfx:Chart.AxisX>         <cfx:Chart.Series>           <cfx:SeriesAttributes             BindingPath="TChildProperty.Property1"             BindingPathX="TChildProperty.CompletedOn" />           <cfx:SeriesAttributes             BindingPath="TChildProperty.Property2"             BindingPathX="TChildProperty.CompletedOn" />           <cfx:SeriesAttributes             BindingPath="TChildProperty.Property3"             BindingPathX="TChildProperty.CompletedOn" />         </cfx:Chart.Series>       </cfx:Chart>

 

Where "Collection" is my ObservableCollection<T> and "T" is my type in the ObservableCollection.  "TChildProperty" is a property from "T" and is an object itselft.  The properties off of "TChildProperty" are all valid and everything is populated.  Here is my stack trace:

 

at bk..ctor(Type A_0, String A_1)\r\n at ChartFX.WPF.Internal.ColumnGetter.Detect(Object obj, Type type, String name)\r\n at ao.a(Object A_0, Object A_1, Type A_2, Int32 A_3)\r\n at b3.a(Object A_0, Object A_1, Type A_2, Int32 A_3)\r\n at ChartFX.WPF.DataValues.a(IEnumerable A_0, Int32 A_1, Int32 A_2, NotifyCollectionChangedAction A_3, IIndexedCollection`1 A_4, bq A_5)\r\n at ChartFX.WPF.DataValues.a(IEnumerable A_0, Int32 A_1, Int32 A_2, NotifyCollectionChangedAction A_3, bq A_4)\r\n at ChartFX.WPF.DataValues.a(bq A_0, Boolean A_1)\r\n at ChartFX.WPF.Chart.av()\r\n at ChartFX.WPF.Chart.a(Object A_0, RoutedEventArgs A_1)\r\n at ........

 

Help! 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...