R shiny dashboard output panel issue
I have created the following dashboard in shiny
I first import the folloiwng libraries in R
library(shinydashboard)
library(shiny)
library(DT)
library(shinyWidgets)
library(readxl)
We first create the UI here to provide an date, fileimport, a nmeric input and an action button
ui=shinyUI(
dashboardPage(
dashboardHeader(
title = "Chart",
titleWidth = 850
),
dashboardSidebar(
# Change font size here
tags$head(
tags$style(HTML(".main-sidebar { font-size: 20px; }"), style =
"background-color: #78d9c9;") #change the font size to 20
),
fileInput(inputId = "file", label = 'Load Dataset Here',placeholder =
"Upload",
multiple = TRUE,
accept = c("xlsx/xls",".xls",".xlsx"), width = "100%"),
dateInput(inputId = 'Cutoffdate',label = 'Cut Off date'),
numericInput(inputId = 'AAA',label = 'AAA', value = 0, min = 0, max =
120, step = 6),# Add new font color here
actionButton(inputId = 'Button',label ='Generate Chart', style="color:
#fff; background-color: #599AC3; border-color: #2e6da4, :font-color:
black")
),
dashboardBody(
tags$head(tags$style(HTML('
/* logo */
.skin-blue .main-header .logo {
background-color: #7CFC00;
}
/* logo when hovered */
.skin-blue .main-header .logo:hover {
background-color: #7CFC00;
}
/* navbar (rest of the header) */
.skin-blue .main-header .navbar {
background-color: #7CFC00;
}
# Sidebar color here
/* main sidebar */
.skin-blue .main-sidebar {
background-color: #F4A460;
}
/* active selected tab in the sidebarmenu */
.skin-blue .main-sidebar .sidebar .sidebar-menu
.active a{
background-color: #FFF8DC;
}
/* other links in the sidebarmenu */
.skin-blue .main-sidebar .sidebar .sidebar-menu
a{
background-color: #FFF8DC;
color:#A9A9A9;
}
/* other links in the sidebarmenu when hovered
*/
.skin-blue .main-sidebar .sidebar .sidebar-menu
a:hover{
background-color: #FFF8DC;
}
/* toggle button when hovered */
.skin-blue .main-header .navbar .sidebar-
toggle:hover{
background-color: #FFF8DC;
}
/* body */
.content-wrapper, .right-side {
background-color: #FFF8DC;
}
'))
),
mainPanel(
fluidRow(
column(12,plotlyOutput("plot1" , height = 600,
width=1200))
), fluidRow( column(7,tableOutput(outputId =
"Table2"))),
fluidRow(column(12,dataTableOutput(outputId =
"Table1")))
)
)
)
)
Next we create a server
server<-function(input, output){
output$Table1<-renderDataTable({airquality})
#output$plot1<-renderPlot({hist(airquality$Ozone)})
output$Table2<-renderTable({airquality})
}
shinyApp(ui, server =server)
The color background in the main panel is not extending all the way down. The second table is set against a white background. Is there a way to expand the outputpanel size to do this
r shiny shinydashboard
add a comment |
I have created the following dashboard in shiny
I first import the folloiwng libraries in R
library(shinydashboard)
library(shiny)
library(DT)
library(shinyWidgets)
library(readxl)
We first create the UI here to provide an date, fileimport, a nmeric input and an action button
ui=shinyUI(
dashboardPage(
dashboardHeader(
title = "Chart",
titleWidth = 850
),
dashboardSidebar(
# Change font size here
tags$head(
tags$style(HTML(".main-sidebar { font-size: 20px; }"), style =
"background-color: #78d9c9;") #change the font size to 20
),
fileInput(inputId = "file", label = 'Load Dataset Here',placeholder =
"Upload",
multiple = TRUE,
accept = c("xlsx/xls",".xls",".xlsx"), width = "100%"),
dateInput(inputId = 'Cutoffdate',label = 'Cut Off date'),
numericInput(inputId = 'AAA',label = 'AAA', value = 0, min = 0, max =
120, step = 6),# Add new font color here
actionButton(inputId = 'Button',label ='Generate Chart', style="color:
#fff; background-color: #599AC3; border-color: #2e6da4, :font-color:
black")
),
dashboardBody(
tags$head(tags$style(HTML('
/* logo */
.skin-blue .main-header .logo {
background-color: #7CFC00;
}
/* logo when hovered */
.skin-blue .main-header .logo:hover {
background-color: #7CFC00;
}
/* navbar (rest of the header) */
.skin-blue .main-header .navbar {
background-color: #7CFC00;
}
# Sidebar color here
/* main sidebar */
.skin-blue .main-sidebar {
background-color: #F4A460;
}
/* active selected tab in the sidebarmenu */
.skin-blue .main-sidebar .sidebar .sidebar-menu
.active a{
background-color: #FFF8DC;
}
/* other links in the sidebarmenu */
.skin-blue .main-sidebar .sidebar .sidebar-menu
a{
background-color: #FFF8DC;
color:#A9A9A9;
}
/* other links in the sidebarmenu when hovered
*/
.skin-blue .main-sidebar .sidebar .sidebar-menu
a:hover{
background-color: #FFF8DC;
}
/* toggle button when hovered */
.skin-blue .main-header .navbar .sidebar-
toggle:hover{
background-color: #FFF8DC;
}
/* body */
.content-wrapper, .right-side {
background-color: #FFF8DC;
}
'))
),
mainPanel(
fluidRow(
column(12,plotlyOutput("plot1" , height = 600,
width=1200))
), fluidRow( column(7,tableOutput(outputId =
"Table2"))),
fluidRow(column(12,dataTableOutput(outputId =
"Table1")))
)
)
)
)
Next we create a server
server<-function(input, output){
output$Table1<-renderDataTable({airquality})
#output$plot1<-renderPlot({hist(airquality$Ozone)})
output$Table2<-renderTable({airquality})
}
shinyApp(ui, server =server)
The color background in the main panel is not extending all the way down. The second table is set against a white background. Is there a way to expand the outputpanel size to do this
r shiny shinydashboard
add a comment |
I have created the following dashboard in shiny
I first import the folloiwng libraries in R
library(shinydashboard)
library(shiny)
library(DT)
library(shinyWidgets)
library(readxl)
We first create the UI here to provide an date, fileimport, a nmeric input and an action button
ui=shinyUI(
dashboardPage(
dashboardHeader(
title = "Chart",
titleWidth = 850
),
dashboardSidebar(
# Change font size here
tags$head(
tags$style(HTML(".main-sidebar { font-size: 20px; }"), style =
"background-color: #78d9c9;") #change the font size to 20
),
fileInput(inputId = "file", label = 'Load Dataset Here',placeholder =
"Upload",
multiple = TRUE,
accept = c("xlsx/xls",".xls",".xlsx"), width = "100%"),
dateInput(inputId = 'Cutoffdate',label = 'Cut Off date'),
numericInput(inputId = 'AAA',label = 'AAA', value = 0, min = 0, max =
120, step = 6),# Add new font color here
actionButton(inputId = 'Button',label ='Generate Chart', style="color:
#fff; background-color: #599AC3; border-color: #2e6da4, :font-color:
black")
),
dashboardBody(
tags$head(tags$style(HTML('
/* logo */
.skin-blue .main-header .logo {
background-color: #7CFC00;
}
/* logo when hovered */
.skin-blue .main-header .logo:hover {
background-color: #7CFC00;
}
/* navbar (rest of the header) */
.skin-blue .main-header .navbar {
background-color: #7CFC00;
}
# Sidebar color here
/* main sidebar */
.skin-blue .main-sidebar {
background-color: #F4A460;
}
/* active selected tab in the sidebarmenu */
.skin-blue .main-sidebar .sidebar .sidebar-menu
.active a{
background-color: #FFF8DC;
}
/* other links in the sidebarmenu */
.skin-blue .main-sidebar .sidebar .sidebar-menu
a{
background-color: #FFF8DC;
color:#A9A9A9;
}
/* other links in the sidebarmenu when hovered
*/
.skin-blue .main-sidebar .sidebar .sidebar-menu
a:hover{
background-color: #FFF8DC;
}
/* toggle button when hovered */
.skin-blue .main-header .navbar .sidebar-
toggle:hover{
background-color: #FFF8DC;
}
/* body */
.content-wrapper, .right-side {
background-color: #FFF8DC;
}
'))
),
mainPanel(
fluidRow(
column(12,plotlyOutput("plot1" , height = 600,
width=1200))
), fluidRow( column(7,tableOutput(outputId =
"Table2"))),
fluidRow(column(12,dataTableOutput(outputId =
"Table1")))
)
)
)
)
Next we create a server
server<-function(input, output){
output$Table1<-renderDataTable({airquality})
#output$plot1<-renderPlot({hist(airquality$Ozone)})
output$Table2<-renderTable({airquality})
}
shinyApp(ui, server =server)
The color background in the main panel is not extending all the way down. The second table is set against a white background. Is there a way to expand the outputpanel size to do this
r shiny shinydashboard
I have created the following dashboard in shiny
I first import the folloiwng libraries in R
library(shinydashboard)
library(shiny)
library(DT)
library(shinyWidgets)
library(readxl)
We first create the UI here to provide an date, fileimport, a nmeric input and an action button
ui=shinyUI(
dashboardPage(
dashboardHeader(
title = "Chart",
titleWidth = 850
),
dashboardSidebar(
# Change font size here
tags$head(
tags$style(HTML(".main-sidebar { font-size: 20px; }"), style =
"background-color: #78d9c9;") #change the font size to 20
),
fileInput(inputId = "file", label = 'Load Dataset Here',placeholder =
"Upload",
multiple = TRUE,
accept = c("xlsx/xls",".xls",".xlsx"), width = "100%"),
dateInput(inputId = 'Cutoffdate',label = 'Cut Off date'),
numericInput(inputId = 'AAA',label = 'AAA', value = 0, min = 0, max =
120, step = 6),# Add new font color here
actionButton(inputId = 'Button',label ='Generate Chart', style="color:
#fff; background-color: #599AC3; border-color: #2e6da4, :font-color:
black")
),
dashboardBody(
tags$head(tags$style(HTML('
/* logo */
.skin-blue .main-header .logo {
background-color: #7CFC00;
}
/* logo when hovered */
.skin-blue .main-header .logo:hover {
background-color: #7CFC00;
}
/* navbar (rest of the header) */
.skin-blue .main-header .navbar {
background-color: #7CFC00;
}
# Sidebar color here
/* main sidebar */
.skin-blue .main-sidebar {
background-color: #F4A460;
}
/* active selected tab in the sidebarmenu */
.skin-blue .main-sidebar .sidebar .sidebar-menu
.active a{
background-color: #FFF8DC;
}
/* other links in the sidebarmenu */
.skin-blue .main-sidebar .sidebar .sidebar-menu
a{
background-color: #FFF8DC;
color:#A9A9A9;
}
/* other links in the sidebarmenu when hovered
*/
.skin-blue .main-sidebar .sidebar .sidebar-menu
a:hover{
background-color: #FFF8DC;
}
/* toggle button when hovered */
.skin-blue .main-header .navbar .sidebar-
toggle:hover{
background-color: #FFF8DC;
}
/* body */
.content-wrapper, .right-side {
background-color: #FFF8DC;
}
'))
),
mainPanel(
fluidRow(
column(12,plotlyOutput("plot1" , height = 600,
width=1200))
), fluidRow( column(7,tableOutput(outputId =
"Table2"))),
fluidRow(column(12,dataTableOutput(outputId =
"Table1")))
)
)
)
)
Next we create a server
server<-function(input, output){
output$Table1<-renderDataTable({airquality})
#output$plot1<-renderPlot({hist(airquality$Ozone)})
output$Table2<-renderTable({airquality})
}
shinyApp(ui, server =server)
The color background in the main panel is not extending all the way down. The second table is set against a white background. Is there a way to expand the outputpanel size to do this
r shiny shinydashboard
r shiny shinydashboard
asked Nov 20 at 5:07
Raghavan vmvs
15411
15411
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
The solution is simple. One needs to just remove mainpanel() in the UI.
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53386553%2fr-shiny-dashboard-output-panel-issue%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
The solution is simple. One needs to just remove mainpanel() in the UI.
add a comment |
The solution is simple. One needs to just remove mainpanel() in the UI.
add a comment |
The solution is simple. One needs to just remove mainpanel() in the UI.
The solution is simple. One needs to just remove mainpanel() in the UI.
answered Nov 20 at 5:43
Raghavan vmvs
15411
15411
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53386553%2fr-shiny-dashboard-output-panel-issue%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown