wch / webshot

Take screenshots of web pages from R
http://wch.github.io/webshot/
227 stars 40 forks source link

save htmlwidgets but get blank png #107

Closed Liripo closed 10 months ago

Liripo commented 3 years ago
library(echarts4r)

e <- mtcars %>%
  e_charts(qsec) %>%
  e_line(mpg) 
e %>% 
  htmlwidgets::saveWidget(file = "test.html")
webshot::webshot("test.html",file = "test.png")

Cut out is a blank interface.

sessioninfo() ```R > sessionInfo() R version 4.1.0 (2021-05-18) Platform: x86_64-pc-linux-gnu (64-bit) Running under: Ubuntu 20.04.2 LTS Matrix products: default BLAS/LAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.8.so locale: [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=C [7] LC_PAPER=en_US.UTF-8 LC_NAME=C [9] LC_ADDRESS=C LC_TELEPHONE=C [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C attached base packages: [1] stats graphics grDevices utils datasets methods [7] base other attached packages: [1] webshot_0.5.2 htmlwidgets_1.5.3 loaded via a namespace (and not attached): [1] compiler_4.1.0 magrittr_2.0.1 htmltools_0.5.1.1 [4] tools_4.1.0 digest_0.6.27 rlang_0.4.11 ```
whurst03 commented 2 years ago

I'm having the same issues with dygraphs plots on UNIX Centos... both .jpeg & .png

Oddly enough, the plotly plot works for both picture formats on the same system.

stla commented 1 year ago

Try webshot2.