If you run this code in your R studio, you will find that the graph for NULL data is still a huge block of white.
How can we not display it when the data is NULL.
A large board does not look so good among other graphs.
library(shiny)
server <- function(input, output) {
output$x = renderPlot(NULL)
}
ui <- fluidPage(
br(),
plotOutput("x"),
tags$head(tags$style(HTML("
body {
margin: 0;
font-family: helvetica, sans-serif;
background: #F2F0F0;
}
.shiny-plot-output{
max-width: 100%;
box-shadow: 0px 0px 6px #888;
margin-left: auto;
margin-right: auto;
}
")))
)
shinyApp(ui = ui, server = server)
source
share