相关疑难解决方法(0)

highcharter 集成在 R Shiny 基于“html 模板”的应用程序中

上下文
我想使用基于html 模板的高级 UI 创建一个 R Shiny 仪表板。因此,UI 是用纯 HTML 构建的,我使用Bootstrap 4 免费模板作为起点。

问题 虽然使用 highcharter 及其 Shiny 集成功能可以很好地处理超级基本的 HTML 文件(与上面的教程相同),但一旦我使用引导仪表板主题,图表就不会显示。

我已经尝试过的

可重现的示例
在这里共享可重现的示例很困难,因为您需要完整的 SB Admin 2 文件夹才能使其工作。基本上这不起作用:

 # insert the following in my HTML template (index.html)
 {{ highchartOutput("highcharter_plot") }}
Run Code Online (Sandbox Code Playgroud)

相应的可复制服务器部分:

# in server.R
output$highcharter_plot <- renderHighchart({
data(citytemp)

hc <- highchart() %>% 
  hc_xAxis(categories = citytemp$month) %>% 
  hc_add_series(name = "Tokyo", data = citytemp$tokyo) %>% 
  hc_add_series(name = "London", data = citytemp$london) %>% 
  hc_add_series(name = "Other …
Run Code Online (Sandbox Code Playgroud)

r shiny r-highcharter html-templates

5
推荐指数
1
解决办法
1056
查看次数

标签 统计

html-templates ×1

r ×1

r-highcharter ×1

shiny ×1