减少侧板面板和主面板之间的空间

时间:2016-06-14 08:27:11

标签: r shiny

enter image description here请建议我如何在闪亮的应用中减少侧边栏和主面板之间的空间。

的问候,
莫汉

[![在此处输入图像说明] [2]] [2]

1 个答案:

答案 0 :(得分:3)

我使用列来选择仪表板的大小。我认为问题是因为你在标签$ style中设置了px的大小。 此代码有效

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))
              ))))