Dynamic plot width/height

924 views
Skip to first unread message

Ryan Hope

unread,
Nov 12, 2012, 1:24:52 PM11/12/12
to shiny-...@googlegroups.com
Is there a way to make a plots width/height flexible such that it scales with the window width or height?

Joe Cheng

unread,
Nov 12, 2012, 3:53:05 PM11/12/12
to shiny-...@googlegroups.com
The default setting is to scale with window width (actually to be precise, with the size of the plot container's width). Scaling height-wise in generally tricky in HTML, Shiny can autoscale height with container height but won't assist you with making the container vertically scale. You could use CSS to absolutely position the div container and then make sure you pass height=100% to the plotOutput call.

If you can't figure it out let me know and I'll cobble up a simple example.

Vincent

unread,
Jan 22, 2013, 10:24:55 PM1/22/13
to shiny-...@googlegroups.com
I have plotOutput set to "100%" and tried dev.new to set the size of the plot. That didn't work so I assume this should be done with CSS. A simple example would be great.

Joe Cheng

unread,
Jan 25, 2013, 4:44:13 AM1/25/13
to shiny-...@googlegroups.com


--
 
 

Reply all
Reply to author
Forward
0 new messages