When resizing the canvas background goes black

Share RGraph:   To help my Google visibility (it can't get much worse!), if you like and use RGraph I'd appreciate it if you could link to me

« 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
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

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, RGraph Support
If RGraph has helped you - please share the website - thanks!

Add a reply

« Back to message list