I would like to edit the contents of a modal popup in R shiny. Below is my code with which I'm able to print the values in the modal popup but I'm not able to edit it.
Server.R
modelnetlist <- function(failed = FALSE){
netlistdata <- readLines('run.scs')
splitText1 <- stringi::stri_split(str = netlistdata, regex = '\\n')
# wrap a paragraph tag around each element in the list
replacedText1 <- lapply(splitText1, p)
modalDialog(
title = "Netlist File",
replacedText1,
easyClose = FALSE,
footer = tagList(
modalButton("Close"),
actionButton("save", "Save")
)
)
}
observeEvent(input$gennet, {
showModal(modelnetlist())
})
ui.R
options(shiny.maxRequestSize=100*1024^2)
ui <- dashboardPage(skin = "yellow",
dashboardHeader(title = "Modelling Automation"),
dashboardSidebar(
sidebarMenu(
# Setting id makes input$tabs give the tabName of currently-selected tab
id = "tabs",
menuItem("Data Processing", tabName = "DP", icon = icon("database"), startExpanded = TRUE,
menuSubItem("Merge", tabName= "Merge"),
menuSubItem("Data", tabName = "Data"),
menuSubItem("Plot", tabName = "Plot", selected = TRUE),
menuSubItem("Parameters", tabName = "Parameters")),
menuItem("Parameter Extraction", icon = icon("book-open"), tabName = "PE"),
menuSubItem("Data Conversion", tabName = "DC"),
menuSubItem("IPL Upload", tabName = "IPL"),
menuSubItem("Netlist Spectre", tabName = "netlist"),
menuSubItem("Spectre logs", tabName = "mylog"),
menuSubItem("Parameter Fitting", tabName = "PF"),
menuItem("Model QA", tabName = "QA", icon = icon("angellist"))
),
textOutput("res")
),
dashboardBody(
tabItems(
tabItem("DP", "Dashboard tab content"),
#tabItem("PE", "Widgets tab content"),
tabItem("Merge", fileInput("mergefiles", "choose the files", accept = c(".txt"), multiple = TRUE), downloadButton("Download", label = "Merged File")),
tabItem("Data",
mainPanel(div(style='overflow-x:scroll',tableOutput("txt"),tableOutput("filetable"),tableOutput("filetable1")))
),
tabItem("Plot",sidebarLayout(sidebarPanel(width=3,
fileInput("datasets", "choose the files", accept = c(".txt",".esd"), multiple = TRUE),
uiOutput("plotdata"),uiOutput("devicetype"), uiOutput("chip"),
uiOutput("macro"),
uiOutput("device"),fluidRow(column(5,uiOutput("minIT2")),column(5,uiOutput("maxIT2"))),
fluidRow(column(5,uiOutput("temperature")), column(5,uiOutput("DCleakage"))),
fluidRow(column(5,uiOutput("varx")),column(5,uiOutput("vary")))
),
mainPanel(width=9,
plotlyOutput("PLOT")))),
tabItem("Parameters",tags$style(type="text/css",
".shiny-output-error { visibility: hidden; }",
".shiny-output-error:before { visibility: hidden; }"),
div(style="display:inline-block;width:32%;text-align: center;",actionButton("action", label = "Normalize")),
tabsetPanel(type="tabs",
tabPanel("CV Table",div(style='overflow-x:scroll',dataTableOutput('DiodeCVTable')),fluidRow(column(5, actionButton("perimeterCV", label="Change Perimeter")),column(5, actionButton("changeCV", label = "Change Goldenchip"))),fluidRow(column(5, uiOutput("dynamicCV")),column(5,uiOutput("goldenchipCV"))),plotlyOutput("cvplot")),
tabPanel("DC Table",div(style='overflow-x:scroll',dataTableOutput('DiodeDCTable')),fluidRow(column(5, actionButton("perimeterDC", label="Change Perimeter")),column(5, actionButton("changeDC", label = "Change Goldenchip"))),fluidRow(column(5, uiOutput("dynamicDC")),column(5,uiOutput("goldenchipDC"))),plotlyOutput("dcplot")),
tabPanel("TLP Table",div(style='overflow-x:scroll',dataTableOutput('TLPTable')), fluidRow(column(5, actionButton("perimeterTLP", label="Change Perimeter")),column(5, actionButton("changeTLP", label = "Change Goldenchip"))),fluidRow(column(5, uiOutput("dynamicTLP")),column(5,uiOutput("goldenchipTLP"))),plotlyOutput("tlpplot")),
tabPanel("VFTLP Table",div(style='overflow-x:scroll',dataTableOutput('VFTLPTable')), fluidRow(column(5, actionButton("perimeterVFTLP", label="Change Perimeter")),column(5, actionButton("changeVFTLP", label = "Change Goldenchip"))),fluidRow(column(5, uiOutput("dynamicVFTLP")),column(5,uiOutput("goldenchipVFTLP"))), plotlyOutput("vftlpplot")))),
tabItem("PE","Parameter Extraction Content"),
tabItem("DC",uiOutput("onedevice"),uiOutput('tabs'),
conditionalPanel(condition="input.layer=='CV'", plotlyOutput("plotcv1"),br(), tableOutput("device1cv")),
#conditionalPanel(condition="input.layer=='CV 2'", plotlyOutput("plotcv2"),br(), tableOutput("device2cv")),
# conditionalPanel(condition="input.layer=='CV 3'", plotlyOutput("plotcv3"),br(), tableOutput("device2cv")),
conditionalPanel(condition="input.layer=='DC # 25'", plotlyOutput("plotdc125"),br(), tableOutput("device1dc25")),
conditionalPanel(condition="input.layer=='DC # -40'", plotlyOutput("plotdc140"),br(), tableOutput("device1dc40")),
conditionalPanel(condition="input.layer=='DC # 125'", plotlyOutput("plotdc1125"),br(), tableOutput("device1dc125")),
conditionalPanel(condition="input.layer=='DC # 150'", plotlyOutput("plotdc1150"),br(), tableOutput("device1dc150")),
conditionalPanel(condition="input.layer=='TLP'",fluidRow(column(3,uiOutput("stepcountTLP")), column(3, uiOutput("maxvoltageTLP")), column(3, uiOutput("VholdTLP")), downloadButton("DownloadTLP",label = "Download converted data")), plotlyOutput("plottlp1"),br(), tableOutput("device1tlp")),
#conditionalPanel(condition="input.layer=='TLP 2'", plotlyOutput("plottlp2"),br(), tableOutput("device2tlp")),
conditionalPanel(condition="input.layer=='VFTLP'",fluidRow(column(3,uiOutput("stepcountVFTLP")), column(3, uiOutput("maxvoltageVFTLP")), column(3, uiOutput("VholdVFTLP"))), plotlyOutput("plotvftlp1"),br(), tableOutput("device1vftlp"))
),
tabItem("PF", uiOutput('modelingtabs'),
conditionalPanel(condition="input.modtab=='CV'",tableOutput("modelingdevice1CV")),
conditionalPanel(condition= "input.modtab=='DC # 25'", tableOutput("modelingdevice1DC25")),
conditionalPanel(condition= "input.modtab=='DC # 40'", tableOutput("modelingdevice1DC40")),
conditionalPanel(condition= "input.modtab=='DC # 125'", tableOutput("modelingdevice1DC125")),
conditionalPanel(condition= "input.modtab=='DC # 150'", tableOutput("modelingdevice1DC150")),# plotlyOutput("plotcv1"),br(), tableOutput("device1cv")),
conditionalPanel(condition="input.modtab=='TLP'",tableOutput("modelingdevice1TLP")),# plotlyOutput("plottlp1"),br(), tableOutput("device1tlp")),
conditionalPanel(condition="input.modtab=='VFTLP'",tableOutput("modelingdevice1VFTLP"))#, plotlyOutput("plotvftlp1"),br(), tableOutput("device1vftlp"))
),
tabItem("IPL",
fluidRow(box(title = "Model Inputs", width = 8,
fileInput("iplfile", "choose the IPL file", accept = c(".xlsx"), multiple = TRUE),
column(3, uiOutput("modeltype")),
column(3,uiOutput("modeldevtype")),
column(3,uiOutput("modelpath")),
column(3, uiOutput("wrapperfile")),
column(3,uiOutput("zapcon")),
column(3,uiOutput("polarity")),
column(3,uiOutput("sectiontype")),
column(3,uiOutput("designfile")),
column(3, uiOutput("esd_event")),
column(3, uiOutput("esd_exit")),
column(3, uiOutput("modelnodeorder")),
column(3, uiOutput("terminalbias")),
column(3,uiOutput("design")),
column(3,uiOutput("modtemp")),
column(3,uiOutput("ylogaxis")))),
box(title = "Model Parameters in IPL", width = 20, tableOutput("IPLTable"),
uiOutput("newvalue1"),
uiOutput("newvalue2"),
uiOutput("newvalue3"),
uiOutput("newvalue4"))
,fluidRow(box(width = 6, height = 60,actionButton("SpecPlot", label="Spectre Plot", width = 100),
# bsModal("netl", strong("Netlist File", style="color:#0000ff; font-size:120%"),
# "gennet", size = "large", uiOutput("modelnetlist")),
actionButton("HspiPlot", label="Hspice Plot", width = 100),
actionButton("gennet", label="Generate netlist"),
actionButton("ChangeValues", label="Change Values"),
actionButton("save", label = "Save"),
actionButton("Mergesim", label="Merge Simulation Plots"))),
uiOutput("newvalues"),
#conditionalPanel(condition = "input$specplot", withSpinner(plotlyOutput("plotspe"), type = 1, hide.ui = FALSE)),
tags$head(
tags$style(
HTML(".shiny-notification {
height: 100px;
width: 500px;
position:fixed;
top: calc(50% - 50px);;
left: calc(50% - 400px);;
}
"
)
)
),
#box(title = "Simulation", status = "primary", plotlyOutput("plotspe", height = 250)),
fluidRow(column(width=6,
fluidRow(plotlyOutput("plotspe",width = "100%", height = "400px", inline = FALSE))),
column(width=6,
fluidRow(plotlyOutput("plothspi",width = "100%", height = "400px", inline = FALSE)))),
fluidRow(column(width=6,fluidRow(plotlyOutput("plotspechspi",width = "100%", height = "400px", inline = FALSE)))),
# splitLayout(style = "height:400px;", cellWidths = c("800", "800"),
# plotlyOutput("plotspe"), plotlyOutput("plothspi"))
# ,
plotlyOutput("plottlpalongspectre")
),
tabItem("netlist", fluidPage(uiOutput("netlistfile"))),
tabItem("mylog", fluidPage(uiOutput("logfile"))),
tabItem("QA", " QA tab content")# actionButton("ChangeValues", label="Change Values"
)
)
)
**run.scs file:** (File that I'm calling in modelnetlist function to read and display it in the modal)
Simmulator lang=spectre
global 0
paropt options redefinedparams= ignore
parameters vnw=0 vnd=0
parameters area_1=5.5e-12
I would like to edit in the modal popup, but I'm only to print with my code. I tried textInput, textOutput inside modalDialog but it doesn't help. Any suggestions?
In modalDialog function you can use almost any UI elements (see ... parameter)
modelnetlist <- function(failed = FALSE){
netlistdata <- paste(readLines('run.scs'),collapse="\n")
modalDialog(
title = "Netlist File",
textAreaInput("theScript", value=netlistdata),
easyClose = FALSE,
footer = tagList(
modalButton("Close"),
actionButton("save", "Save")
)
)
}
and to get new script in the save button listener use input$theScript
observeEvent(input$save, {
# do whatever you want with input$theScript
if(isTruthy(input$theScript))
writeLines(input$theScript, "run.scs")
})
Note: the path where you save file must be writeable.
I find shinydashboardPlus::descriptionBlock() quite nice but I am a bit frustrated not being able to change its styling within R. How can we achieve that?
header is necessarly bold,
text is necessarly in UPPERCASE,
Using HTML() in number put the icon to the next line.
Show case:
library(shiny)
library(shinydashboard)
shinyApp(
ui = dashboardPage(
dashboardHeader(),
dashboardSidebar(),
dashboardBody(
box(
solidHeader = FALSE,
title = "Status summary",
background = NULL,
width = 4,
status = "danger",
footer = fluidRow(
column(
width = 6,
descriptionBlock(
number = "17%",
numberColor = "green",
numberIcon = "caret-up",
header = "not bold please",
text = "set me in lowercase please",
rightBorder = TRUE,
marginBottom = FALSE
)
),
column(
width = 6,
descriptionBlock(
number = HTML("<h4>icon?</h4>"),
numberColor = "red",
numberIcon = "skull-crossbones",
header = "using html put",
text = "icon to next line",
rightBorder = FALSE,
marginBottom = FALSE
)
)
)
)
),
title = "Description Blocks"
),
server = function(input, output) { }
)
To solve this problems you need to insert css statements that equally specific as the css code supplied by the package.
To sole the bold header insert .description-block>.description-header { font-weight: 500; }
to remove the always Uppercase insert .description-block>.description-text { text-transform: none; }
With the Icon problem. The problem is that you are using a <h4> tag. And this is by default a block element which moves the next object to a new line. Here you can either use a different tag such as <span> or set the display attribute to inline-block. In the example below I used the later solution
All together it would look like this
library(shiny)
library(shinydashboard)
shinyApp(
ui = dashboardPage(
dashboardHeader(),
dashboardSidebar(),
dashboardBody(
tags$head(
tags$style(
HTML("
.description-block>.description-text {
text-transform: none;
}
.description-block>.description-header {
font-weight: 500;
}
.description-percentage>h4 {
display: inline-block;
}
")
)
),
box(
solidHeader = FALSE,
title = "Status summary",
background = NULL,
width = 4,
status = "danger",
footer = fluidRow(
column(
width = 6,
descriptionBlock(
number = "17%",
numberColor = "green",
numberIcon = "caret-up",
header = "not bold please",
text = "set me in lowercase please",
rightBorder = TRUE,
marginBottom = FALSE
)
),
column(
width = 6,
descriptionBlock(
number = HTML("<h4>icon?</h4>"),
numberColor = "red",
numberIcon = "skull-crossbones",
header = "using html put",
text = "icon to next line",
rightBorder = FALSE,
marginBottom = FALSE
)
)
)
)
),
title = "Description Blocks"
),
server = function(input, output) { }
)
I am current developing a shiny application and I need to hide login page and show shiny dashboard upon successful login. If not, the login page should be displayed.
I came upon few sites and I decided to use shinyjs package for showing and hiding of the fluid page / dashboard page.
The global function used is as follows:
`%AND%` <- function (x, y) {
if (!is.null(x) && !anyNA(x))
if (!is.null(y) && !anyNA(y))
return(y)
return(NULL)
}
passwordInputAddon <- function (inputId, label, value = "", placeholder = NULL, addon, width = NULL)
{
value <- shiny::restoreInput(id = inputId, default = value)
htmltools::tags$div(
class = "form-group shiny-input-container",
label %AND% htmltools::tags$label(label, `for` = inputId),
style = if (!is.null(width)) paste0("width: ", htmltools::validateCssUnit(width), ";"),
htmltools::tags$div(
style = "margin-bottom: 5px;", class="input-group",
addon %AND% htmltools::tags$span(class="input-group-addon", addon),
htmltools::tags$input(
id = inputId, type = "password", class = "form-control",
value = value, placeholder = placeholder
)
)
)
}
The UI code used is as follows:
ui <- shinyUI(fluidPage(
tags$div(id = "login_page_ui",
shinyjs::useShinyjs(),
tags$style(".container-fluid {margin-top: 13%}"),
setBackgroundColor(color = "#2d3c44"),
fluidRow(
column(8, align = "center", offset = 2,
textInputAddon("name", label = "", placeholder = "Username", addon = icon("user"),width = "25%"),
tags$style(type="text/css", "#string { height: 50px; width: 50%; text-align:center;
font-size: 30px; display: block;}")
)
),
fluidRow(
column(8, align = "center", offset = 2,
passwordInputAddon("password", label = "", placeholder = "Password", addon = icon("key"),width = "25%"),
tags$style(type="text/css", "#string { height: 50px; width: 50%; text-align:center;
font-size: 30px; display: block;}")
)
),
fluidRow(
column(12, div(style = "height:20px;background-color: #2d3c44;")
)
),
fluidRow(
column(6, align = "center", offset = 3,
actionButton("login",label = "Login", width = "35%", style = "color: #fff; background-color: #1bc3d7; border-color: #1bc3d7;")))
)
),
shinyjs::hidden(
tags$div(
id = "dashboard_page_ui",
dashboardPage(
dashboardHeader(
title="Shiny Dashboard",
tags$li(
class="dropdown"
)
),
dashboardSidebar(
sidebarMenu(
id = 'dashboard_menu',
sidebarMenuOutput("menu")
)
),
dashboardBody(
tabItems(
tabItem(tabName="Item1"),
tabItem(tabName="Item2"),
tabItem(tabName="Item3")
)
)
)
)
)
)
The server code used is as follows:
server <- function(input, output,session){
observeEvent(input$login,{
if((input$name == "test") & (input$password == "test123")){
shinyjs::show("dashboard_page_ui")
shinyjs::hide("login_page_ui")
}
})
}
When I execute this code I am getting this error message
Error in shinyUI(fluidPage(tags$div(id = "login_page_ui", shinyjs::useShinyjs(), :
unused argument (shinyjs::hidden .....
I don't know what's the exact issue is. Can anyone help me to sort this issue?
shinyUI takes a single argument ui (The user interace definition). However, you provided two arguments: see the comma before shinyjs::hidden(...) in your code.
Please check the following:
library(shiny)
library(shinydashboard)
`%AND%` <- function (x, y) {
if (!is.null(x) && !anyNA(x))
if (!is.null(y) && !anyNA(y))
return(y)
return(NULL)
}
passwordInputAddon <-
function (inputId,
label,
value = "",
placeholder = NULL,
addon,
width = NULL)
{
value <- shiny::restoreInput(id = inputId, default = value)
htmltools::tags$div(
class = "form-group shiny-input-container",
label %AND% htmltools::tags$label(label, `for` = inputId),
style = if (!is.null(width))
paste0("width: ", htmltools::validateCssUnit(width), ";"),
htmltools::tags$div(
style = "margin-bottom: 5px;",
class = "input-group",
addon %AND% htmltools::tags$span(class = "input-group-addon", addon),
htmltools::tags$input(
id = inputId,
type = "password",
class = "form-control",
value = value,
placeholder = placeholder
)
)
)
}
ui <- fluidPage(
tags$div(
id = "login_page_ui",
shinyjs::useShinyjs(),
tags$style(".container-fluid {margin-top: 13%}"),
setBackgroundColor(color = "#2d3c44"),
fluidRow(
column(
8,
align = "center",
offset = 2,
textInputAddon(
"name",
label = "",
placeholder = "Username",
addon = icon("user"),
width = "25%"
),
tags$style(
type = "text/css",
"#string { height: 50px; width: 50%; text-align:center;
font-size: 30px; display: block;}"
)
)
),
fluidRow(
column(
8,
align = "center",
offset = 2,
passwordInputAddon(
"password",
label = "",
placeholder = "Password",
addon = icon("key"),
width = "25%"
),
tags$style(
type = "text/css",
"#string { height: 50px; width: 50%; text-align:center;
font-size: 30px; display: block;}"
)
)
),
fluidRow(column(
12, div(style = "height:20px;background-color: #2d3c44;")
)),
fluidRow(column(
6,
align = "center",
offset = 3,
actionButton(
"login",
label = "Login",
width = "35%",
style = "color: #fff; background-color: #1bc3d7; border-color: #1bc3d7;"
)
))
),
shinyjs::hidden(tags$div(
id = "dashboard_page_ui",
dashboardPage(
dashboardHeader(title = "Shiny Dashboard",
tags$li(class = "dropdown")),
dashboardSidebar(sidebarMenu(id = 'dashboard_menu',
sidebarMenuOutput("menu"))),
dashboardBody(tabItems(
tabItem(tabName = "Item1"),
tabItem(tabName = "Item2"),
tabItem(tabName = "Item3")
))
)
))
)
server <- function(input, output, session) {
observeEvent(input$login, {
if ((input$name == "test") & (input$password == "test123")) {
shinyjs::show("dashboard_page_ui")
shinyjs::hide("login_page_ui")
}
})
}
shinyApp(ui, server)
I've created a circle with CSS that should contain a number in the middle, with the help of this SO answer
# Packages
library(shinydashboard)
library(tidyverse)
library(readxl)
library(scales)
theme_set(theme_light())
header <- dashboardHeader(
title = "Test App",
titleWidth = 215
)
sidebar <- dashboardSidebar(
sidebarMenu(
menuItem("Test Tab", tabName = "test_tab",
icon = icon("paper-plane"), startExpanded = TRUE)
)
)
body <- dashboardBody(
includeCSS("www/style.css"),
tabItems(
tabItem(tabName = "test_tab",
fluidRow(
column(width = 4,
h2("Column X"),
valueBoxOutput("first_value", width = NULL),
box(flexdashboard::gaugeOutput("second_value", width = "90%", height = "100px"),
title = "Second Value", status = "primary", solidHeader = TRUE,
collapsible = FALSE, width = NULL
)
),
column(width = 8,
h2("Column Y"),
box(tags$div(id="insidediv", textOutput("test_div")),
title = "#3", status = "primary", solidHeader = TRUE,
collapsible = FALSE, width = 4
),
box(
title = "#4", status = "primary", solidHeader = TRUE,
collapsible = FALSE, width = 4
)
)
),
fluidRow(
h2("Row A"),
column(width = 12,
box(title = "Third Value", status = "primary", solidHeader = TRUE,
width = 2.4),
box("Fourth Value", status = "primary", solidHeader = TRUE,
width = 2.4),
box("Fifth Value", status = "primary", solidHeader = TRUE,
width = 2.4),
box("Sixth Value", status = "primary", solidHeader = TRUE,
width = 2.4),
box("Seventh Value", status = "primary", solidHeader = TRUE,
width = 2.4)
)
)
)
)
)
# Put them together into a dashboardPage
ui <- dashboardPage(skin = "blue", header = header,
sidebar = sidebar,
body = body)
server <- function(input, output) {
output$first_value <- renderValueBox({
valueBox(
comma_format()(100000),
subtitle = "First Value",
icon = icon("list"), color = "purple"
)
})
output$second_value = flexdashboard::renderGauge({
flexdashboard::gauge(0.12 * 100,
symbol = '%',
min = 0,
max = 100)
})
output$test_div <- renderText({
"141"
})
}
shinyApp(ui, server)
Unfortunately, the number doesn't appear inside the circle, but outside it... Does anyone know what the problem may be???
The linked SO answer seems to have it right, but under different circumstances... maybe since I'm putting it inside a box(), its different?
If you are not familiar with it:
The CSS # Selector is for giving ONE specific HTML Element a specific look. Shiny gives textOutput an ID which is test_div in your example. You also have to use that ID in your CSS to style the element.
#test_div {
padding-top: 30px;
padding-bottom: 30px;
text-align: center;
font-weight: bold;
font-size: 24px;
}
I had to play around with the padding, which defines the space around the elements content. Instead of pixels you can also use % (padding: 5%)
https://www.w3schools.com/css/css_padding.asp
Learning the basics of CSS is quite easy and will improve your abitilies to make look shiny a lot :-).
I have several boxes that will be filled with plots and tables after user input.
Since I have changed the layout to be column-based, the background color seem to be cut under the first box like this:
I am not sure why is this happening.
Here is a sample code to reproduce the layout:
library(shiny)
library(shinydashboard)
sidebar <- dashboardSidebar(
sidebarMenu(
busyIndicator(text="Loading..."),
tags$head(
tags$style(
HTML('
#uploadfile{height: 25px}
#rat{height: 25px; font-size: 10px}
#pnum{height: 25px; font-size: 10px}
#mytext{width: 50px}
.content-wrapper,
.right-side {
background-color: #EBE5D0;
}
li { cursor: pointer; cursor: hand; }
')
)
),
menuItem("Network", icon = icon("table"), tabName = "network", badgeColor = "green")
)
)
body <- dashboardBody(
tabItems(
tabItem(tabName = "network",
column( width = 2,
box(
title="INPUT FILES",solidHeader = TRUE, status="primary",
fileInput('file1',"file 1", multiple=F,accep=".Rdata"),
fileInput('file2',"file 2", multiple=F,accep=".Rdata"),
fileInput('file3',"file 3", multiple=F,accep=".Rdata"),
fileInput('file4',"file 4", multiple=F,accep=".Rdata"),
uiOutput("phenoselect"),
uiOutput("phenolog"),
tags$div(align = 'left',
class = 'multicol', uiOutput("covarselect")),
uiOutput("snpPlotButton"),
height = 800,
width = NULL
)
),
column(width = 8,
box(
title="PLOT",solidHeader = TRUE, status="primary",
plotOutput('plotSNPmaf',height="500px"),
height = 800,
width = NULL
),
box(
title="TABLE",solidHeader = TRUE, status="primary",
dataTableOutput("seqMetaGene"),
uiOutput("BoxPlotButton"),
width = NULL
),
box(
title="BOXPLOT",solidHeader = TRUE, status="primary",
plotOutput("boxplotSnps"),
width = NULL
)
)
)
))
ui<- dashboardPage(
dashboardHeader(title = "Results"),
sidebar,
body
)
server <- function(input, output,session) {}
shinyApp(ui = ui, server = server)
You need to wrap your columns in a fluidRow, this way it will work.
Like this:
fluidRow(column( ... ),
column( ... ))
Screenshot of the working example:
Using this code you can set the background color. You just have to find the color that matches.
dashboardBody(
tags$head(tags$style(HTML('
.skin-blue .left-side, .skin-blue .wrapper {
background-color: #ecf0f5;
}
')))