JavaScript Chartjs and Polymer 1.7.0

When using Chartjs with Polymer with setting as dom: 'shadow', I am getting an error as

Uncaught TypeError: Failed to execute 'getComputedStyle' on 'Window': parameter 1 is not of type 'Element

But if I remove dom: 'shadow' from the initial setting for Polymer, then the error is gone. I cant understand what the problem is.

Shouldn't I use 'dom':'shadow'?

Live preview(see the console): https://s.codepen.io/jenishngl/debug/mOVJPm

My code as in https://codepen.io/jenishngl/pen/mOVJPm

<script>
  window.Polymer = {
            dom: 'shadow',          // Local DOM is rendered using shadow DOM where supported
            lazyRegister: true      // Sets lazy registeration for custom elements
        };
</script>

<script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.3.0/Chart.min.js"></script>
<base target='_blank' href="https://cdn.rawgit.com/download/polymer-cdn/1.5.0/lib/">

<link rel="import" target='_blank' href="polymer/polymer.html">

<style>
  html, body{
    padding: 0;
    margin: 0;
    box-sizing: border-box;
    height: 500px;
    width: 100%;
  }
  chart-element{
    height: 100%;
    width: 100%;
  }
</style>

  <dom-module id="chart-element">
  <template>
    <style>
      :host{
        display: block;
        height: 100%;
        width: 100%;
      }
      #chart{
        height: 100%;
        width: 100%;
      }
    </style>
    <canvas id="chart"></canvas>
  </template>
    <script>
  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
                                    }
                                }]
                            }
                        }
                    });
    }
  });
</script>
</dom-module>
<chart-element></chart-element>
Answer:1

I'm trying to attach string with propery binding for example my object is { "name": "The Walking Dead", "imageUrl": "/title/tt1520211/?pf_rd_m=A2FGELUUNOQJNL&pf_rd_p=2240084122&pf_rd_r=...

I'm trying to attach string with propery binding for example my object is { "name": "The Walking Dead", "imageUrl": "/title/tt1520211/?pf_rd_m=A2FGELUUNOQJNL&pf_rd_p=2240084122&pf_rd_r=...

My array looks like this: [ {name:'John',IsManager:true}, {name:'Terry'}, {name:'Sam'}, {name:'Andy'} ] I'm trying to get it to display all the people that don't have the IsManager property: ...

My array looks like this: [ {name:'John',IsManager:true}, {name:'Terry'}, {name:'Sam'}, {name:'Andy'} ] I'm trying to get it to display all the people that don't have the IsManager property: ...

  1. angularjs filtering ng-repeat
  2. angularjs ng repeat filter
  3. angularjs ng repeat filter function
  4. angularjs ng-repeat filter by property
  5. angularjs ng-repeat filter multiple fields
  6. angularjs ng repeat filter or condition
  7. angularjs ng-repeat filter not equal
  8. angularjs ng-repeat filter multiple values
  9. angularjs ng-repeat filter by property value
  10. angularjs ng-repeat filter empty
  11. angularjs ng repeat filter conditional
  12. angularjs ng-repeat filter object property
  13. angularjs ng-repeat filter null value
  14. angularjs ng-repeat filter multiple parameters
  15. angularjs ng-repeat filter function parameter
  16. angularjs ng-repeat filter count
  17. angularjs ng-repeat filter array of objects
  18. angularjs ng-repeat filter length
  19. angularjs ng-repeat filter exact match
  20. angularjs ng-repeat filter example

I'm working on what seems to be a simple script, making buttons toggle divs in and out of view. I've done so before, but this time I'm using dynamic selectors in jQuery, and can't see what is wrong. ...

I'm working on what seems to be a simple script, making buttons toggle divs in and out of view. I've done so before, but this time I'm using dynamic selectors in jQuery, and can't see what is wrong. ...

  1. canvas
  2. canada
  3. cancelled
  4. canceled vs cancelled
  5. canada goose
  6. cancun flights
  7. cane corso
  8. canes
  9. canadian prime minister
  10. canker sore
  11. candy
  12. cancer
  13. cancun
  14. canon
  15. canvas prints
  16. cancer sign
  17. candace owens
  18. canada news
  19. candytopia
  20. canlis

I am trying to change text of an svg item inside an img tag dynamically with jquery. I keep grabbing the wrong node, because all the boards say to change textContent, but it never alters the text. ...

I am trying to change text of an svg item inside an img tag dynamically with jquery. I keep grabbing the wrong node, because all the boards say to change textContent, but it never alters the text. ...

  1. change text from all caps
  2. change text from all caps in excel
  3. change text from english to spanish
  4. change text from columns to rows
  5. change text from horizontal to vertical in word
  6. change text from script unity
  7. change text from passive to active
  8. change text from columns to rows in excel
  9. change text from css
  10. change text from vertical to horizontal in excel
  11. change text from lowercase to uppercase
  12. change text from uppercase to lowercase in excel
  13. change text from white to black on iphone
  14. change text from imessage to sms
  15. change text from green to blue
  16. change text from icloud to phone number
  17. change text from vertical to horizontal in photoshop
  18. change text from email to phone number
  19. change text from lowercase to uppercase in word
  20. change text from image online