Commit 64629af6 authored by Aqeel Padaria's avatar Aqeel Padaria

dashboard troubleshoot 3.4 - image insertion with deletion after writing

parent 2c90801d
......@@ -490,18 +490,17 @@ server = shinyServer(
openxlsx::addWorksheet(wb, "Forecast")
openxlsx::writeData(wb, sheet = "Forecast", x = newvals, colNames = TRUE, rowNames = FALSE)
#png("graph.png")
#p <- getPlot()
p <- plot(1:10,1:10)
png("graph.png")
p <- getPlot()
print(p)
#dev.off()
dev.off()
openxlsx::addWorksheet(wb, "Plot", gridLines = FALSE)
#openxlsx::insertImage(wb, "Plot", "graph.png", width=8, height = 4, units = "in")
openxlsx::insertPlot(wb, "Plot", width=8, height = 4, fileType = "png", units = "in")
#unlink("graph.png")
openxlsx::insertImage(wb, "Plot", "graph.png", width=8, height = 4, units = "in")
#openxlsx::insertPlot(wb, "Plot", width=8, height = 4, fileType = "png", units = "in")
openxlsx::saveWorkbook(wb,file, overwrite = T)
#write.csv(x = mainout, file = file)
unlink("graph.png")
})
output$header <- renderUI({
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment