How do I have the canvas automatically resize itself?

« 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 jlost55 on 15th May 2014
Hi there,

is it possible to resize your chart automatically after changing the width and the height of the canvas?
Posted by Richard on 15th May 2014

I don't follow - changing the width/height of the canvas will change the width/height of the chart - though changing the width or height attributes of the canvas tag will clear the canvas so you'll need to use the redraw function:


Changing the CSS width/height won't work.

Posted by jlost55 on 15th May 2014
I will that my chart work on a small canvas or a great canvas.

I found also this information on the RGraph site:
Posted by Richard on 15th May 2014
What's the question?

Charts will automatically size themselves to fit the canvas size.
Posted by jlost55 on 16th May 2014
I understand it.

I've found the solution for my problem.

Thanks for the very good tips.
Posted by Vasanth on 24th January 2017
Thank you. This information was helpful.

Add a reply

« Back to message list