When resizing the canvas background goes black

Share RGraph:   Share or Like RGraph on Facebook!

« Back to message list

Enter your email address to get email updates on this topic. You can stop receiving updates by clicking the link in the update email messages.

Posted by Massimiliano on 24th February 2014
Hi,
First of all, compliments for the great work!!!!

This is my answer:


fired on window resize:
var canvas=document.getElementById('mycvs');canvas.width=document.body.offsetWidth;canvas.height=document.body.offsetHeight;RGraph.Redraw(canvas);

On redraw canvas has a black background instead of White. When i click the canvas this become White as expected

Cheers,
Massimiliano
Posted by Richard on 24th February 2014
Hi there,

Just before you redraw you could call the clear function:

RGraph.Clear(canvas, 'white');

And see if that helps.

PS Did you know that you can use spaces and multiple lines nowadays! :-)



Richard

Add a reply




« Back to message list