> This page location: /docs.md > /docs/development.md > /docs/charts.md

> For the complete MongoDB documentation index, see www.mongodb.com/docs/llms.txt

# Data Sources

A data source in Atlas Charts references one of the following:

- A [collection](https://www.mongodb.com/docs/manual/core/databases-and-collections.md#std-label-collections) or database [view](https://www.mongodb.com/docs/manual/core/views.md#std-label-views-landing-page) in your MongoDB deployment.

- A [charts view](https://www.mongodb.com/docs/charts/create-manage-charts-view.md#std-label-data-sources-pipeline) that you create using a collection.

You can use the fields in the data source to construct a chart. When you build a chart, you must specify the data source that the chart uses.

Deployments in Atlas Charts reference Atlas deployments that contain valid Charts data sources, including:

- All [clusters](https://www.mongodb.com/docs/atlas/create-database-deployment/) in your Atlas project for which you have the [`Project Data Access Read Only`](https://docs.atlas.mongodb.com/reference/user-roles/#mongodb-authrole-Project-Data-Access-Read-Only) role or higher.

- All [federated database instances](https://www.mongodb.com/docs/atlas/data-federation/) in your project, including [Online Archives.](https://www.mongodb.com/docs/atlas/online-archive/manage-online-archive/)

## Connect or Disconnect Data Sources and Deployments

An Atlas [`Project Owner`](https://docs.atlas.mongodb.com/reference/user-roles/#mongodb-authrole-Project-Owner) can connect or disconnect data sources and deployments. To learn more, see [Manage Data Sources.](https://www.mongodb.com/docs/charts/manage-data-sources.md#std-label-connect-disconnect-data-source)

**Note:**

Charts connects to all deployments and data sources in your project by default.

## Manage Data Sources

To manage settings for a data source, see [Manage Data Sources](https://www.mongodb.com/docs/charts/manage-data-sources.md#std-label-manage-existing-data-sources). To manage pipelines, see [Create and Manage Charts Views.](https://www.mongodb.com/docs/charts/create-manage-charts-view.md#std-label-data-sources-pipeline)

**Note:**

To apply a pipeline, use a charts view. You can't apply pipelines to an entire collection.

## Manage Deployments

To manage settings for the Atlas deployments that contain your data sources, see [Manage Deployments.](https://www.mongodb.com/docs/charts/manage-deployment.md#std-label-manage-deployment)

## Edit a Chart's Data Source

To edit the data source for an existing chart:

1. Go to the Dashboards page.

   For instructions, see [Dashboards.](https://www.mongodb.com/docs/charts/dashboards.md#std-label-dashboards)

2. Select your dashboard.

   From the Dashboards page, select the dashboard that contains the chart.

3. Click Edit on the chart you want to edit.

4. Click the button under Data Source on the top left of the chart builder.

   The button says Select if you have not selected a data source, or it says the name of the currently selected data source.

5. Click the Project tab.

   All of your connected deployments appear.

   **Note:**

   A deployment and its data sources won't display on the Select Data Source modal unless they are connected to Charts. Only a [`Project Owner`](https://docs.atlas.mongodb.com/reference/user-roles/#mongodb-authrole-Project-Owner) can [connect or disconnect](https://www.mongodb.com/docs/charts/manage-data-sources.md#std-label-connect-disconnect-data-source) deployments and data sources. All deployments and data sources in the project connect to Charts by default.

6. Click the name of the deployment that contains the data source.

7. Click the name of the database that contains the data source.

   The database's data sources appear. You can click on a data source's name to view a preview of its data.

8. Click Select on the data source.

To learn how to set the data source for a new chart, see [Build Charts.](https://www.mongodb.com/docs/charts/build-charts.md#std-label-build-charts)

## Try Out Charts with the Sample Data Source

Charts automatically includes the Sample Data: Movies data source in all Charts tenants. The [Sample Dashboard](https://www.mongodb.com/docs/charts/dashboards.md#std-label-sample-dashboard) uses this data source to show the charts you can create. You can access the sample data source from all dashboards.

You can't:

- Add, edit, or delete the data in the Sample Data: Movies data source.

- Remove the sample data source.

- Externally share or [embed](https://www.mongodb.com/docs/charts/embedding-charts.md#std-label-embedding-charts) charts that use the sample data.
