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
- From the MongoDB Atlas dashboard, go to the Charts tab.
- If you haven't used Charts before, click the Activate Now button. This process takes about 1 minute.
- Once activated, you'll see a new dashboard. Click the dashboard name to open it.
Creating a Chart
To create a new chart:
- Click the Add Chart button.
- 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:
- Under Data Source, select the
Movies
collection. - Drag the
Year
field to the Y Axis field and set the Bin Size to 1. - 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.