title: Silverlight Toolkit: Why can't I change ItemsSource on Chart.Series?
body: <p>I'm starting to experiment with the new chart controls in <code>System.Windows.Controls.DataVisualization.Charting</code> (from the <a href="http://www.codeplex.com/Silverlight" rel="nofollow noreferrer">Silverlight 3 Toolkit</a>)</p>
  
  <p>I want to bind a data table that contains a list of budgets (name &amp; value column). It works when I first load my page:</p>
  
  <pre><code>&lt;v:Chart x:Name="BudgetChart" 
           Title="Budget Distribution"&gt;
      &lt;v:PieSeries x:Name="PieSeries" 
                   IndependentValueBinding="{Binding Path=CategoryName}"
                   DependentValueBinding="{Binding Path=Value}"/&gt;
  &lt;/v:Chart&gt;
  </code></pre>
  
  <p>I bind my data to the chart like this: </p>
  
  <pre><code>void RefreshChart()
  { 
      PieSeries.ItemsSource = dataTable;
  }
  </code></pre>
  
  <p>My problem, is that if I call <code>RefreshChart()</code> a second time, I get a bizarre exception:</p>
  
  <blockquote>
    <p>KeyNotFoundException: The given key
    was not present in the dictionary.</p>
  </blockquote>
  
  <p>Is there something I'm not doing right? </p>