Navigation

Embedded Chart Options

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 does not automatically refresh.

When you initially load or manually refresh the chart, MongoDB Charts renders the chart 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 using this data.

omitted or false
-1

The chart does not automatically refresh.

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

omitted or false
0

The chart does not automatically refresh.

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

omitted or false
Number greater than 0

The chart does not automatically refresh.

When you initially load or manually refresh the chart, MongoDB Charts renders the chart with data from the cache if the data younger than the maxDataAge value, in seconds. If 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 using this data.

true
omitted

The chart automatically refreshes every hour.

When you initially load, manually refresh, or automatically refresh the chart, MongoDB Charts renders the chart 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 using this data.

true
Number greater than or equal to 10

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

When you initially load, manually refresh, or automatically refresh the chart, MongoDB Charts renders the chart with data from the cache if the data younger than the maxDataAge value, in seconds. If 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 using this data.

true
Number less than 10

The chart automatically refreshes at the minimum period of 10 seconds.

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

Give Feedback

On this page