Home Forums Report Bugs Canvas.js Javascript bug

Canvas.js Javascript bug

Viewing 2 posts - 1 through 2 (of 2 total)
  • #9477

    I’ve ran into an issue also reported on StackOverflow where I get an “Uncaught TypeError: b[a].render is not a function” error and the chart fails to render.

    I fell back to the non-minified code (canvasjs.js) and spotted the issue pretty quickly on line 2406 of the 1.7.0 GA release:

    		var index = 0;
    		for (index in plotAreaElements) {
    			plotAreaElements[index].render();
    		}

    In some cases, it’s desirable to extend the Array prototype for various reasons, and if this has been done, your “for…in” loop will return the name of the extended property as an index value – see fiddle: http://jsfiddle.net/QwZuf/298/ – and return the error.

    See here for a discussion about why “for…in” is risky for array iteration.

    #9488

    Thanks for reporting. This issue has been fixed and won’t be there in 1.8.0 GA. And please use this pastebin 1.8.0 Beta if you want to try new features. To use v1.7.0 please use this internal build.

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.