Reputation: 141
I made a Shiny app with a responsive layout. When the screen size is small the plots get rearranged automatically from horizontal to vertical fashion as expected. However, when the app is being displayed vertically, the scrollbar is not showing at all. The plot simply gets cut off at the viewpoint. Users are unable to get to the plot beneath.
My Shiny app can be viewed here, https://tmasjc.shinyapps.io/airbnb_market_data/
Source code can be found here, https://github.com/tmasjc/Airbnb_Market_Data
The UI is pretty straightforward
fluidPage(
# Upper half
leafletOutput("map", "100%", 400),
hr(),
uiOutput("h4"),
fluidRow(
# Lower half
column(width = 2,
selectInput("city", label = "Select A City", choices = c("", toupper(city_list))),
selectInput("area", label = "Filter By Area", character(0)),
verbatimTextOutput("roomInBounds")),
column(width = 10,
column(6, plotlyOutput("price")),
column(6, plotlyOutput("host"))
)
)
)
I have tried with Chrome Sproofer to test with various browsers. All results come back negative. Also, I am able to scroll on other Shiny apps just fine (such as this one).
Has anyone faced a similar situation? Any help is sincerely appreciated.
Upvotes: 4
Views: 2174
Reputation: 141
This is so embarrassing. I seek my friend who works in UI. The solution is simply adding a sidebar manually.
fluidRow(
style = "max-height: 50vh; overflow-y: auto;"
...
Upvotes: 5