Allow export/download of chart data once embedded into an application.
Allow export/download of chart data once embedded into an application. It seems like currently, you can only view on screen in the application and you can only download the chart data if you are in MongoDB Atlas.
The latest version of the SDK supports a "getData()" method, allowing you to programmatically access a chart's data in JSON format.
-
AdminTom (Product Manager, MongoDB) commented
Hi Andre, we completed this feature a long time ago. The API returns the data as JSON but you can use your own libraries or code to convert it to CSV if desired.
-
Andre commented
Hi was there any update as to the ability to export data from charts once they are embedded into our application as csv etc? thanks
-
AdminTom (Product Manager, MongoDB) commented
We plan to add this in the SDK before too long, but I can't provide a timeline now. However, if you're keen it is actually possible to do this already.
If you look at the network traffic for rendering a chart (for example, https://charts.mongodb.com/charts-tomh-yfpqi/embed/charts?id=ed1cc666-850e-4f42-8b58-b6c85424ac36) you'll see a request that returns the JSON data (in this case, https://us-east-1.aws.webhooks.mongodb-realm.com/api/client/v2.0/app/charts-tomh-yfpqi/service/http/incoming_webhook/embedding?tolerance=3600&id=ed1cc666-850e-4f42-8b58-b6c85424ac36)
So you can invoke this endpoint to download the data as JSON. The SDK changes will likely just be a friendly wrapper over the same.
-
Iulian commented
Can we have a timeframe when this feature will be available?