Docs Menu

Docs HomeMongoDB Charts

Embedded Chart Options

On this page

  • Configure Refresh and Data Caching Behavior
  • Specify a Display Theme
  • Customize Display Options
  • Refresh and Data Caching Behavior

You can customize the appearance and behavior your embedded charts with a variety of options. Options are available to charts embedded with the Embedding SDK and embedded within iframes.

Note

To embed charts from your dashboards, you must configure embedding options on your data sources. For instructions, see Embed Charts in Your Web Application.

The following table describes how MongoDB Charts loads data from the cache when loading or refreshing the chart based on the autoRefresh and maxDataAge values.

autoRefresh Value
maxDataAge Value
MongoDB Charts Behavior
omitted or false
omitted

The chart or dashboard does not automatically refresh.

When you initially load or manually refresh the chart or dashboard, MongoDB Charts renders the chart or dashboard with data from the cache if the data is less than one hour old. If the data from the cache is more than one hour old, Charts queries the data source for the latest data, refreshes the cache, and renders the chart or dashboard using this data.

omitted or false
-1

The chart or dashboard does not automatically refresh.

When you initially load or manually refresh the chart or dashboard, MongoDB Charts renders the chart or dashboard using data from the cache. Charts queries the data source for the latest data only if the cache has no data for the chart or dashboard.

omitted or false
0

The chart or dashboard does not automatically refresh.

When you initially load or manually refresh the chart or dashboard, MongoDB Charts queries the data source for the latest data, and renders the chart or dashboard using this data. Charts doesn't read data from the cache.

omitted or false
Number greater than 0

The chart or dashboard does not automatically refresh.

When you initially load or manually refresh the chart or dashboard, MongoDB Charts renders the chart or dashboard with data from the cache if the age of the data is less than the maxDataAge value, in seconds. If the age of the data from the cache is older than the maxDataAge value, in seconds, Charts queries the data source for the latest data, refreshes the cache, and renders the chart or dashboard using this data.

true
omitted

The chart or dashboard automatically refreshes every hour.

When you initially load, manually refresh, or automatically refresh the chart or dashboard, MongoDB Charts renders the chart or dashboard with data from the cache if the age of the data is less than one hour old. If the age of the data from the cache is more than one hour old, Charts queries the data source for the latest data, refreshes the cache, and renders the chart or dashboard using this data.

true
Number greater than or equal to 60

The chart or dashboard automatically refreshes at the maxDataAge interval you specify, in seconds.

When you initially load, manually refresh, or automatically refresh the chart or dashboard, MongoDB Charts renders the chart or dashboard with data from the cache if the age of the data is less than the maxDataAge value, in seconds. If the age of the data from the cache is older than the maxDataAge value, in seconds, Charts queries the data source for the latest data, refreshes the cache, and renders the chart or dashboard using this data.

true
Number less than 60

The chart or dashboard automatically refreshes at the minimum period of 60 seconds.

When you initially load, manually refresh, or automatically refresh the chart or dashboard, MongoDB Charts renders the chart or dashboard with data from the cache if the age of the data is less than the minimum maxDataAge value of 60 seconds. If the age of the data data from the cache is older than 60 seconds, Charts queries the data source for the latest data, refreshes the cache, and renders the chart or dashboard using this data.

←  Embed Charts with the Embedding SDKFilter Embedded Charts →
Share Feedback
© 2023 MongoDB, Inc.

About

  • Careers
  • Investor Relations
  • Legal Notices
  • Privacy Notices
  • Security Information
  • Trust Center
© 2023 MongoDB, Inc.