Issues in handling charts via MongoDB Atlas (SDK Embedded)

Hi there. This issue may not necessarily directly regarding to the sdk setup/ main usage itself, is more to the minor details in which it might affect our app’s UX. I have two questions:

Q1: I noticed that the charts may take some time to initially load. Is there any way or is there any indication know that the charts fully loaded? This might help to handle the frontend so we could apply our own custom loading screen.

Q2: All of our charts is required to filter by date, so it makes sense that in certain dates there won’t be any data to process (eg: how many users registered to the app, we might not have any user registered within weeks and when filter to that specific week, the chart is simply blank). So, similarly to Q1, is there any indication that mongodb is returning empty data; so that we can do some kind of error handling our frontend?

Thank you in advance.

Hi @Nurain_Nabilah_Salehuddin -

  1. The chart’s render method returns a promise that resolves when the chart has loaded.

  2. You can call the getData method to retrieve the data used on the chart, and check if any documents were returned.

I have exactly the same problem. Anyone got a suggestion?
This article is really amazing and helpful.