使用'Highcharter'软件包,Highchart无法呈现闪亮

时间:2016-06-13 15:34:47

标签: r highcharts shiny

我在让highcharter使用我的闪亮应用时遇到了问题。有些奇怪的是,有些高级图表有效,有些则没有。这可能是我没有抓到的一些愚蠢的错误。无论如何,这里有一些代码:

library(shiny)
library(highcharter)
library(ggplot2)

ui <- fluidPage(
  column(width = 12,  
               highchartOutput("hc_more.FA",height="500px")
  )
)
server = function(input, output) {

  output$hc_more.FA <- renderHighchart({
      hchart(diamonds$carat)

  })

}

shinyApp(ui = ui, server = server)

这是我的应用程序的样子? enter image description here

这是我的会话信息:

sessionInfo()
R version 3.3.0 (2016-05-03)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 7 x64 (build 7601) Service Pack 1

locale:
[1] LC_COLLATE=English_United States.1252  LC_CTYPE=English_United States.1252   
[3] LC_MONETARY=English_United States.1252 LC_NUMERIC=C                          
[5] LC_TIME=English_United States.1252    

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] ggplot2_2.1.0     highcharter_0.3.0 shiny_0.13.2     

loaded via a namespace (and not attached):
 [1] igraph_1.0.1      Rcpp_0.12.5       magrittr_1.5      munsell_0.4.3     colorspace_1.2-6  viridisLite_0.1.3
 [7] xtable_1.8-2      lattice_0.20-33   R6_2.1.2          plyr_1.8.4        stringr_1.0.0     TTR_0.23-1       
[13] dplyr_0.4.3       tools_3.3.0       xts_0.9-7         parallel_3.3.0    quantmod_0.4-5    grid_3.3.0       
[19] gtable_0.2.0      data.table_1.9.6  DBI_0.4-1         htmltools_0.3.5   assertthat_0.1    digest_0.6.9     
[25] tidyr_0.4.1       purrr_0.2.1       htmlwidgets_0.6   rlist_0.4.6.1     mime_0.4          stringi_1.1.1    
[31] scales_0.4.0      jsonlite_0.9.21   httpuv_1.3.3      chron_2.3-47      zoo_1.7-13     

有什么想法吗?

1 个答案:

答案 0 :(得分:2)

原因是图表名称中没有点。删除点,它可以工作。