Creating Visualizations with MongoDB Charts

Learn how to use MongoDB Charts to create interactive and informative visualizations of your data. This guide will cover the basic setup process and explore the various chart types available in MongoDB Charts.



MongoDB Charts

MongoDB Charts allows you to visualize your data in an intuitive and straightforward manner.

MongoDB Charts Setup

  1. From the MongoDB Atlas dashboard, go to the Charts tab.
  2. If you haven't used Charts before, click the Activate Now button. This process takes about 1 minute.
  3. Once activated, you'll see a new dashboard. Click the dashboard name to open it.

Creating a Chart

To create a new chart:

  1. Click the Add Chart button.
  2. Select the data sources you want to use.

Example: Visualizing Movie Releases

In this example, we'll use the sample_mflix database and visualize the number of movies released each year:

  1. Under Data Source, select the Movies collection.
  2. Drag the Year field to the Y Axis field and set the Bin Size to 1.
  3. Drag the _id field to the X Axis field and select COUNT for the Aggregate.

You should now see a bar chart displaying the number of movies released in each year.