title: Chartjs and Polymer 1.7.0
body: <p>When using Chartjs with Polymer with setting as <code>dom: 'shadow'</code>, I am getting an error as </p>
  
  <p><code>Uncaught TypeError: Failed to execute 'getComputedStyle' on 'Window': parameter 1 is not of type 'Element</code></p>
  
  <p>But if I remove <code>dom: 'shadow'</code> from the initial setting for Polymer, then the error is gone. I cant understand what the problem is.</p>
  
  <p>Shouldn't I use <code>'dom':'shadow'</code>?</p>
  
  <p>Live preview(see the console): <a href="https://s.codepen.io/jenishngl/debug/mOVJPm" rel="nofollow noreferrer">https://s.codepen.io/jenishngl/debug/mOVJPm</a></p>
  
  <p>My code as in <a href="https://codepen.io/jenishngl/pen/mOVJPm" rel="nofollow noreferrer">https://codepen.io/jenishngl/pen/mOVJPm</a></p>
  
  <pre><code>&lt;script&gt;
    window.Polymer = {
              dom: 'shadow',          // Local DOM is rendered using shadow DOM where supported
              lazyRegister: true      // Sets lazy registeration for custom elements
          };
  &lt;/script&gt;
  
  &lt;script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.3.0/Chart.min.js"&gt;&lt;/script&gt;
  &lt;base href="https://cdn.rawgit.com/download/polymer-cdn/1.5.0/lib/"&gt;
  
  &lt;link rel="import" href="polymer/polymer.html"&gt;
  
  &lt;style&gt;
    html, body{
      padding: 0;
      margin: 0;
      box-sizing: border-box;
      height: 500px;
      width: 100%;
    }
    chart-element{
      height: 100%;
      width: 100%;
    }
  &lt;/style&gt;
  
    &lt;dom-module id="chart-element"&gt;
    &lt;template&gt;
      &lt;style&gt;
        :host{
          display: block;
          height: 100%;
          width: 100%;
        }
        #chart{
          height: 100%;
          width: 100%;
        }
      &lt;/style&gt;
      &lt;canvas id="chart"&gt;&lt;/canvas&gt;
    &lt;/template&gt;
      &lt;script&gt;
    Polymer({
      is: 'chart-element',
  
      ready: function(){
        this.async(function(){
          this._drawChart();
        }.bind(this), 2000);
      },
  
      _drawChart: function(){
        var labels = ["JUL", "AUG", "SEP", "OCT"];
                  var rasied = ["1710", "0", "0", "0"];
                  var solved = ["1642", "0", "0", "0"];
                  var ctx = this.$$('#chart');
                  var chart = new Chart(ctx, {
                          type: 'line',
                          data: {
                              labels: labels,
                              datasets: [
                                  {
                                      label: "Raised",
                                      fill: false,
                                      lineTension: 0.1,
                                      backgroundColor: "#F44336",
                                      borderColor: "#F44336",
                                      borderCapStyle: 'butt',
                                      borderDash: [],
                                      borderDashOffset: 0.0,
                                      borderJoinStyle: 'round',
                                      pointBorderColor: "#F44336",
                                      pointBackgroundColor: "#fff",
                                      pointBorderWidth: 6,
                                      pointHoverRadius: 5,
                                      pointHoverBackgroundColor: "#F44336",
                                      pointHoverBorderColor: "rgba(220,220,220,1)",
                                      pointHoverBorderWidth: 2,
                                      pointRadius: 1,
                                      pointHitRadius: 10,
                                      data: rasied
                                  },
                                  {
                                      label: "Solved",
                                      fill: false,
                                      lineTension: 0.1,
                                      backgroundColor: "#009688",
                                      borderColor: "#009688",
                                      borderCapStyle: 'butt',
                                      borderDash: [],
                                      borderDashOffset: 0.0,
                                      borderJoinStyle: 'round',
                                      pointBorderColor: "#009688",
                                      pointBackgroundColor: "#fff",
                                      pointBorderWidth: 6,
                                      pointHoverRadius: 5,
                                      pointHoverBackgroundColor: "#009688",
                                      pointHoverBorderColor: "rgba(220,220,220,1)",
                                      pointHoverBorderWidth: 2,
                                      pointRadius: 1,
                                      pointHitRadius: 10,
                                      data: solved
                                  }
                              ]
                          },
                          options: {
                              responsive: true,
                              maintainAspectRatio: false,
                              scales: {
                                  yAxes: [{
                                      ticks: {
                                          beginAtZero:true
                                      }
                                  }]
                              }
                          }
                      });
      }
    });
  &lt;/script&gt;
  &lt;/dom-module&gt;
  &lt;chart-element&gt;&lt;/chart-element&gt;
  </code></pre>