Angular plotly component resize when parent div size changes

On a previous project, I was using Plotly.js directly and had no problems controlling the element size. With the Angular component, I can’t seem to be able to trigger the resizing when the window or parent div size changes.

I am adding plots using *ngFor, and the divs under my control are fine, but the Plotly.js elements don’t shrink.

I’m using flexbox for layout, and have the following set on the Plotly Angular component:

[style]="{position: ‘relative’, width: ‘100%’, height: ‘100%’}"


1 Like

Hi, I am looking for a solution to the same problem… did you able to fix it?