Resizing plot area?
I'm using this component in Vue thanks Vuera, a vue package that lets me use React components within Vue. This is working fine, except for plots. I can't find a way to resize plots. With CSS, table views automatically resize to width in %, but plots don't seem to.
I've tried everything from the plotlyOptions object to Plotly.Plots.resize()
The plotlyOptions object works the first time: if I pass this as a prop, plotly receives it and draws a chart in the specified size), but if I change the value of plotlyOptions.width nothing happens (the property is reactive, as changing the data object works fine)
In the demo app this is done via plotlyOptions ... https://github.com/plotly/react-pivottable/blob/master/examples/App.jsx#L61
But is this property reactive? It works for me the first time, but not when I change it.
It is "reactive", yes, in an immutable context. You can't just mutate plotlyOptions.width, you have to reassign plotlyOptions in order for the immutability check to work.