-
-
Notifications
You must be signed in to change notification settings - Fork 81
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
Width of plot output too small when plot is rendered in the background #491
Comments
Using width like |
It should be responsive I'm surprised it's not right. Shouldn't tabPanel call the resize event when a tab is toggled? That is implemented in echarts4r |
You could use resize proxy but really should not have to |
I tried the above code but used a static ggplot instead and the resizing issue does not appear. |
Any updates on this issue? This behavior happens in Echarts4r Shiny demo as well. In the Loading tab, click on "Generate" and then switch to a different tab while it renders in the background. When you return, this happens: |
Hello, yeah that's a problem, I'm working on it but I think it has to do with htmlwidgets, ... gonna try to find the issue |
Yes, I don't think it's on echarts4r's end. I suspect it's a combination of shiny and htmlwidgets. The graph is initialised with the wrong width and the only way this gets redrawn is with if a resize event gets fired and it does not. I don't fully understand why it gets initialised with the wrong width. |
When the user clicks on a tab 1 with an echarts4r plot and then moves on to another tab 2 before tab 1 has finished rendering it, the plot on tab 1 will have an incorrect width.
MWE
Given the following app:
This is what I see:
This is what I expect to see (which is what I see when I wait until plot1 is rendered before moving on or when I resize the window):
The text was updated successfully, but these errors were encountered: