I am following this tutorial [chart.js][1]
and I get this error and this line
var ctx = $("#myChart").get(0).getContext("2d");
where $("#myChart")
stands for <figure id="myChart" class="chart"></figure>
throws this error
Uncaught TypeError: Object #<HTMLElement> has no method 'getContext'
The "getContext is not a function" error occurs when the getContext() method is called on a value that is not a canvas DOM element. To solve the error, make sure to only call the getContext method on canvas elements.
It is a command-line interface tool which is very useful for initialising and developing Angular applications.
You can set the pointRadius to zero.
js. Three. js is a cross-browser JavaScript library and application programming interface used to create and display animated 3D computer graphics in a web browser using WebGL.
Ok, you have to use this instead
<canvas id="myChart" class="chart"></canvas>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With