-
-
Notifications
You must be signed in to change notification settings - Fork 531
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
Plotly responsiveness does not work #1556
Comments
@MarcSkovMadsen you mean support for vertical responsiveness, right? Horizontal seems to works, except for the initial resizing. Besides the snippet in your post I have also tried using holoviews with the plotly backend, but I get the same problem; no vertical responsiveness. I think good plotly support is important because the 3D interactive plotly plots are great and I am not aware of a good alternative. |
Thanks @LeonvanKouwen . I’ve updated the post above. |
Additional Context: Reference Example Workshttps://panel.holoviz.org/reference/panes/Plotly.html import pandas as pd
import plotly.express as px
import panel as pn
data = pd.DataFrame([
('Monday', 7), ('Tuesday', 4), ('Wednesday', 9), ('Thursday', 4),
('Friday', 4), ('Saturday', 4), ('Sunay', 4)], columns=['Day', 'Orders']
)
fig = px.line(data, x="Day", y="Orders")
fig.update_traces(mode="lines+markers", marker=dict(size=10), line=dict(width=4))
fig.layout.autosize = True
responsive = pn.pane.Plotly(fig, config={'responsive': True})
pn.Column('# A responsive plot', responsive, sizing_mode='stretch_width').servable() |
The thing missing is height responsiveness. But that is something to solve for Plotly.js. I've created an issue plotly/plotly.js#5270 and close this one. |
My Pain
I would like it to be easy to use Panel to use the Python Data Viz ecosystem. One of the best plotting packages is Plotly.
But it currently does not work well in Panel.
For example Leonidas reports that he cannot get vertical responsiveness to work.
https://discourse.holoviz.org/t/plotly-backend-responsive-mode-only-works-horizontally/1150/4
Reproducible example
I run this with
python -m panel serve 'scripts\horizontal_responsiveness.py' --dev --show
When it opens in Chrome I see
if I resize the window I see
Solution
Additional Context
Related to #1514
The text was updated successfully, but these errors were encountered: