highcharter icon indicating copy to clipboard operation
highcharter copied to clipboard

webshot printing blank screenshot with latest modifications in highcharter

Open CamilaAchuri opened this issue 3 years ago • 3 comments

The common step to export highcharter plot is hc exporting, however I using a external button in shiny and I' call "webshot" (library webshot) to take a screenshot of plot, in january this worked perfectly, but last changes do not allow extraction of html content to make the capture

Eg:

filename <- "test_01"
filename <- sub("([^.]+)\\.[[:alnum:]]+$", "\\1", filename)
tmp <- paste(tempdir(), 'html', sep ='.')
x <- c(rnorm(10000), rnorm(1000, 4, 0.5))
viz <-hchart(x, name = "data") 
htmltools::save_html(viz, tmp)
tmpSave <- filename
format <- "png"
webshot::webshot(tmp, paste0(filename, ".", format), delay = 0.7)

Thanks for readme

CamilaAchuri avatar Mar 31 '21 20:03 CamilaAchuri

Have you tried increasing the delay parameter in webshot::webshot()? Sometimes, the images produced by webshot are blank because the startup animation is not finished when the snapshot is taken.

GregorDeCillia avatar Apr 22 '21 14:04 GregorDeCillia

Hi!, yes I tried, but the output its the same :(

CamilaAchuri avatar Apr 23 '21 19:04 CamilaAchuri

Has there been any fix to this issue ?

tqtbui avatar Feb 26 '22 21:02 tqtbui