title: Range bar in MS Chart
body: <p>I want to generate bars like in <a href="https://stackoverflow.com/questions/6444058/mschart-how-to-group-rangebar-data-with-text-labels-instead-of-indexes">link</a>:
  <a href="https://i.stack.imgur.com/2znN3.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/2znN3.png" alt="enter image description here"></a></p>
  
  <p>However, I get this error:</p>
  
  <p><a href="https://i.stack.imgur.com/sz48I.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/sz48I.png" alt="enter image description here"></a></p>
  
  <p>Here is the code I use:</p>
  
  <pre><code>        // AxisY
          chart1.ChartAreas.Add(CA);
          chart1.ChartAreas[1].AxisY.MajorGrid.Enabled = false;
          chart1.ChartAreas[1].AxisY.Interval = 1;
  
          // AxisX
          chart1.ChartAreas[1].AxisX.ScrollBar.Enabled = true;
          chart1.ChartAreas[1].AxisX.ScaleView.Zoomable = true;
          chart1.ChartAreas[1].AxisX.MajorGrid.Enabled = false;
          chart1.ChartAreas[1].AxisX.LabelStyle.Format = "yyyy-MM-dd hh:mm:ss";
  
          chart1.ChartAreas[1].AxisX.Interval = 0;
          chart1.ChartAreas[1].AxisX.IntervalType = DateTimeIntervalType.Years;
  
          minDate = new DateTime(2016, 01, 01, 00, 00, 00, 000);
          maxDate = new DateTime(2016, 12, 01, 00, 00, 00, 000); // or DateTime.Now;
  
          chart1.ChartAreas[1].Axes[0].Enabled = AxisEnabled.False;
          chart1.ChartAreas[1].Axes[1].Enabled = AxisEnabled.False;
  
          chart1.ChartAreas[1].BackColor = Color.Transparent;
          chart1.ChartAreas[1].Position.Height = 100;
          chart1.ChartAreas[1].Position.Width = 100;
          chart1.ChartAreas[1].InnerPlotPosition.Height = 90;
          chart1.ChartAreas[1].InnerPlotPosition.Width = 80;
          chart1.ChartAreas[1].InnerPlotPosition.X = 10;
  
          var series2 = new Series
          {
              Name = "S2",
              Color = Color.Black,
              ChartType = SeriesChartType.RangeBar,
              YValueType = ChartValueType.Auto,
              XValueType = ChartValueType.Auto
          };
  
          var values2 = new DateTime[3];
          values2[0] = minDate.AddMonths(2);
          values2[1] = minDate.AddMonths(4);
          values2[2] = minDate.AddMonths(6);
  
          series2.Points.AddXY(1, values2[1], values2[2]);
  
          series2["PointWidth"] = ".25";
  
          chart1.Series.Add(series2);
  </code></pre>
  
  <p>The bottom axis is a date time. the left axis is fixed and has words as labels. I need to show gap in data. </p>