Home Forums Report Bugs Weird Chart Behaviour in IOS Browser on mobile? Reply To: Weird Chart Behaviour in IOS Browser on mobile?

#28244

I found it

this line
this._preRenderCanvas = createCanvas(this.width, this.height); @ roughly line 5044 in CanvasJS.js

overwrites the canvas instance that already exists for variable this._preRenderCanvas effectivly orphaning the old canvas (which IOS will not GC because its not size 0)

I fixed it by patching it to


if(this._preRenderCanvas){
    setCanvasSize(this._preRenderCanvas,0,0)
}
this._preRenderCanvas = createCanvas(this.width, this.height,"_preRenderCanvas");