Title: Resize behaviour in combination with renderUI() · Issue #1553 · plotly/plotly.R · GitHub
Open Graph Title: Resize behaviour in combination with renderUI() · Issue #1553 · plotly/plotly.R
X Title: Resize behaviour in combination with renderUI() · Issue #1553 · plotly/plotly.R
Description: When implementing plotlyOutput inside a renderUI enviroment the plots are not resizing properly when changing the size of the container indirectly via an input. The first change works, but if I change back the outer container of the seco...
Open Graph Description: When implementing plotlyOutput inside a renderUI enviroment the plots are not resizing properly when changing the size of the container indirectly via an input. The first change works, but if I cha...
X Description: When implementing plotlyOutput inside a renderUI enviroment the plots are not resizing properly when changing the size of the container indirectly via an input. The first change works, but if I cha...
Opengraph URL: https://github.com/plotly/plotly.R/issues/1553
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Resize behaviour in combination with renderUI()","articleBody":"When implementing `plotlyOutput` inside a `renderUI` enviroment the plots are not resizing properly when changing the size of the container indirectly via an input. The first change works, but if I change back the outer container of the second plot has the right size, but the following `plot-container` and `svg-container` haven't and so the resulting plot.\r\nI'm using the current `shiny` (1.3.2) and `plotly` (4.9.0) version.\r\n\r\nSee this example:\r\n```\r\nlibrary(shiny)\r\nlibrary(plotly)\r\n\r\nui \u003c- fluidPage(\r\n uiOutput(\"plotly_outputs\"),\r\n radioButtons(\"switch\", \"switch\", choices = c(\"horiz\", \"vert\"), selected = \"horiz\")\r\n)\r\n\r\nserver \u003c- function(input, output) {\r\n \r\n output$plotly_outputs \u003c- renderUI({\r\n \r\n if (input$switch == \"horiz\"){\r\n ret \u003c- tagList(\r\n fluidRow(\r\n column(width = 6, style = \"height:450px\",\r\n plotlyOutput('plotly_blocks', width = '100%', height = '100%')),\r\n column(width = 6, style = \"height:450px\",\r\n plotlyOutput('plotly_blocks2', width = '100%', height = '100%'))\r\n )\r\n )\r\n } else {\r\n tagList(\r\n fluidRow(\r\n column(width = 12, style = \"height:225px\",\r\n plotlyOutput('plotly_blocks', width = '100%', height = '100%'))),\r\n fluidRow(\r\n column(width = 12, style = \"height:225px\",\r\n plotlyOutput('plotly_blocks2', width = '100%', height = '100%')))\r\n )\r\n }\r\n })\r\n \r\n output$plotly_blocks \u003c- renderPlotly({\r\n input$switch\r\n calc_plot()\r\n })\r\n \r\n output$plotly_blocks2 \u003c- renderPlotly({\r\n input$switch\r\n calc_plot()\r\n })\r\n \r\n calc_plot \u003c- reactive({\r\n input$switch\r\n \r\n plot_ly(economics, x = ~date, color = I(\"black\")) %>%\r\n add_lines(y = ~uempmed) %>%\r\n add_lines(y = ~psavert, color = I(\"red\"))\r\n })\r\n\r\n}\r\n\r\nshinyApp(ui, server)\r\n```\r\n","author":{"url":"https://github.com/Fideldue","@type":"Person","name":"Fideldue"},"datePublished":"2019-06-18T16:51:33Z","url":"https://github.com/plotly/plotly.R/issues/1553"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:8c7cbe5b-3157-6b1a-2454-186f47194249 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 886C:2463BD:F61632:13CAC75:6B00FF09 |
| html-safe-nonce | 9a50984d63d148bf709bf00359662bc97576d77dd329d48c04288e0e7b582e7f |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4ODZDOjI0NjNCRDpGNjE2MzI6MTNDQUM3NTo2QjAwRkYwOSIsInZpc2l0b3JfaWQiOiIzNzM3OTI1NzI5MDE5NTU5Njg5IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | d11f47fa95e40d0237c5d7975d568230dd16d72fd02fa3acda8e1896b997daf6 |
| hovercard-subject-tag | issue:457590661 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/plotly/plotly.R/1553/issue_layout |
| twitter:image | https://opengraph.githubassets.com/1102cac1b6062a0786bbbc6e3dc4555b867923d46ae12d0445ead7906ea9c70a/plotly/plotly.R/issues/1553 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/1102cac1b6062a0786bbbc6e3dc4555b867923d46ae12d0445ead7906ea9c70a/plotly/plotly.R/issues/1553 |
| og:image:alt | When implementing plotlyOutput inside a renderUI enviroment the plots are not resizing properly when changing the size of the container indirectly via an input. The first change works, but if I cha... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | Fideldue |
| hostname | github.com |
| expected-hostname | github.com |
| None | cb7fa109eca7d4156c889f474306b0e91336055e9adf8fd4684b61e49094d124 |
| turbo-cache-control | no-preview |
| go-import | github.com/plotly/plotly.R git https://github.com/plotly/plotly.R.git |
| octolytics-dimension-user_id | 5997976 |
| octolytics-dimension-user_login | plotly |
| octolytics-dimension-repository_id | 14579179 |
| octolytics-dimension-repository_nwo | plotly/plotly.R |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 14579179 |
| octolytics-dimension-repository_network_root_nwo | plotly/plotly.R |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 2b59d31a4e44f08b7af67a4b67f8fd0af3befe2a |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width