r - shiny fluidrow column white space -


i have top banner want split 2 separate sections representing 2 different inputs. this, i've created fluidrow , 2 columns, 1 each input. however, there little bit of white space between columns, despite putting offset = 0. there way remove white space columns next 1 another?

colors = c("green","blue","red") library(shiny)  ui <- fluidpage(    tabsetpanel(     tabpanel("info",              fluidrow(                     column(width = 6, offset = 0,                       div(style = "height:50px;width:100%;background-color: #999999;border-style: solid;border-color: #000000",                           tags$h3("section 1")                       )                    ),                    column(width = 6, offset = 0,                        div(style = "height:50px;width:100%;background-color: #999999;border-style: solid;border-color: #000000",                                  tags$h3("section 2")                        )                    )               ),              fluidrow(                    column(width = 6, offset = 0,                    div(style = "height:50px;width:100%;background-color: #999999;border-style: solid;border-color: #000000",                               selectinput(inputid = "color",label = "color:",                                    choices = colors,                                    selected = colors[2],                                    multiple = false)                       )                     ),                    column(width = 6, offset = 0,                           div(style = "height:50px;width:100%;background-color: #999999;border-style: solid;border-color: #000000",                                      selectinput(inputid = "points",label = "number of points:",                                           choices = c("30","60","90"),                                           selected = "10",                                           multiple = false)                      )                    )              ),                 br(),              br(),              fluidrow(                    actionbutton(inputid = "go",                                 label = "update"                    )              ),              fluidrow(                    plotoutput("plot", width = "100%")              )      )   ) )   server <- function(input, output,session) {    data = eventreactive(input$go, {     var1 = rnorm(isolate(as.numeric(input$points)),5)     cat1 = c(rep("red",length(var1)/3),rep("blue",length(var1)/3),rep("green",length(var1)/3))     data = cbind.data.frame(var1,cat1)     plotdata = data[which(data$cat1 ==isolate(input$color)),]    }   )    output$plot = renderplot({     plotdata = data()     plotcol = isolate(input$color)     plot(plotdata$var1, col = plotcol)    }) }  shinyapp(ui = ui,server = server) 

the white space padding of column div. remove that, use

column(width = 6, offset = 0, style='padding:0px;', ...) 

Comments

Popular posts from this blog

Django REST Framework perform_create: You cannot call `.save()` after accessing `serializer.data` -

Why does Go error when trying to marshal this JSON? -