Open preraksola opened 7 years ago
A shot in the dark, but are you sure this.target does point to your canvas element? When I've used gauge.js together with angular, I did that with the help of a directive. See my comment in issue #104 for further directions.
Yes, I am sure that it points to the canvas element. Here's the fiddle of my application structure with the issue: jsFiddle. It's a bit complicated so you might have to read it couple of times.
Meanwhile I'll have a look at the repository that you mentioned in the #104 .
@preraksola I was experiencing a similar issue. Make sure you draw the Gauge after the page has been rendered by listening for the "$viewContentLoaded" event.
I am using this library in my angular service, to render the gauge chart. I have this function in my service:
I call this function from my controller and I also have a
canvas
element in my html with the idgaugeChart
. Upon execution I get the following error in the console:Is there something that I am missing or that I need to add?
Prerak