Chart.js responsive property and container dimension synchronization
0 reputation · 12 Jul 2021, 10:26 UTC
The internal animation loop monitors for size changes, but it requires a bounding box to exist at the moment of initialization. If the container's dimensions are determined dynamically via asynchronous content or late CSS application, the chart may fail to synchronize its internal state with the actual DOM layout.
-
How does Chart.js handle initialization scenarios where the parent container reports zero dimensions during the first constructor call?
- Is there a specific configuration to prevent recursive resize events when the container uses a flex-based layout?