I'm trying to use ChartJs in LWC, I took the last 3.3.2 version and followed several examples in order to create my chart (here one of the most complete example I found), but when invoking the instruction:
this.chart = new window.Chart(ctx, config);
I get the error "TypeError: ResizeObserver is not a constructor".
I tried to replace the ChartJs resource with older versions, and I found with the version 2.8.0 the chart is correctly loaded without any error.
Since from documentation is specified the 3.x version introduces several improvements, so I would prefer to use a recent version instead of the 2.8.0. I've tried also to search some info about the ResizeObserver but I didn't understand what is and why I have problems with it. From LWC it seems I haven't to import anything else.
Is there a way to resolve this problem?