Data has been referred to as the oil of the 21st century. If that’s true, then data visualization is the refinery that transforms raw information into actionable insights. MongoDB has always made it easy and flexible to work with data and recently made it painless to visualize your data with MongoDB Charts .
MongoDB Charts allows you analyze, understand, and take action on your data. You simply connect a MongoDB data source and within seconds are able to create powerful charts and graphs to gain insights into your data. This allows you to easily create dashboards such as the COVID-19 Tracker created by our own Maxime Beugnet .
Furthermore, your MongoDB Charts are not confined to your MongoDB Atlas instance. You can easily embed these charts in your applications and that’s exactly what we’re going to be doing today. The traditional way to work with MongoDB Charts outside of MongoDB Atlas has been to embed a code retrieved from the Atlas dashboard, but we developers often need more control and that’s where the MongoDB Charts JavaScript SDK comes in. This SDK is currently in beta, but already offers much greater flexibility versus just embedding. In this tutorial, we’ll learn how to both embed using the iframe approach as well as how to use the JavaScript SDK.