I have a bar chart (jqplot). How do I make it fill out the entire screen regardless of screen resolution? Like this one: https://www.desmos.com/calculator . It automatically resizes the chart when the window is changed.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
What worked for me was this (adapted from http://www.jqplot.com/deploy/dist/examples/area.html):
The key is to bind a handler to the
resizeevent of thewindow. With this you can get the size of the window and in turn modify the height of the plot container. We need to modify the height this way because theresizeevent only seemed to affect the width of the plot.My example here sets the plot to be 75% of the height of the window – you will need to adjust this to suit your requirements.