Plotly js - scatter plot chart responsive issue

Hie
Need an help to fix the issue.
Am working with scatter plot chart using plotly js with angular.
Set the config - responsive to true & also tried Plotly.plots.resize('divId);
but when opening or closing side navigation - the responsiveness is disturbed & legends are hiding on using resize.
I want the chart to be responsive on the screen size based on opening & closing of the side nav.
Side nav is on both left & right side.

Hey @garima, if you added a minimal reproducible example it would be easier to help you.

A bit of a guess, but this sounds very much like what some code that @aimped posted in another thread does. This code is set up to use Dash, but I think it should be adaptable to plotly.js