Dear Community,
is there a way to open a second window from a running shiny app. I would like to use this as an image viewer that is "floating" above the windows with the plotted values. So the user can click a datapoint and the image from which the datapoint was generated would open in a new window.
Thanks for the help.
Alex
Dear radmuzon,
thanks a lot for your hint. This works pretty well. Here is a small sample of the implementation:
library(magick)
image <- image_read('path_to_your.tiff')
image_png <- image_convert(image, "png")
image_write(image_png, "www/temp.png")
shinyApp(
ui = basicPage(
actionButton("show", "Show modal dialog")
),
server = function(input, output) {
observeEvent(input$show, {
showModal(modalDialog(
title = "Your Image",
"Here is the selected image!",
HTML('<img src="temp.png" width="550" >'),
size="l",
fade=F,
easyClose = TRUE
))
})
}
)
´´´
1 Like
This topic was automatically closed 54 days after the last reply. New replies are no longer allowed.
If you have a query related to it or one of the replies, start a new topic and refer back with a link.