msalit / harmonization_dashboard

Coronavirus Standards Working Group Harmonization Study Shiny App Dashboard
0 stars 0 forks source link

Explore scaling objects in Shiny app to fit themselves to window size #8

Open msalit opened 3 months ago

msalit commented 3 months ago

Current plot and table objects, and Shiny layout panels are fixed sizes. Can these be made to scale (better?) to the window size?

msalit commented 3 months ago

See https://mastering-shiny.org/action-graphics.html for some help: "You’ll also learn a couple of other useful techniques, including making plots with dynamic width and height..."

msalit commented 3 months ago

I can't find a way to size the plot objects dynamically, though I am sure it's possible by providing functions to return values for width and height of the objects...

msalit commented 3 months ago

Whoa -- here's an example of it working:

https://shiny.posit.co/r/gallery/start-simple/kmeans-example/

Very simple-seeming. What am I doing wrong?

msalit commented 3 months ago

Whoa -- here's an example of it working:

https://shiny.posit.co/r/gallery/start-simple/kmeans-example/

Very simple-seeming. What am I doing wrong?

Interesting --

It's trying...

msalit commented 3 months ago

Whoa -- here's an example of it working:

https://shiny.posit.co/r/gallery/start-simple/kmeans-example/ Very simple-seeming. What am I doing wrong?

Interesting --

  • specify no height or width and it scales to width at a kinda fixed height.
  • specify only height and it scales as you stretch the window.

It's trying...

See this gallery app for example.