I use Plotly with React. I need to trigger autoscale functionality from outside of the component. Nothing seems to be working

autoscale

This is what I need to trigger by clicking a button outside of the react Plot component.

Thank you in advance

You need to pass the state of the button to the component. Then I believe a useEffect with layout update, and the state of button as trigger on use Effect