Experiencing a ReferenceError: k is not defined (gauge.js)
See original GitHub issueI am implementing this neat svg-gauge via the wrapper that @mattlewis92 made here
I am experiencing a ReferenceError, k is not defined when I try to run my Angular 8 app with an svg-gauge in it.
Per the console error, it seems that this is the line of code that I am battling: https://github.com/naikus/svg-gauge/blob/master/src/gauge.js#L96
Would you be able to modify this line (or I could create a PR…?),
FROM
for(k in s) {
TO
for(let k in s) {
I am hoping that this will solve my problems. If you have any other advice, it will be much appreciated.
Screenshot:

https://angular-ssr-example.coltenkrauter.com https://github.com/coltenkrauter/angular-ssr-example
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (1 by maintainers)
Top Results From Across the Web
jquery - gauge.js - Can't get to work - Stack Overflow
Created a jsFiddle here but i have a Uncaught TypeError: Object #<HTMLDivElement> has no method 'getContext' error in gauge.min.js line 31. – ...
Read more >ReferenceError: "x" is not defined - JavaScript - MDN Web Docs
The JavaScript exception "variable is not defined" occurs when there is a non-existent variable referenced somewhere.
Read more >Tutorial on Creating Charts using JavaScript & HTML
An interactive tutorial on creating HTML5 JavaScript Charts using CanvasJS. Build your first chart in 5 minutes!
Read more >gauge.js
100% native and cool looking animated JavaScript/CoffeeScript gauge. ... No dependencies (jQuery is supported, but not required); Highly configurable ...
Read more >How to fix "Uncaught ReferenceError: x is not defined" in ...
JS Casts 04 - How to fix "Uncaught TypeError: x is not a function " in JavaScript.Visit https://javascriptcasts.com/episodes/04 for a summary ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Thanks a lot @mattlewis92 - I can confirm, it is now working as expected. I really appreciate your helpfulness.
Hi @coltenkrauter Thanks for reporting this! This has been fixed in 1.0.6 version of the library in npm.