title: Chart Control Multiple ChartArea's, Same Table
body: <p>I've got a table with three columns, the latter two with values in them.  I'm trying to output two pie charts displaying the data for each one.  For some reason, the second pie chart isn't displaying, instead it's coming up as a gray square.  Additionally the legend is appearing twice consecutively, but it's only a single legend which makes no sense to me.</p>
  
  <p>Here's the markup:</p>
  
  <pre><code>&lt;asp:Chart Height="500" Width="500" ID="ClientModelChart" runat="server"&gt;
      &lt;Series&gt;
         &lt;asp:Series ChartType="Pie" IsValueShownAsLabel="true" Name="PortfolioActual"&gt;&lt;/asp:Series&gt;
         &lt;asp:Series ChartType="Pie" IsValueShownAsLabel="true" Name="ModelActual"&gt;&lt;/asp:Series&gt;
      &lt;/Series&gt;
      &lt;Legends&gt;
         &lt;asp:Legend Name="PortfolioActual"&gt;&lt;/asp:Legend&gt;
         &lt;asp:Legend Name="ModelActual"&gt;&lt;/asp:Legend&gt;
      &lt;/Legends&gt;
      &lt;ChartAreas&gt;
         &lt;asp:ChartArea Area3DStyle-Enable3D="true" Area3DStyle-LightStyle="Realistic" Name="PortfolioActual"&gt;&lt;/asp:ChartArea&gt;
         &lt;asp:ChartArea Area3DStyle-Enable3D="true" Name="ModelActual"&gt;&lt;/asp:ChartArea&gt;
      &lt;/ChartAreas&gt;
  &lt;/asp:Chart&gt;
  </code></pre>
  
  <p>Then I've got a <code>SqlDataAdapter</code> used to fill a <code>DataSet</code>, I then turn the <code>DataTableCollection</code> into an <code>IEnumerable</code> list type so I can use it when data binding the chart series.  It seems a bit hairy, but the reason I do this is because the <code>DataSet</code> is used for some XSLT output later on, so there's no point re-querying the database when I've already got the data I need/want.</p>
  
  <pre><code>Dim sectorList As IList = CType(ds.Tables(1), IListSource).GetList()
  
  ClientModelChart.Series("PortfolioActual").Points.DataBind(sectorList, "Sector", "Model", Nothing)
  ClientModelChart.Series("ModelActual").Points.DataBind(sectorList, "Sector", "Client", Nothing)
  </code></pre>
  
  <p>So the second pie chart (ModelActual) isn't displaying at all, it's just a gray square.  I've been fiddling for hours with no avail. (EDIT: Also, I've already done something similar so I don't know why this one isn't working.  The difference with my other one is that it came from two separate sets of data initially, but that shouldn't be the reason it doesn't work)</p>
  
  <p>Thanks.</p>