【问题标题】:white space in shiny闪亮的白色空间
【发布时间】:2021-09-26 09:21:30
【问题描述】:

我正在制作一个闪亮的应用程序,但我想知道是否可以将两个输入分开一点。就像你在图片中看到的那样:

Expected space

我不确定我需要什么来获得空白

我使用的用户界面如下:

datoscovid <- read_excel("/Users/jorge_hca/Desktop/Trabajo/datacovid.xlsx")
coordenadas <- read_excel("/Users/jorge_hca/Desktop/Trabajo/world_countrys.xlsx")

datoscov1 <- datoscovid |> 
  left_join(coordenadas, by = c("location" = "name")) 

theme <- bs_theme(
  bg = "#000000", fg = "#B8BCC2",
  "input-border-color" = "#a6a6a6"
)






ui <- bootstrapPage(
  absolutePanel(
    top = 10, left = 50, style = "z-index:500; text-align: right;",
    tags$h2("Los ingresos en México por deciles")
  ),
  theme = theme,
  useShinyalert(),
  tags$style(type = "text/css", "html, body {width:100%;height:100%}"),
  leafletOutput("map", width = "100%", height = "100%"),
  absolutePanel(top = 10, right = 10, 
                fluidRow(dateInput("fecha", "Fecha a graficar:", width = 180,value = "2021-02-12"),
                         selectInput("var", "Escoge un país:", width = 180,
                                     c("Antigua y Barbuda" = "Antigua and Barbuda",
                                       "Argentina" = "Argentina",
                                       "Bahamas" = "Bahamas",
                                       "Barbados" = "Barbados",
                                       "Belice" = "Belize",
                                       "Bolivia" = "Bolivia",
                                       "Brasil" = "Brazil",
                                       "Canada" = "Canada",
                                       "Chile" = "Chile",
                                       "Colombia" = "Colombia",
                                       "Costa Rica" = "Costa Rica",
                                       "Cuba" = "Cuba",
                                       "Dominica" = "Dominica",
                                       "Republica Dominicana" = "Dominican Republic",
                                       "Ecuador" = "Ecuador",
                                       "El Salvador" = "El Salvador",
                                       "Groenlandia" = "Greenland",
                                       "Grenada" = "Grenada",
                                       "Guatemala" = "Guatemala",
                                       "Guyana" = "Guyana",
                                       "Haiti" = "Haiti",
                                       "Honduras" = "Honduras",
                                       "Jamaica" = "Jamaica",
                                       "Mexico" = "Mexico",
                                       "Nicaragua" = "Nicaragua",
                                       "Panama" = "Panama",
                                       "Paraguay" = "Paraguay",
                                       "Peru" = "Peru",
                                       "Trinidad y Tobago" = "Trinidad and Tobago",
                                       "Estados Unidos" = "United States",
                                       "Uruguay" = "Uruguay",
                                       "Venezuela" = "Venezuela"
                                     ), selected = "Mexico" )),
                echarts4rOutput("graf", height = '350px', width = '550px'),
                )
  )

有什么想法或建议吗?

【问题讨论】:

    标签: r shiny leaflet


    【解决方案1】:

    您可以在两个输入之间插入一个空的div

    selectInput(......),
    div(style = "height:100px"),
    echarts4rOutput(......)
    

    【讨论】:

      猜你喜欢
      • 2016-08-15
      • 2016-06-09
      • 2021-09-23
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-06-08
      • 2013-06-16
      相关资源
      最近更新 更多