Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Scrollbar not showing in Shiny

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.

like image 325
ThomasJc Avatar asked Oct 28 '25 13:10

ThomasJc


1 Answers

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;" 
...
like image 69
ThomasJc Avatar answered Oct 31 '25 04:10

ThomasJc



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!