title: Telerik Metro XAML Windows 8 chart controls and bindings
body: <p>I am building an app that uses Windows 8 Metro XAML preview controls. I have downloaded and examined the sample app, but it mostly uses code-behind to define all the stuff necessary for the charts. I am trying to accomplish something similar with bindings, and the charts remain empty. Actually, they get the data, but plot nothing (for example, I can see the borderline of the RadPieChart and all zeroes for RadCartesianChart). Here is the code for RadPieChart:</p>
  
  <pre><code>&lt;telerik:RadPieChart&gt;
      &lt;telerik:PieSeries ItemsSource="{Binding AssetsData}" /&gt;
  &lt;/telerik:RadPieChart&gt;
  </code></pre>
  
  <p>And AssetsData is defined like this:</p>
  
  <pre><code>private ElementCollection&lt;PieDataPoint&gt; assetsData;
  public ElementCollection&lt;PieDataPoint&gt; AssetsData
  {
      get
      {
          return assetsData;
      }
      set
      {
          assetsData = value;
          Notify("AssetsData");
      }
  }
  </code></pre>
  
  <p>Filled with data, like this:</p>
  
  <pre><code>PieSeries series = new PieSeries();
  series.RadiusFactor = 0.9;
  
  foreach (var entry in dataSource)
  {
      series.DataPoints.Add(new PieDataPoint() { Value = entry.Percentage, Label = entry.Title });
  }
  
  assetsData = series.DataPoints;
  </code></pre>
  
  <p>Everything works fine when I use code-behind (C#) like in the sample app. I define the series, add the datapoints to series and add that series to chart control. When using the same data and trying to bind like this, it doesn't work.</p>
  
  <p>What am I doing wrong here?</p>
  
  <p>I checked if the values in the collection are set properly, and they are (since I'm using the same logic as when I use code-behind, there shouldn't be any difference really, and there isn't).</p>
  
  <p>Also, is there a way to set RadCartesianChart to scale it's minimum and maximum according to the data that's being drawn?</p>