Aligning plots to the center of the box() in R shiny dashboard -


the script below creates 2 plots within 2 boxes in r shiny dashboard page aligned right of box, wish align these plots center of box.these packages minimum required packages create given plots. please help.

## app.r ## library(shiny) library(shinydashboard) library(bupar) library(edear) library(eventdatar) library(processmapr) library(processmonitr) library(xesreadr) library(petrinetr)  ui <- dashboardpage( dashboardheader( ), dashboardsidebar( width = 0 ), dashboardbody( box(title = "process map", status = "primary",height = "575", solidheader =  t,patients %>% process_map(),align = "left"), box(title = "resource map", status = "primary",height = "575", solidheader =  t, resource_map(patients, render = t)) ) )  server <- function(input, output) { }  shinyapp(ui, server) 

enter image description here

the problem seems htmlwidgets initialized 960 pixels width or so. 2 ways override be:

pmap <- patients %>% process_map() pmap$width <- "100%" rmap <- resource_map(patients, render = t) rmap$width <- "100%" ui <- dashboardpage(   dashboardheader(),   dashboardsidebar(     width = 0   ),   dashboardbody(     box(       title = "process map",        status = "primary",height = "575",        solidheader = t,       pmap,       align = "left"),     box(       title = "resource map",        status = "primary",       height = "575",        solidheader = t,        rmap     )   ) ) 

or

ui <- dashboardpage(   dashboardheader(),   dashboardsidebar(     width = 0   ),   dashboardbody(     tags$head(tags$style(html(".grviz { width:100%!important;}"))),       box(       title = "process map",        status = "primary",height = "575",        solidheader = t,       patients %>% process_map(),       align = "left"),     box(       title = "resource map",        status = "primary",       height = "575",        solidheader = t,        resource_map(patients, render = t)     )   ) ) 

Comments

Popular posts from this blog

resizing Telegram inline keyboard -

command line - How can a Python program background itself? -

php - "cURL error 28: Resolving timed out" on Wordpress on Azure App Service on Linux -