Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

R svgPanZoom within shinyApp display different in the Web and Rstudio #18

Open
JiajinChen opened this issue May 2, 2018 · 0 comments
Open

Comments

@JiajinChen
Copy link

Firstly,Thanks for your great job.
Here is my problem:
I draw a picture using R with packages svgPanZoom,svglite,ggplot2 and shiny. However, it can display correctly on Rstudio but not on Web. Are there any options to solve it? Please run the following code for detail.
`library(shiny)
library(svglite)
library(svgPanZoom)
library(ggplot2)

data<-data.frame(x=1:50,y=1:50)
x_position<-1:50
y_position<-1:50
ui <- pageWithSidebar(
headerPanel(""),
sidebarPanel(),
mainPanel(

column(width=12,svgPanZoomOutput(outputId = "main_plot",width=600,height=450))

))

server = shinyServer(function(input, output) {
output$main_plot <- renderSvgPanZoom({
p <- ggplot(data, aes(x = x, y = y)) + geom_point()

svgPanZoom(
  svglite:::inlineSVG(show(p))
  , controlIconsEnabled = T)

})
})

shinyApp(ui,server)`

Detail in:
https://stackoverflow.com/questions/50083003/r-svgpanzoom-within-shinyapp-display-different-in-the-web-and-rstudio

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant