title: ASP.NET Chart Column Widths
body: <p>I have the following ASP.NET dynamic chart below.  How do I puta lines going down the chart for each date on the x axis.  There are currently 3 lines going down the y axis, Jul 2009, May 2010, and Mar 2011.  I want a line for each date, so you can see each point on the line and I also want to display each date that a point is placed on the chart.</p>
  
  <p>Also, there seems to padding at the start and end of the chart and no right border.  How do I get rid of the padding and get the right border in place?</p>
  
  <p><a href="http://s10.postimage.org/95nk8sgyh/Chartingchart_Img.jpg" rel="nofollow">chart image</a></p>
  
  <p>Here is my code:</p>
  
  <p>Front End:</p>
  
  <pre><code>&lt;asp:Chart ID="chtReport" runat="server" Width="650px" Height="400px" ImageType="Jpeg"&gt;
      &lt;Series&gt;
          &lt;asp:Series Name="TotalLine" YValueType="Double" ChartType="Line" ChartArea="MainChartArea" /&gt;
          &lt;asp:Series Name="GoalLine" YValueType="Double" ChartType="Line" ChartArea="MainChartArea" /&gt;
          &lt;asp:Series Name="AverageLine" YValueType="Double" ChartType="Line" ChartArea="MainChartArea" /&gt;
         &lt;asp:Series Name="TotalPoint" YValueType="Double" ChartType="Point" ChartArea="MainChartArea" /&gt;
         &lt;asp:Series Name="GoalPoint" YValueType="Double" ChartType="Point" ChartArea="MainChartArea" /&gt;
         &lt;asp:Series Name="AveragePoint" YValueType="Double" ChartType="Point" ChartArea="MainChartArea" /&gt;
     &lt;/Series&gt;
      &lt;ChartAreas&gt;
          &lt;asp:ChartArea Name="MainChartArea"&gt;
          &lt;/asp:ChartArea&gt;
      &lt;/ChartAreas&gt;
  &lt;/asp:Chart&gt;
  </code></pre>
  
  <p>Back End</p>
  
  <pre><code>protected void Page_Load(object sender, EventArgs e)
  {
      for (DateTime date = startDate; date &lt;= ChartDetails.EndDate; date = date.AddMonths(1))
      {
          dates.Add(date.ToString());
      }
  
      grdChart.DataSource = dates;
      grdChart.DataBind();
  
      chtReport.ChartAreas["MainChartArea"].AxisY.Minimum = 0;
      chtReport.ChartAreas["MainChartArea"].AxisY.Maximum = 100;
      chtReport.ChartAreas["MainChartArea"].AxisX.Title = "Date Range";
      chtReport.ChartAreas["MainChartArea"].AxisY.Title = "Percent";
  }
  
  
  protected void grdChart_ItemDataBound(object sender, DataGridItemEventArgs e)
  {
      // Extra Code above...
  
      chtReport.Series["TotalLine"].Points.AddXY(rowDate.ToString("MMM yyyy"), total);
      chtReport.Series["GoalLine"].Points.AddXY(rowDate.ToString("MMM yyyy"), total);
      chtReport.Series["AverageLine"].Points.AddXY(rowDate.ToString("MMM yyyy"), total);
  
      chtReport.Series["TotalPoint"].Points.AddY(total);
      chtReport.Series["GoalPoint"].Points.AddXY(rowDate.ToString("MMM yyyy"), total);
      chtReport.Series["AveragePoint"].Points.AddXY(rowDate.ToString("MMM yyyy"), total);
  }
  </code></pre>
  
  <p>Thanks in advance for any help.</p>