title: How to calculate the sum of hours worked and format the dates to only show the months in mvc using mvc chart helpers
body: <p>This is my code which is working currently I would like to know if these two things are possible when using mvc charts? And how to go about doing them</p>
  
  <p>My controller</p>
  
  <pre><code>public ActionResult CharterColumn()
  {
      ArrayList xValue = new ArrayList();
      ArrayList yValue = new ArrayList();
  
      var results = (from c in db.Timesheets select c);
  
      results.ToList().ForEach(rs =&gt; xValue.Add(rs.Date));
      //I want to format this to show the only the months on the x axis
  
      results.ToList().ForEach(rs =&gt; yValue.Add(rs.Hours));
      //And I want to calculate the sum of the hours for each month worked by a specific employee
  
      new Chart(width: 800, height: 400, theme: ChartTheme.Yellow)
      .AddTitle("Test")
      .AddSeries("Default", chartType: "Column", xValue: xValue, yValues: yValue)
      .Write("bmp");
  
      return null;
  }
  </code></pre>
  
  <p>and my view</p>
  
  <pre><code>&lt;div&gt;
     &lt;img src= "@Url.Action("CharterColumn")" alt="Chart"/&gt;
  &lt;/div&gt;
  </code></pre>