title: WPF Toolkit Charting and IndependentValueBinding, IndependentValuePath
body: <p>I'm facing a problem with the charting engine from the WPF toolkit.</p>
  
  <p>I haven't moved the data to a proper object model, so the <code>ItemSource</code> is backed with a <code>DataView</code>.</p>
  
  <p>First attempt</p>
  
  <pre><code>&lt;chartingToolkit:ScatterSeries x:Name="TargetSeries" 
    DataPointStyle="{StaticResource TargetStyle}"  
    ItemsSource="{Binding Path=TargetSeriesData}"
    IndependentValueBinding="{Binding Path=TargetSeries_X}" 
    DependentValueBinding="{Binding Path=TargetSeries_X}" /&gt;
  </code></pre>
  
  <p>This crashes because I believe the bindings are considered as the values to the plot or some sort of mismatch.</p>
  
  <p>Second attempt</p>
  
  <pre><code>&lt;chartingToolkit:ScatterSeries x:Name="TargetSeries" 
    DataPointStyle="{StaticResource TargetStyle}" 
    ItemsSource="{Binding Path=TargetSeriesData}"
    IndependentValuePath="{Binding Path=TargetSeries_X}"
    DependentValuePath="{Binding Path=TargetSeries_X}" /&gt;
  </code></pre>
  
  <p>This crash happens during the initialization step because the Path properties aren't backed with dependency properties and therefore cannot be bound.</p>
  
  <p>Third attempt</p>
  
  <pre><code>&lt;chartingToolkit:ScatterSeries x:Name="TargetSeries" 
    DataPointStyle="{StaticResource TargetStyle}"  
    ItemsSource="{Binding Path=TargetSeriesData}"
    IndependentValuePath="targetFooXColumnName" 
    DependentValuePath="targetFooYColumnName" /&gt;
  </code></pre>
  
  <p>Now this works!
  But I wanted to use the binding so I can switch from using the <code>targetFooXColumnName</code> to the <code>targetFooBarXColumnName</code>. So this solution will cause a whole lot of hacky looking code to switch the Path manually.</p>
  
  <p>Is there a way to fix this? Can I use some sort of converter to get the Binding properties to correctly pull the data from the columns in the DataView?</p>
  
  <p>Thanks,
  Joel</p>