Hi,
I am using dash python and I’d like to get the width and height of a figure after its creation, for example :
fig1 = dcc.Graph( figure=go.Figure( data=[ go.Scatter( x=[], y=[], name='', ) ], layout=go.Layout( margin=go.layout.Margin(l=40, r=50, t=10, b=35) ) ), style={'height': '23vh', 'padding-top': '1vh'}, id='activity-graph' )
I’d like then to be able to get the current size of the figure in pixels as it is displayed in my browser by doing something perhaps like: fig1.layout.windows.getwidth()
I have the same use case as here: API to get current plot area width & height
I can get the width and height of the figure in the javascript console in chrome by searching the element containing the figure. But I’d like to get the size within dash if possible.
Thanks for any help.