Use current height/width of figure in Callbacks

Hi, I have a sankey diagram, which can be updated using plotly’s ‘updatemenus’ buttons. Now I`m using it with Dash, and I need to update the colorscheme of Sankey based on some value from radio buttons.
I want know two things, first:
Is it possible to use height/width of Sankey as input to dash callback? I need it so that when radio buttons callback is called, it still updates Sankey colors scheme, without changing width/height to default values, if it was changed by updatemenus

Second, would it be possible to define app layout as function of Sankey width, so that when width of Sankey is changed with updatemenus, I can also change position of Radio buttons below the Sankey accordingly.
Or is there a better approach?

I would be grateful for any help/advice.