You must be logged in to post your query.
Home › Forums › Report Bugs › Zoom Scaling breaks canvas drawing
How to reproduce?
-change browser’s zoom/scaling to something below 100% and reload the page.
This breaks the graph rendering at least for IE and FF (chrome seems to be unaffected in my tests).
FF console shows the following error:
IndexSizeError: Index or size is negative or greater than the allowed amount canvasjs.min.js:83
This targets the following function:
_this.ctx.drawImage(initialState, 0, 0, _this.width * devicePixelBackingStoreRatio, _this.height * devicePixelBackingStoreRatio, 0, 0, _this.width, _this.height);
I’ve fixed it locally by flooring the computed values for ctx.draw before passing them over.
Would be good to have that fixed upstream, as it seems to affect other users aswell (got a report from someone that my graphs are broken and was only able to reproduce the problem on a single browser, which had page scaling != 100%).
Thanks for reporting the issue. We’ll fix this issue in the next version.
You must be logged in to reply to this topic. Login/Register