简体   繁体   中英

Reducing the space between the sidebarpanel and mainpanel in shiny

在此输入图像描述 Kindly suggest me as how to reduce the space between the sidebarpanel and mainpanel in shiny app.

Regards,
Mohan

[![enter image description here][2]][2]

I use column to choose the size of my dashboard. I think the problem is because you set the size in px in tags$style. This code works

library(shiny)    
library(shinythemes)

shinyUI(fluidPage(theme = shinytheme("cerulean"),
              #img(src='logo.jpg', align = "right"),
              titlePanel("Project1"),
              fluidRow(width=12,
              sidebarLayout(
                column(width=4,
                sidebarPanel(
                     width=12,
                     radioButtons("source", "Source Type:", c("online", "offline")),
                     conditionalPanel(
                       condition = "input.source == 'online'",
                       selectInput("e_source", "online_Source",
                                   list("Yahoo","CNBC","Others"), selected = "CNBC")),
                     conditionalPanel(
                       condition = "input.source == 'offline'",
                       selectInput("e_source", "offline_Source",
                                   list("Newspaper",
                                        "magazines",
                                        "books"), selected = "books")),
                     checkboxGroupInput("size", 
                                   label = ("aAd size"), 
                                   choices = list("Medium", "Large", "small"
                                   ), selected = "small"))),
                column(width=8,
                       mainPanel(tabsetPanel("tab",tabPanel("Ad Details", tableOutput("table1"))), width=12))
              ))))

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM