- 
                Notifications
    You must be signed in to change notification settings 
- Fork 636
Closed
Description
I am creating a Shiny app using Plotly and am seeing some weird behaviour when it comes to downloading/exporting the graph. The code below shows the gist of the app. What happens is, when clicking on the download image button it seems that the height/width don't accurately represent the values. However, if I simply press minimize/maximize on the browser window, the next time one downloads the image it fixes everything. I have also attached two images showing this behaviour.
Server.R
    p <- p +
      labs(x = "", y = ylabel, title = title2)  +    
      theme_minimal() 
    ggplotly(p, tooltip = "text") %>%
      layout(
        legend = list(
          orientation = "h",
          xanchor = "center",
          x = 0.5,
          y = -0.2
        ),
        title = list(font = list(size = 17.5)),
        annotations = list(x = 1, y = 1.05, text = "some text here",
                           showarrow = F, xref='paper', yref='paper', 
                           xanchor='right', yanchor='auto', xshift=0, yshift=0,
                           font=list(size=12, color="#b22f16"))
      ) %>%
      style(legendgroup = NULL) %>%
      config(displaylogo = FALSE,
             modeBarButtonsToRemove = list('lasso2d'))UI.R
      fluidRow(
        plotlyOutput("output", height = 600) %>% withSpinner(color =
                                                                   "#003951", type = 4))
 <- Graph that one sees on the screen before minimizing/maximizing window.
 <- Graph that one sees on the screen before minimizing/maximizing window.
 <- Graph that one sees on the screen after minimizing/maximizing window.
 <- Graph that one sees on the screen after minimizing/maximizing window.
Metadata
Metadata
Assignees
Labels
No labels