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
I'm using Plotly.js via Python. I'm also a user of other plotting libraries like Bokeh, Vega/ Altair and Echarts. And I can see that the responsiveness functionality of plotly.js is just not as robust, fast and seamless as the others.
The one thing where I can point to a reproducible example right now is height responsiveness.
This is a major problem if you want to make responsive layouts. For example for mobile. But also if you want to put Plotly inside resizable divs and similar.
I think the problem is that the div's height wraps to its contents. If I open the debugger (specifically on the codepen of one of the examples) and set height to 100% on the plot div, and every element above it (back up to and including <html>), the plot does resize height.
Reacted by Marc Skov Madsen, Daniel Garcia Sanchez, Ajay Dhami and Tom Anderson
Activity
MarcSkovMadsen commentedon Nov 13, 2020
Additional Context
You can experiment with the behavior of Plotly vs other plotting libraries here.
App: https://awesome-panel.org/streaming-plots
Code: https://github.com/MarcSkovMadsen/awesome-panel/blob/master/application/pages/streaming_plots/streaming_plots.py
Echarts also have a problems. But those where on Panels side and have been solved in the Panel Master branch.
MarcSkovMadsen commentedon Nov 13, 2020
Additional Context 2
Another reproducible example can be found here holoviz/panel#1770 (comment)
run the file with
panel serve FILENAME.PY.[-]Plot.js is not height responsive[/-][+]Plotly.js is not height responsive[/+]Erhannis commentedon Dec 3, 2020
I think the problem is that the
div's height wraps to its contents. If I open the debugger (specifically on the codepen of one of the examples) and setheightto100%on the plot div, and every element above it (back up to and including<html>), the plot does resize height.MarcSkovMadsen commentedon Dec 4, 2020
Thanks. I can see adding height 100% is the solution. Thanks
show how to make the output in the Jinja2 example responsive