SWE-PolyVision / tasks /chartjs__Chart.js-4774 /problem_statement.txt
jiajunwu1's picture
SWE-PolyVision public task set (48 tasks): statements, assets and environment only
45721da
Raw History Blame Contribute Delete
581 Bytes
[2.7] Lost responsive after destroy recreate
If some options have changed, I destroy the chart then create a new one.
```
if (chart) chart.destroy()
chart = new Chart(...)
```
Since 2.7, the div which handle resize detection is removed but is not re-created.
No problem with the iframe in 2.6
## Relevant pre-fix discussion
### Issue #4737
#### Comment at 2017-09-11T10:32:15Z
@simonbrunel your jsfiddle reproduce the issue perfectly
Initial :
![image](assets/chartjs__Chart.js-4774/001.png)
After click on recreate :
![image](assets/chartjs__Chart.js-4774/002.png)