javascript – chart.js 5 graph in the same time

I’m using a chart.js v3.4.1 and I need to use multiple charts in the same page.

If I use the chart configuration in a javascript directly, it shows an error. The command line window.onload = function () {} resolve part of my problem. Because there is a filter in ajax that reload the page with new datas and the graphs does not update.

How could I do to update all the graphs with new datas using ajax?