【问题标题】:Why different Shiny UI packages cannot be integrated within each other?为什么不同的 Shiny UI 包不能相互集成?
【发布时间】:2018-09-02 04:34:31
【问题描述】:

Rshiny 中的罐装包为任何基本的 Rshiny 应用程序提供了一个普通的外观。更高级的用户可能会选择HTML Templates。我为 Rshiny UI 遇到的罐头包是 Shiny DashboardShiny Material DesignFlex dashboard。但是,为什么不能调用 Dashboard 页面然后拥有 Shiny Material Design 按钮、输入或卡片,反之亦然?

是什么阻止他们集成和使用cross 来定制应用程序?

类似于下面的代码(不能按预期运行)

library(shinydashboard)
library(shiny)
library(shinymaterial)
ui <- dashboardPage(dashboardHeader(),
                    dashboardSidebar(material_row(
                      material_column(
                        width = 2,
                        material_card(
                          title = "",
                          depth = 4,
                          material_switch(
                            input_id = "trend_line",
                            label = "Trend Line",
                            off_label = "",
                            on_label = ""
                          ),
                          material_radio_button(
                            input_id = "plot_theme",
                            label = "Theme",
                            choices =
                              c(
                                "Default" = "default",
                                "Classic" = "classic",
                                "Light" = "light",
                                "Dark" = "dark"
                              )
                          )
                        )
                      )
                    )),
                    dashboardBody())

server <- function(input, output) {

}
shinyApp(ui, server)

【问题讨论】:

    标签: r shiny shinydashboard shinyjs shinybs


    【解决方案1】:

    这似乎是一个当前无法混合和匹配的问题,因为 shinymaterial 中使用的一些 CSS 样式表与其他包的样式表重叠,例如一些基本的闪亮输入或 htmlwidgets(请参阅here)。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2015-11-01
      • 1970-01-01
      • 2022-12-23
      • 2019-10-09
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-07-31
      相关资源
      最近更新 更多