title: Drawing multiple charts in a View
body: <p>Partial View "PiePartial.cshtml":</p>
  
  <pre><code>@model IEnumerable&lt;QLCLDA.Models.Chart.ChartValue&gt;
  
  &lt;script type="text/javascript"&gt;
      var chart;
      var legend;
  
      AmCharts.ready(function () {
          // PIE CHART
          chart = new AmCharts.AmPieChart();
          chart.dataProvider = @Html.Raw(Json.Encode(Model));
          chart.titleField = "name";
          chart.valueField = "value";
          chart.outlineColor = "#FFFFFF";
          chart.outlineAlpha = 0.8;
          chart.outlineThickness = 2;
  
          // WRITE
          chart.write("piediv");
      });
  &lt;/script&gt;
  </code></pre>
  
  <p>Index.cshtml</p>
  
  <pre><code>@model QLCLDA.Models.Chart.ChartDraw
  
  @{
      ViewBag.Title = "Index";
  }
  
  &lt;script src="~/Scripts/amcharts/amcharts.js"&gt;&lt;/script&gt;
  &lt;script src="~/Scripts/amcharts/pie.js"&gt;&lt;/script&gt;
  
  @{
      Html.RenderPartial("PiePartial", Model.ProjectCount);
      Html.RenderPartial("PiePartial", Model.IsFailed);
  }
  
  &lt;div id="piediv" style="width: 100%; height: 400px;"&gt;&lt;/div&gt;
  </code></pre>
  
  <p>Calling with <code>&lt;div id="piediv"&gt;</code> just only show 1 chart of Model IsFailed, I think they have the same <code>id="piediv"</code> is the cause of it. </p>
  
  <p>I want to show 2 pie charts with Model <em>ProjectCount</em> and <em>IsFailed</em> inside Index.cshtml</p>