title: display charts using MVC, .net c#
body: <p>I'm trying to display some charts on my mvc app but I'm having some errors.  I'm developing in localhost.  I have one cshtml file named ReportChart</p>
  
  <pre><code>@{
  var myChart = new Chart(width: 600, height: 400)
      .AddTitle("Chart Title")
      .AddSeries(
          name: "Employee",
          xValue: new[] { "Peter", "Andrew", "Julie", "Mary", "Dave" },
          yValues: new[] { "2", "6", "4", "5", "3" })
      .Write();
  </code></pre>
  
  <p>}</p>
  
  <p>and another file that use that chart:</p>
  
  <pre><code>&lt;body&gt;
  &lt;h1&gt;Chart Example&lt;/h1&gt;
  &lt;p&gt;The following chart is generated by the &lt;em&gt;ReportChart.cshtml&lt;/em&gt; file:&lt;/p&gt;
  &lt;p&gt;&lt;img src="ReportChart.cshtml" alt="Cricketers" /&gt; &lt;/p&gt;
  </code></pre>
  
  <p></p>
  
  <p>The only problem is that the webpage doesn't display any image :/ </p>