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 was wondering if it would be possible to get the charts made by plotly.py to be retroactively resized with the browser window. As of now, it seems that there is only a js implementation for the minified version. It would be really convenient if the height and width attributes could take a percentage instead of a pixel value. This way, with a percentage set, one could use css to fluidly resize the entire structure of the webpage. Resizing the container of the chart would cause the chart to automatically resize. Not sure how difficult this would be, but since the plotly.py commands are not run within js, it makes fluid resizing very difficult.
I hope I haven't overlooked some super simple solution, and if I have please let me know! I am trying to adapt my web app for more than just desktop use. I would really like to make it mobile. I love how powerful plotly is with all of its graphing functionality, so I would prefer to continue with its use in the web app.
Thanks
The text was updated successfully, but these errors were encountered:
I was struggling to do this too, but I may have found a "super simple solution" :) dcc.Graph( ... , style={'width':'100%'})
This yields fluid resizing of the div containing the chart, and auto-resizing of any charts within that.
Closing as plots displayed using FigureWidget in the classic notebook or JupyterLab do autoresize with their container, as do offline iplot figures in JupyterLab using the @jupyterlab/plotly-extension. Resizing for offline iplot figures in the classic notebook is going to be looked at for version 3.4 (#970).
Hey guys,
I was wondering if it would be possible to get the charts made by plotly.py to be retroactively resized with the browser window. As of now, it seems that there is only a js implementation for the minified version. It would be really convenient if the height and width attributes could take a percentage instead of a pixel value. This way, with a percentage set, one could use css to fluidly resize the entire structure of the webpage. Resizing the container of the chart would cause the chart to automatically resize. Not sure how difficult this would be, but since the plotly.py commands are not run within js, it makes fluid resizing very difficult.
I hope I haven't overlooked some super simple solution, and if I have please let me know! I am trying to adapt my web app for more than just desktop use. I would really like to make it mobile. I love how powerful plotly is with all of its graphing functionality, so I would prefer to continue with its use in the web app.
Thanks
The text was updated successfully, but these errors were encountered: