title: AM Charts - Line chart displaying in correct data
body: <p>I’m using AM charts to plot amounts per year over a number of years. I have created a code pen to show you my issue:</p>
  
  <p><a href="https://codepen.io/conormdowney/pen/QzamJb" rel="nofollow noreferrer">https://codepen.io/conormdowney/pen/QzamJb</a></p>
  
  <p>My code to draw the chart:</p>
  
  <pre><code>var dataProvider = [
  {year: "2017", value: 50},
  {year: "2018", value: 123},
  {year: "2019", value: 150},
  {year: "2020", value: 291}
  ];
  
  var _chart = am4core.create('chartDiv', am4charts.XYChart);
  _chart.paddingRight = 20;
  
  _chart.data = dataProvider;
  
  var dateAxis = _chart.xAxes.push(new am4charts.DateAxis());
  dateAxis.renderer.minGridDistance = 50;
  dateAxis.renderer.grid.template.location = 0.5;
  dateAxis.baseInterval = 
    {
    count: 1,
    timeUnit: "year"
  }
  
  var valueAxis = _chart.yAxes.push(new am4charts.ValueAxis());
  valueAxis.cursorTooltipEnabled = false;
  // Create series
  var series = _chart.series.push(new am4charts.LineSeries());
  series.dataFields.valueY = "value";
  series.dataFields.dateX = "year";
  series.strokeWidth = 3;
  series.connect = false;
  series.tensionX = 0.8;
  series.fillOpacity = 0.2;
  series.tooltipText = "[bold]{valueY}[/]";
  
  var bullet = series.bullets.push(new am4charts.CircleBullet());
  bullet.stroke = am4core.color("#fff");
  bullet.strokeWidth = 3;
  
  var range = valueAxis.createSeriesRange(series);
  range.value = 0;
  range.endValue = 100;
  range.contents.stroke = _chart.colors.getIndex(2);
  range.contents.fill = range.contents.stroke;
  range.contents.fillOpacity = 0.2;
  
  var scrollbarX = new am4charts.XYChartScrollbar();
  scrollbarX.series.push(series);
  _chart.scrollbarX = scrollbarX;
  _chart.cursor = new am4charts.XYCursor();
  </code></pre>
  
  <p>I have data from the year 2017 to 2020. When plotted it shows from 2016 to 2019, until you hover over the data in which case it highlights the data from the year after you are hovered. Can you tell me why this happens and how to correct it?</p>