Reputation: 781
I developed a shiny app that renders several plots using ggplot. However, the rendered plots are not taking the max width of the main panel and I can't figure it out how to adjust the size of ggplot to maximise its visualization.
The app can be visualized here: https://icra.shinyapps.io/nbs-list/
The code can be found here: https://github.com/icra/nbs_list/
(I didn't copy paste because it's 452 lines length).
Thank you.
Upvotes: 0
Views: 383
Reputation: 21349
Try this in your ui
#if top NBS is selected
conditionalPanel(condition = "input.top_custom.includes('top_NBS')",
plotOutput("plot_top", height="700px")
),
#if custom NBS is selected
conditionalPanel(condition = "input.top_custom.includes('custom_NBS')",
plotOutput("plot_facet", height="700px")
)
It works for me. With 700px, it gives the following output
Regardless of the size, some of the blank space above the plot needs to be deleted. With 400px it gives the following ouput:
Upvotes: 1