You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After upgrade from Plotly 4.5.6 to Plotly 4.7.0, plot height is incorrectly calculated when set reactively in plot_ly. This happens upon window resizing or tabsetPanel selection.
Prerequisites
Plotly height is chosen via plot_ly(..., height=<some dependency>)
<some dependency> is a reactive Value (input$selectPlot in the example below)
Problem
after resizing window, the height is set to the first value of the selectInput
Example
When chosen "800" in the selectInput, the plot is correctly drawn with a height of 800px:
After a resize of the window, the height is changed to the first value of the selectInput (100px), even though this value did not change at all:
The same problem happens if there is a tabsetPanel in the page (e.g. below the plot). The plot height is changed when a different tab is clicked.
Putting the height argument in renderPlotly works initially, but since the Plotly itself does never change its height, the plot itself stays at 800px the whole time (just the container height is changed):
Note that all of this also happens if there is a simple tabsetPanel below the plot and another tab is chosen there.
The text was updated successfully, but these errors were encountered:
shosaco
changed the title
Height incorrectly set after window resizing or tabsetPanel selection
Reactive plot height not working as expected
Jul 21, 2017
shosaco
changed the title
Reactive plot height not working as expected
Reactive plot height not working as expected since 4.6.0
Jul 21, 2017
After upgrade from Plotly 4.5.6 to Plotly 4.7.0, plot height is incorrectly calculated when set reactively in
plot_ly
. This happens upon window resizing or tabsetPanel selection.Prerequisites
plot_ly(..., height=<some dependency>)
<some dependency>
is a reactive Value (input$selectPlot
in the example below)Problem
Example
selectInput
(100px), even though this value did not change at all:The same problem happens if there is a
tabsetPanel
in the page (e.g. below the plot). The plot height is changed when a different tab is clicked.What I tried so far
height
argument inrenderPlotly
works initially, but since the Plotly itself does never change its height, the plot itself stays at 800px the whole time (just the container height is changed):ui:
uiOutput(ns("plot"))
server:
When I additionally make
output$plotly
dependent oninput$height
, the Plots "jumps" immediately after selecting any other height:output$plotly <- renderPlotly({ plot_ly(mtcars, x=~gear, y=~cyl, height=input$height) })
Note that all of this also happens if there is a simple
tabsetPanel
below the plot and another tab is chosen there.The text was updated successfully, but these errors were encountered: