我正在尝试从@jbkunst复制此链接的示例: http://rpubs.com/jbkunst/higcharter-grid-test
我的想法是以网格格式进行绘制。但是我得到的是每一行一张图表。我正在做的只是复制此代码:
library(highcharter)
data(diamonds, package = "ggplot2")
diamonds <- diamonds[-6]
map(names(diamonds), function(x){
diamonds[[x]] %>%
hchart(showInLegend = FALSE) %>%
hc_add_theme(hc_theme_smpl()) %>%
hc_title(text = x) %>%
hc_yAxis(title = list(text = ""))
}) %>%
hw_grid(rowheight = 225, ncol = 3) %>% browsable()
我也尝试了其他数据,但是问题是相同的。然后,我还认为这可能与响应性(css)和RMarkdown文档的宽度有关。但是我在RStudio中执行了相同的代码,并在浏览器中打开了图表,问题一直存在。我还重新安装了higharter(dev和cran版本),但存在相同的问题。
这是我的输出:
会话信息:
R version 3.5.1 (2018-07-02)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 16299)
Matrix products: default
locale:
[1] LC_COLLATE=Portuguese_Brazil.1252 LC_CTYPE=Portuguese_Brazil.1252 LC_MONETARY=Portuguese_Brazil.1252
[4] LC_NUMERIC=C LC_TIME=Portuguese_Brazil.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] purrr_0.2.5 htmltools_0.3.6 DT_0.5 highcharter_0.6.0 dplyr_0.7.8
loaded via a namespace (and not attached):
[1] Rcpp_1.0.0 pillar_1.3.0 compiler_3.5.1 bindr_0.1.1 tools_3.5.1 xts_0.11-2 digest_0.6.18
[8] jsonlite_1.5 lubridate_1.7.4 tibble_1.4.2 nlme_3.1-137 lattice_0.20-35 pkgconfig_2.0.2 rlang_0.3.0.1
[15] igraph_1.2.2 rstudioapi_0.8 yaml_2.2.0 curl_3.2 bindrcpp_0.2.2 stringr_1.3.1 knitr_1.20
[22] htmlwidgets_1.3 grid_3.5.1 tidyselect_0.2.5 glue_1.3.0 data.table_1.11.8 R6_2.3.0 whisker_0.3-2
[29] tidyr_0.8.2 TTR_0.23-4 magrittr_1.5 backports_1.1.3 rlist_0.4.6.1 assertthat_0.2.0 quantmod_0.4-13
[36] stringi_1.2.4 broom_0.5.0 crayon_1.3.4 zoo_1.8-4
谢谢。
Wlademir。