Atlas Charts
ATLAS
Atlas Charts
Easily create, share, and embed visualizations of real-time application data from MongoDB Atlas.
Atlas Charts offers multiple ways to embed visualizations, making it easy to uncover real-time insights from your application.
Easily embed charts and dashboards with iframes
An iframe is quick and easy to use, with customization options for sizing, refresh intervals, and display themes.
Chart
Dashboard
xxxxxxxxxx
<iframe style="background: #FFFFFF;border: none;border-radius: 2px;box-shadow: 0 2px 10px 0 rgba(70, 76, 79, .2);" width="640" height="480" src="https://charts.mongodb.com/CHARTSPROJECTNAME/embed/charts?id=MYCHARTID&maxDataAge=3600&theme=light&autoRefresh=true">
</iframe>
Enable rich customization with the embedding SDK
Customize chart titles, descriptions, axes, channels, colors, and conditional formatting—all through the SDK.
JavaScript
xxxxxxxxxx
import ChartsEmbedSDK from "@mongodb-js/charts-embed-dom";
async function renderChart() {
const sdk = new ChartsEmbedSDK({
baseUrl: "https://charts.mongodb.com/TENANTNAME"
});
const chart = sdk.createChart({
chartId: "CHARTID#"
});
await chart.render(document.getElementById("chart"));
document.getElementById("refresh")?.addEventListener('click', () => {
chart.refresh();
});
document.getElementById("my-filter")?.addEventListener('change', (event) => {
const country = event.target.value;
country
? chart.setFilter({ "filter-field": country })
: chart.setFilter({});
});
}
renderChart().catch(e => window.alert(e.message));
Add or create chart interactivity
Use the event handler to add interactivity to embedded charts. Click elements to view details, highlight data, or filter other charts.
JavaScript
xxxxxxxxxx
import ChartsEmbedSDK from "@mongodb-js/charts-embed-dom";
const sdk = new ChartsEmbedSDK({
baseUrl: "https://charts.mongodb.com/charts-embedding-examples-wgffp", // Optional: ~REPLACE~ with the Base URL from your Embed Chart dialog
});
const chart1 = sdk.createChart({
chartId: "CHARTID#", // Optional: ~REPLACE~ with the Chart ID from your Embed Chart dialog
height: "700px",
});
const chart2 = sdk.createChart({
chartId: "CHARTID#", // Optional: ~REPLACE~ with the Chart ID from your Embed Chart dialog
height: "700px",
});
const clickHandler = (payload) => {
chart1.setHighlight(payload.selectionFilter);
chart2.setFilter(payload.selectionFilter);
document.getElementById(
"filterMessage"
).innerText = `${payload.data.y.value} movies from the ${payload.data.color.lowerBound}s`;
};
async function renderCharts() {
await chart1.render(document.getElementById("chart1"));
await chart2.render(document.getElementById("chart2"));
const options = { includes: [{ roles: ["mark"] }] };

LIVE DATA VISUALIZATION
“Atlas Charts saved us from needing to create and deploy our own visualization dashboard app—on the order of weeks. It also helps us continuously. Every time we need a new visualization, we can do it on the order of minutes to hours rather than days.”
Doug Sappet
Engineering Manager, Meltwater
Engineering Manager, Meltwater
Learning hub
Find tutorials, videos, and other resources on data visualization and analytics.FAQ
What is Atlas Charts?
Do I need to move or duplicate data to use Atlas Charts?
What types of visualizations does Atlas Charts support?
How can I share and collaborate on dashboards?
Ready to get started?
Check out a tutorial and see how you can easily create, share, and embed visualizations of your MongoDB Atlas data with Charts.
GET STARTED TODAY
- Rich JSON visualization
- Embedded analytics
- Sharing and collaboration
- No user-based licensing
- Natural Language Mode