title: Using Chart.js with Dates as x-Axis labels
body: <p>I'm a little stuck with Chartjs. I want to have Dates as x-Axis labels, but whatever I try, I am getting an Error. This is my code:</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;html&gt;
  
  &lt;head&gt;
      &lt;link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.9.3/Chart.min.css"&gt;
      &lt;meta charset="utf-8" /&gt;
  &lt;/head&gt;
  
  &lt;body&gt;
  
      &lt;div style="width:75%;"&gt;
          &lt;canvas id="canvas"&gt;&lt;/canvas&gt;
      &lt;/div&gt;
  
      &lt;script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.9.3/Chart.min.js"&gt;&lt;/script&gt;
      &lt;script&gt;
          var date0 = new Date((new Date()).getTime() - 50000);
          var date1 = new Date();
          var date2 = new Date((new Date()).getTime() + 50000);
  
          var chartData = {
              type: 'line',
              data: {
                  datasets: [{
                      label: 'A label',
                      backgroundColor: 'rgb(255,0,0)',
                      borderColor: 'rgb(255,0,0)',
                      data: [
                          { x: date0, y: 10 },
                          { x: date1, y: 11 },
                          { x: date2, y: 15 }
                      ],
                      fill: false,
                      yAxisID: 'y-axis-1',
                  }]
              },
              options: {
                  responsive: true,
                  scales: {
                      xAxes: [{
                          type: 'time',
                          time: {
                              unit: 'second'
                          }
                      }],
                      yAxes: [{
                          type: 'linear',
                          display: true,
                          position: 'left',
                          id: 'y-axis-1',
                      }]
                  }
              }
          }
  
          window.onload = function () {
              var ctx = document.getElementById('canvas').getContext('2d');
              window.myLine = new Chart(ctx, chartData);
          };
  
      &lt;/script&gt;
  &lt;/body&gt;
  
  &lt;/html&gt;</code></pre>
  </div>
  </div>
  </p>
  <p>I'm always getting the following error:</p>
  <blockquote>
  <p>Uncaught Error: This method is not implemented: either no adapter can be found or an incomplete integration was provided.</p>
  </blockquote>
  <p>Which hints at the <strong>chartData</strong> object being somwhow malformed, but since I followed the documentation of Chartjs pretty close, I have no idea where. Can anyone spot the error?</p>
  <p>Thanks in advance for your help.</p>