title: Winform Charting Histogram - Draw bar from start to end of bin
body: <p>I'm trying to create a proper histogram using the standard charting library in Winforms C#.  Currently my histogram looks as follows:</p>
  
  <p><a href="https://i.stack.imgur.com/7daoU.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/7daoU.png" alt="enter image description here"></a></p>
  
  <pre><code>    var dataPointSeries = new System.Windows.Forms.DataVisualization.Charting.Series
      {
          Name = chartName,
          Color = Colors.blue,
          IsVisibleInLegend = false,
          ChartType = SeriesChartType.Column,
          MarkerStyle = MarkerStyle.None,
          BorderWidth = 1,
          BorderColor = Color.White
  
  
      };
      for (int i = 0; i &lt; data.hDataPoints.Count(); i++)
      {
          dataPointSeries.Points.AddXY(Charts.Functions.RoundValue(data.hDataPoints[i].fromBin), data.hDataPoints[i].probability);
      }
  
      chart.Series.Add(dataPointSeries);
      chart.Series[0]["PointWidth"] = "1";
  </code></pre>
  
  <p>The problem that I'm having is the bars are not displayed correctly.  For a histogram, the bar needs to start at the lower bin and end at the upper bin.  The chart control draws the bar in the middle of the upper or lower bin depending on which one you choose as the X data point.</p>
  
  <p>Any idea how to fix this?</p>