Forum Academy Marketplace Showcase Pricing Features

How do I know when the data loading is complete?

Hi bubblers,

Your help is very much appreciated!

My app is using Chart JS plugin to generate some statistical visualizations, and data for these comes from MongoDB queries that are run through API connector in Bubble. The problem is that some queries take quite a long time to complete (10-20 seconds), and while they are running in the background my charts are still showing data from the previous request. This definitely breaks the UX, it would be awesome to show some kind of a loader while the data is not ready.

How would you approach this? Charts JS does not seem to expose any events like “Data is loaded” as RGs may do.