title: Using Chart.js in Web Worker
body: <p>I am trying to use Worker for drawing the Chart using Chart.js, as mentioned on the Chart.js page:<br />
  <a href="https://www.chartjs.org/docs/master/general/performance/" rel="nofollow noreferrer">https://www.chartjs.org/docs/master/general/performance/</a><br />
  Section: Parallel rendering with web workers (Chrome only)</p>
  <p>But in the <code>worker.js</code> file I get an error:</p>
  <pre><code>Uncaught ReferenceError: Chart is not defined
  </code></pre>
  <p>I have below code in <code>worker.js</code>:</p>
  <pre><code>onmessage = function(event) {
      const {canvas, config} = event.data;
      const chart = new Chart(canvas, config); // Error for Chart 
  
      canvas.width = 100;
      canvas.height = 100;
      chart.resize();
  };
  </code></pre>