title: Column Chart spacing between column groups and or alignment of columns on x-axis
body: <p>Unfortunately, I do not have enough reputation points to post images so here is a link to an <a href="http://i.imgur.com/0Ayyj.png" rel="nofollow" title="Example image of chart output">example chart</a>.</p>
  
  <p>Does anyone know how I can get the columns in this chart to align with the x-axis properly? Most of the columns on the chart are not even close to their respective x-axis label. If you look at my example, the first two columns <em>should</em> align with the 2005 x-axis, but it doesn't even show up in the chart. Same with the last column. That one doesn't show up in the chart either, however, it should be aligned with the 2015 x-axis.</p>
  
  <p>I have been working on this issue now for quite a while. All of the possible solutions that I have found (including here on SO) haven't worked for me. </p>
  
  <p>Here is the code that I wrote to generate the example output:
  (Markup)</p>
  
  <pre><code>&lt;div style="width:100%;"&gt;
      &lt;div&gt;        
          &lt;asp:Chart ID="chEmpTRI" runat="server" Width="600px"&gt;
              &lt;series&gt;
              &lt;/series&gt;
              &lt;chartareas&gt;
                  &lt;asp:ChartArea Name="ChartArea1"&gt;
                  &lt;/asp:ChartArea&gt;
              &lt;/chartareas&gt;
          &lt;/asp:Chart&gt;
          &lt;asp:SqlDataSource ID="sdsEmpTRI" runat="server" 
              ConnectionString="&lt;%$ ConnectionStrings:ConnectionString1 %&gt;" 
              SelectCommand="
                  SELECT 
                      [Desc], 
                      [Year], 
                      [Value] 
                  FROM [vw_EmpTRI] 
                  --WHERE [Year] BETWEEN 2005 AND 2007
                  ORDER BY [Year], [Desc]"&gt;
          &lt;/asp:SqlDataSource&gt;        
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>(Code Behind)</p>
  
  <pre><code> int? min = 0, max = 0;
  protected void Page_Load(object sender, EventArgs e)
  {        
      DataView dv = sdsEmpTRI.Select(DataSourceSelectArguments.Empty) as DataView;
      if (dv != null)
      {
          min = dv.Table.Compute("Min(Year)", string.Empty) as int?;
          max = dv.Table.Compute("Max(Year)", string.Empty) as int?;
  
          if (min.HasValue &amp;&amp; max.HasValue)
          {
              for (int i = min.Value; i &lt;= max.Value; i++)
              {
                  dv.RowFilter = String.Format("[Year] = {0}", i);
                  foreach (DataRowView drv in dv)
                  {                                              
                      Decimal? value = drv.Row.Field&lt;Decimal?&gt;("Value");
                      Series s = new Series(String.Format("{0}_{1}", drv.Row.Field&lt;string&gt;("Desc"), i));
                      s.ChartType = SeriesChartType.Column;
                      s.XValueType = ChartValueType.Int32;                       
                      DataPoint p = new DataPoint(s);
                      p.XValue = i;
                      p.YValues = new double[] { value.HasValue ? decimal.ToDouble(value.Value) : double.NaN };
                      s.Points.Add(p);
                      s.SetCustomProperty("PixelPointWidth", "150");
                      s.SetCustomProperty("PointWidth", "1");
                      s.Label = String.Format("{0}", value);
                      chEmpTRI.Series.Add(s);
                  }
              }
          }
      }
  }
  </code></pre>
  
  <p>I tried using the custom property s.SetCustomProperty("PointWidth", "1") to try and reduce the spacing between column groups, but that has no affect what so ever. Does anyone out there have any suggestions on how to line this up?</p>