0

I'm wokring on this code :

....
this.charts.push(new Chart(document.getElementById("chart0"), {..}
...

Html:

<ion-row><canvas id="chart0" style="width:512px;height:320px"></canvas>
    <canvas id="chart0" style="width:512px;height:320px"></canvas>
    <canvas id="chart1" style="width:512px;height:320px"></canvas>
  </ion-row>

And I have this error :

Cannot find name 'Chart'.

What could be the error? I have to use an ngModel on char0 ? I have no idea how to do it!

3
  • Have you imported Chart? Commented Mar 30, 2017 at 10:50
  • stackoverflow.com/questions/39084296/… Commented Mar 30, 2017 at 10:56
  • @noggin182 how to import Chart?? I have only this : import 'chart.js'; Commented Mar 30, 2017 at 12:35

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.