title: Display Chart(.js) when mouse hover over: TypeError: t is null
body: <p>I came across a error that I cant seem to be fixing.</p>
  
  <p>I'm trying to display a chart (Chart.js) when my mouse is hoverd over the canvas. 
  When hovering my mouse over the canvas i receive a <code>TypeError: t is null</code> error.</p>
  
  <p>Error:
  {
    "message": "Script error.",
    "filename": "<a href="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.8.0/Chart.bundle.min.js" rel="nofollow noreferrer">https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.8.0/Chart.bundle.min.js</a>",
    "lineno": 0,
    "colno": 0
  }</p>
  
  <p>The error is not from my own code but from chart.js. </p>
  
  <p>The code I used can be found below.</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;!doctype html&gt;
  &lt;html&gt;
  &lt;head&gt;
          &lt;script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.8.0/Chart.bundle.min.js"&gt;&lt;/script&gt;
  &lt;style&gt;
      #canvas{border:1px solid lightgray;}
  &lt;/style&gt;
  &lt;/head&gt;
  &lt;body&gt;
  &lt;script&gt;
  window.onload=function(){
      var canvas=document.getElementById("canvas");
      var ctx=canvas.getContext("2d");
  
          //Mouse over
          canvas.addEventListener("mouseover",function(){
              draw(ctx);
              console.log("mosue hover")
  
              //Show chart
              new Chart(document.getElementById("line-chart"), {
                  type: 'line',
                  data: {
                      //x
                      labels: [1571677338438,
                          1571680924962,
                          1571684668435],
                      datasets: [{
                          data: [8179.6471707218025,
                              8194.415903357343,
                              8175.8698340503815],
                          borderColor: "#3e95cd",
                          fill: true
                      }
                      ]
                  },
                  options: {
                      title: {
                          display: false,
                          text: 'World population per region (in millions)'
                      },
                      legend: {
                          display: false,
                      }
                  }
              });
  
  
          });
  
  
          //Mouse over ends
          canvas.addEventListener("mouseout",function(){
              draw(ctx);
              console.log("end hover");
              console.log("remove chart.");
          });
  
  
          draw(ctx);
  
      function draw(ctx){
          ctx.beginPath();
          ctx.closePath();
      }
  
  };  // end window.onload
  
  &lt;/script&gt;
  
      &lt;canvas id="canvas" width=300 height=300&gt;&lt;/canvas&gt;
  &lt;/body&gt;
  &lt;/html&gt;</code></pre>
  </div>
  </div>
  </p>