title: How to remove gaps in stacked bar
body: <p>I'm trying to make gantt chart in C#, I'm using StackedBar chart type. The goal of this chart is to show, how "tasks" can be schedule on number of "machines". In my algorithm there shouldn't be free spaces between "tasks" on chart. Each "task" is added as new series. On first bar it's working like it should be, but in others "task" starts after ending on the previous bar. I need help with removing these gaps. Some task need to be divided on two machines, and when I do it, then this task is showing on second column like it should, from the begining of bar.</p>
  
  <p>I was trying to add zero DataPoints like suggested in some post on stack, but it didn't help in my case. (<a href="https://stackoverflow.com/questions/6131991/microsoft-chart-stacked-column-chart-has-gaps">Microsoft chart stacked column chart has gaps</a>)</p>
  
  <p>Below is my code to create this chart:</p>
  
  <pre><code>foreach (var item in tasks)
  {
       scheduleChart.Series.Add(item.Name);
       scheduleChart.Series[item.Name].ChartType = SeriesChartType.StackedBar;
       scheduleChart.Series[item.Name].LabelForeColor = Color.White;
  }
  
  for (int i = 0; i &lt; mcNaugthon.Machines.Count; i++)
  {
       foreach (var item in mcNaugthon.Machines[i].Tasks)
       {
            scheduleChart.Series[item.Name].Points
                .Add(new DataPoint(i, item.Time));
            scheduleChart.Series[item.Name].Label = item.Name;    
        }
   }
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/aUX6A.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/aUX6A.png" alt="enter image description here"></a></p>
  
  <p>-- edit --</p>
  
  <p>As requested chart with data: <a href="https://i.imgur.com/64X3SNy.png" rel="nofollow noreferrer">http://i.imgur.com/64X3SNy.png</a></p>