This project adheres to Semantic Versioning.
- Set customizations for an embedded chart with
setRenderingSpecOverride
method. - Set customizations for an embedded chart for the initial render with
renderingSpec
property inEmbedChartOptions
. - Get customizations set on an embedded chart with
getRenderingSpecOverride
method. - Get chart channels for an embedded chart with
getChannels
method. - Get customizable chart axes for an embedded chart with
getCustomizableAxes
method.
- Set customizations for an embedded chart with
setRenderingSpecOverride
method. - Set customizations for an embedded chart for the initial render with
renderingSpec
property inEmbedChartOptions
. - Get customizations set on an embedded chart with
getRenderingSpecOverride
method. - Get chart channels for an embedded chart with
getChannels
method. - Get customizable chart axes for an embedded chart with
getCustomizableAxes
method.
- Get an image of an embedded dashboard by using the new
getImage()
method to get PNG inbase64
orbinary
encoding - Get the chart data from an embedded dashboard chart by using the new method
getData()
for dashboard charts - Added a new
charts
field in the dashboard embedding options forcreateDashboard()
that allows you to configure the charts individually in an embedded dashboard. For now, you can specify a different filter for every chart in the embedded dashboard.
- Get an image of an embedded dashboard by using the new
getImage()
method to get PNG inbase64
orbinary
encoding - Get the chart data from an embedded dashboard chart by using the new method
getData()
for dashboard charts - Added a new
charts
field in the dashboard embedding options forcreateDashboard()
that allows you to configure the charts individually in an embedded dashboard. For now, you can specify a different filter for every chart in the embedded dashboard.
- Minimum
refresh tolerance
whenautoRefresh
is enabled for embedded chart and dashboard is increased from 10 seconds to 60 seconds. Please see API doc for more information underRefresh Tolerance
section. setFilter
method for embedded chart and dashboard now will only accept aJavaScript plain object
with valid query operators. If an array is supplied, an exception will be raised.- The return format of
getFilter
andgetHighlight
methods for embedded chart is updated from EJSON to deserialised EJSON. E.g.{ beds: {$gt: {$numberInt: '2'}}}
will now become{ beds: {$gt: 2}}
.
-
Dashboard
- You can now set filter on a dashboard level for embedded dashboard through:
setFilter
method for embedded dashboard.filter
option during embedded dashboard initialisation
- Added
getFilter
method to retrieve the current filter set to the embedded dashboard
- You can now set filter on a dashboard level for embedded dashboard through:
getImage
method to get png of the embedded chart inbase64
orbinary
encoding.Table Chart
is not supported for this method.
- Minimum
refresh tolerance
whenautoRefresh
is enabled for embedded chart and dashboard is increased from 10 seconds to 60 seconds. Please see API doc for more information underRefresh Tolerance
section. setFilter
method for embedded chart and dashboard now will only accept aJavaScript plain object
with valid query operators. If an array is supplied, an exception will be raised.- The return format of
getFilter
andgetHighlight
methods for embedded chart is updated from EJSON to deserialised EJSON. E.g.{ beds: {$gt: {$numberInt: '2'}}}
will now become{ beds: {$gt: 2}}
.
-
Dashboard
- You can now set filter on a dashboard level for embedded dashboard through:
setFilter
method for embedded dashboard.filter
option during embedded dashboard initialisation
- Added
getFilter
method to retrieve the current filter set to the embedded dashboard
- You can now set filter on a dashboard level for embedded dashboard through:
-
Dashboard Chart
- N/A
getImage
method to get png of the embedded chart inbase64
orbinary
encoding.Table Chart
is not supported for this method.
- Security patch to update
jsonwebtoken
package version tov9.0.0
.
- Set/Get a filter for a chart in an embedded dashboard.
setFilter
andgetFilter
for embedded dashboard charts.
- Set/Get a highlight for a chart in an embedded dashboard.
setHighlight
andgetHighlight
for embedded dashboard charts
- Add support for authenticated chart and dashboard embedding with
realm-web
SDK.
- Set or get a highlight for a chart in an embedded dashboard with the new methods we added -
setHighlight
andgetHighlight
for embedded dashboard charts
- Added support for authenticated embedding with
realm-web
SDK
- Set or get a filter for a chart in an embedded dashboard with the new methods we added -
setFilter
andgetFilter
for embedded dashboard charts.
- Embed dashboard in authenticated or unauthenticated way by using
sdk.createDashboard
- Added support for getting chart data via
chart.getData()
- Added functionality to embed dashboard
- Subscribe to click events on an embedded chart using
chart.addEventListener
. Thepayload
parameter in the event callback contains details on the chart element clicked. - Apply a highlight on an embedded chart using
chart.setHighlight
- Improved performance for authenticated embedded charts, by eliminating redundant API calls.
- Added the ability to filter click events by role to ensure the "hand" mouse cursor only appears over interactive elements.
- Improved performance for authenticated embedded charts, by eliminating redundant API calls.
- fix: Publish the UMD bundle of
@mongodb-js/charts-embed-dom
that was mistakenly omitted from thev2.0.0
release.
Changed the Content-Security-Policy (CSP) of the iframe
created by the SDK to include the following sandbox
directive flags:
allow-popups
: Allows popups to function (eg:window.open
,target="_blank"
).allow-popups-to-escape-sandbox
: Allows a sandboxed document to open new windows without forcing the sandboxing flags upon them.
This change fixes the issue that prevented hyperlinks within the iframe
document from opening a new tab/window. While this change does not change an explicit SDK API, it does change the implicit behaviour of the security model, and therefore warranted a major version bump.
- Subscribe to click events on a chart using
chart.addEventListener('click', eventHandler);
Thepayload
parameter in the event callback contains details on the chart element clicked. In this beta release, not all chart types are supported, and the payload format is subject to change.
- Fixed an issue (#14) where types for
mongodb-stitch-browser-sdk
were missing causing builds with TSC to fail.
In this release, we've added generated API docs to the NPM package bundle in the docs
folder. We've also corrected some minor typos and omissions in the README.
- We fixed a minor bug in the
maxAgeData
prop where it would ignore when the prop was set to0
. This resulted in cached data still being served to the client.
We've now added an example rollup.config.js
to the package README to help Rollup users get started with the SDK.
In the latest Charts cloud release, we’ve given developers more control over the caching and refresh behaviour, which can improve performance and user experience. The new maxDataAge
option allows you to specify when data should be retrieved from the cache or re-queried from the database. This can also be combined with the autoRefresh
option to ensure charts are always kept current.
Note: as part of this change, we have deprecated the refreshInterval
property, as the same functionality is accessible through the new autoRefresh
and maxDataAge
properties.
- Moved
ts-node
to a dev-dependency
- 🎉 First release of the Charts Embedding SDK
- 🛠 Dynamically set the current theme, refresh interval, and filter
- 🔒 Support for embedding authentication providers (Custom / Realm / Google)
We're excited to show you the first v1.0.0 release of the embedding SDK. For comprehensive documentation and guides, head on over to https://github.com/mongodb-js/charts-embed-sdk, or https://docs.mongodb.com/charts/master/embedding-charts-sdk/.
The SDK unlocks interactivity in your charts that simply wasn't possible with IFrame embedding.
- You can now dynamically toggle between dark mode using
setTheme
- Adjust how frequently your chart refreshes using
setRefreshInterval
- Control what data is shown in your chart using
setFilter
You can now control who can view your embedded charts by enabling authenticated embedding. With this setting enabled, you will need to pass in a function to getUserToken
that returns a JWT with claims
representing the user attempting to view the Chart. For more information, check out our authenticated embedding example here: https://github.com/mongodb-js/charts-embed-sdk/tree/master/examples/charts/authenticated-custom-jwt