title: angular 5 chart.js Failed to create chart
body: <p>I recently added chart.js to my angular 5 projects and I'm trying to create a line type chart but I have an error: <code>Failed to create a chart: can't acquire context from the given item</code> in browser console how can I solve this issue?  </p>
  
  <pre><code>public chart = [];
  ngOnInit() {
  this.chart = new Chart('canvas', {
        type: 'line',
        data: {
          labels: ["a", "b", "c", "d", "e"],
          datasets: [
            {
              title: "Some Data",
              values: [25, 40, 30, 35, 100],
              borderColor: "#3cba9f",
              fill: false
            },
          ]
        },
        options: {
          legend: {
            display: false
          },
          scales: {
            xAxes: [{
              display: true
            }],
            yAxes: [{
              display: true
            }],
          }
        }
      });
  }
  </code></pre>
  
  <p>component html:</p>
  
  <pre><code>&lt;div *ngIf="chart"&gt;
    &lt;canvas #canvas id="canvas"&gt;{{ chart }}&lt;/canvas&gt;
  &lt;/div&gt;
  </code></pre>