r - shiny fitting more than three value box in a row -


i developing test shinyapp 7 or 8 valuebox. working fine except, shiny adding 3 valuebox per row. right have 3 rows on top displaying these 7 valuebox. tried changing width parameter, , not working. code below.

my goal have 5 valuebox per row instead of default three. advise appreciated.

## run example in interactive r sessions  library(shiny) library(shinydashboard)  ui <- dashboardpage(   dashboardheader(title = "dynamic boxes"),   dashboardsidebar(),   dashboardbody(     fluidrow(        valueboxoutput("vbox1"),       valueboxoutput("vbox2"),       valueboxoutput("vbox3"),       valueboxoutput("vbox4"),       valueboxoutput("vbox5"),       valueboxoutput("vbox6"),       valueboxoutput("vbox7"),       valueboxoutput("vbox8")      )   ) )  server <- function(input, output) {    output$vbox1 <- rendervaluebox({ valuebox( "one","yes", width = 2, icon = icon("stethoscope"))})   output$vbox2 <- rendervaluebox({ valuebox( "two","yes", width = 2, icon = icon("stethoscope"))})   output$vbox3 <- rendervaluebox({ valuebox( "skip","yes", width = 2, icon = icon("stethoscope"))})   output$vbox4 <- rendervaluebox({ valuebox( "a two","yes", width = 2, icon = icon("stethoscope"))})   output$vbox5 <- rendervaluebox({ valuebox( "then","yes", width = 2, icon = icon("stethoscope"))})   output$vbox6 <- rendervaluebox({ valuebox( "some","yes", width = 2, icon = icon("stethoscope"))})   output$vbox7 <- rendervaluebox({ valuebox( "a hundred too","yes", width = 2, icon = icon("stethoscope"))})  }  shinyapp(ui, server) 

shiny output 3 valuebox per row

we set width in valueboxoutput

ui <- dashboardpage(   dashboardheader(title = "dynamic boxes"),   dashboardsidebar(),   dashboardbody(     fluidrow(        valueboxoutput("vbox1", width = 2),       valueboxoutput("vbox2", width = 2),       valueboxoutput("vbox3", width = 2),       valueboxoutput("vbox4", width = 2),       valueboxoutput("vbox5", width = 2)),       fluidrow(       valueboxoutput("vbox6", width = 2),       valueboxoutput("vbox7", width = 2),       valueboxoutput("vbox8", width = 2)      )   )   ) 

-output

enter image description here


Comments

Popular posts from this blog

angular - Ionic slides - dynamically add slides before and after -

minify - Minimizing css files -

Add a dynamic header in angular 2 http provider -