11

I have a couple of charts in my Main Panel in my Shiny Dashboard, and I was wondering how to extend the whitespace at the bottom of the main panel? How should I modify my ui.R to do this?

enter image description here

dashboardBody(
    tabItems(
      tabItem("dashboard",

              mainPanel(
                showOutput("plot3", "Nvd3"),
                showOutput("plot4", "Nvd3")

         )),

Update: Adding HTML("<br><br><br>") in the Main Panel only created a wider dark panel: enter image description here

Gary
  • 2,137
  • 3
  • 23
  • 41

5 Answers5

8

Can you try to wrap you showOutput with a div wrap?

tags$div(
  style="margin-bottom:50px;",
  showOutput("plot4", "Nvd3")
)
Hao
  • 7,476
  • 1
  • 38
  • 59
5

I had the same problem. Putting everything in a fluidRow() fixed it for me...

Benjamin W.
  • 46,058
  • 19
  • 106
  • 116
user6008351
  • 51
  • 1
  • 1
5

For vertical whitespace in Shiny, you can go with headerPanel("")

trincot
  • 317,000
  • 35
  • 244
  • 286
3

Use CSS, in your ui.R file add:

tags$head(
   tags$style(
       HTML("#dashboard{margin-bottom:50px;}")
   )
)
RmIu
  • 4,357
  • 1
  • 21
  • 24
1

I had the same problem and according to tip Jthorpe I removed all mainPanelfrom my script. I have six plots one by one verticaly and it works fine.

A.Trzcionkowska
  • 133
  • 1
  • 2
  • 10