✊🏿 Black Lives Matter. Please consider donating to Black Girls Code today.
🐇 Announcing Dash VTK for 3d simulation graphics. Check out the March webinar.

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:

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

Ideas?