title: Line up X axis labels with chart columns (ASP.Net Chart control)
body: <p>I'm trying to make a chart using the ASP.Net Chart control that has specific numerical values on the X axis and their frequency count on the Y axis. Here is an example of what I want from the charting framework I am replacing:</p>
  
  <p><img src="https://i.stack.imgur.com/rTamQ.png" alt="enter image description here"></p>
  
  <p>In the above example, the X axis labels line up with the columns. But, with the ASP.Net Chart control, instead of labeling the columns which represent these specific values (e.g. 1492, 2984), the control is labeling at rounded intervals and not lining up with the columns (e.g. 2000, 4000) as you can see below:</p>
  
  <p><img src="https://i.stack.imgur.com/K7IkR.png" alt="enter image description here"></p>
  
  <p>I found other similar postings that recommended setting the <code>ChartArea.AxisX.Interval</code> to 1. I tried that, but then the X axis label disappears for some reason as you can see below:</p>
  
  <p><img src="https://i.stack.imgur.com/lmCnK.png" alt="enter image description here"></p>
  
  <p>Here is the code I'm using to create and populate the chart (minus setting various color attributes):</p>
  
  <pre><code>DataTable newDt = GetChartDataTable();
  chart.DataSource = newDt;
  chart.Series.Add("Series1");
  chart.Series["Series1"].YValueMembers = "Frequency";
  chart.Series["Series1"].XValueMember = "RoundedValue";
  chart.ChartAreas["ChartArea1"].AxisX.Title = "kbps";
  chart.ChartAreas["ChartArea1"].AxisX.TitleFont = new Font("Sans Serif", 10, FontStyle.Bold);
  chart.ChartAreas["ChartArea1"].AxisY.Title = "Frequency";
  chart.ChartAreas["ChartArea1"].AxisY.TitleFont = new Font("Sans Serif", 10, FontStyle.Bold);
  chart.Titles["Title1"].Text = chartTitle;
  chart.Titles["Title1"].Font = new Font("Sans Serif", 10, FontStyle.Bold);
  chart.Series["Series1"].ChartType = System.Web.UI.DataVisualization.Charting.SeriesChartType.Column;
  chart.Series["Series1"]["ShowMarkerLines"] = "True";
  chart.DataBind();
  </code></pre>