bernii / gauge.js

100% native and cool looking JavaScript gauge
MIT License
1.42k stars 391 forks source link

TypeError: this.canvas is null #69

Closed jackmullen2 closed 7 years ago

jackmullen2 commented 9 years ago

I set it up using the example give at https://bernii.github.io/gauge.js/

Is coffee required also ? I set it up with out coffee and with coffee .. of course the gauge.js ..

I get the error "this canvas is null" ..

Your example works ( in firefox 36 ..) but your example contains far more code than mine ..

Here is my setup .. just for testing on a server I have in the room ..

If you have a chance please have a quick look to see

Errors reported by firebug : SyntaxError: illegal character

Request Animation Frame Polyfill

gauge.coffee (line 1) TypeError: this.canvas is null ...s.canvas.getContext('2d');this.gp=[new GaugePointer(this)];this.setOptions();thi... gauge.min.js (line 38)

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

Gauge /**/
yenda commented 9 years ago

You have to make a div and target its id in the line commented // your canvas element

kplindegaard commented 7 years ago

Solution given. Closing the issue.