title: VS2010 Microsoft.Windows.Controls.DataVisualization.Charting C# code for StackedChart
body: <p>Im creating a silverlight application for now, and I'm having a difficulty how to set an itemssource variable for a stacked chart.</p>
  
  <p>Im using Microsoft.Windows.Controls.DataVisualization.Charting library</p>
  
  <p>I'm used to make a non-stacked chart like so</p>
  
  <pre><code>void getChartCompleted(object sender, GetChartCompletedEventArgs e)
          {
              Chart chart = new Chart();
              BarSeries barSeries = new BarSeries()
                  {
                      ItemsSource = e.Result.Value,
                      DependentValueBinding = new Binding("Value"),
                      IndependentValueBinding = new Binding("Label")
                  };
                  chart.Series.Add(pieSeries);
              stackPanelChart.Children.Add(chart);
          }
  </code></pre>
  
  <p>Now, if I want it to be a stacked bar chart, how to set the 'e' variable? Also, what other setting should I appplied to the chart object?</p>
  
  <p>Thanks</p>