Commit d6352d6b authored by Aqeel Padaria's avatar Aqeel Padaria

dashboard troubleshoot 3.2 - change plot insertion to image insertion

parent cce0f942
......@@ -490,10 +490,14 @@ server = shinyServer(
openxlsx::addWorksheet(wb, "Forecast")
openxlsx::writeData(wb, sheet = "Forecast", x = newvals, colNames = TRUE, rowNames = FALSE)
png("graph.png")
p <- getPlot()
print(p)
openxlsx::addWorksheet(wb, "Plot")
openxlsx::insertPlot(wb, "Plot", width=8, height = 4, fileType = "png", units = "in")
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::saveWorkbook(wb,file, overwrite = T)
#write.csv(x = mainout, file = file)
......@@ -571,7 +575,7 @@ ui = #ui.R
uiOutput("dataOptions"),
selectInput("error",
label = "Choose metric for accuracy error",
label = "Choose accuracy error metric",
choices = list("Standard MAPE","Adjusted MAPE","Weighted MAPE"),
selected = "Adjusted MAPE"),
......
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