-
Notifications
You must be signed in to change notification settings - Fork 30
Closed as not planned
Labels
enhancementNew feature or requestNew feature or request
Description
Describe the bug
destroyChart and destroyDashboard functions does not exists. How can I destroy these charts.
import React, { useLayoutEffect, useRef} from 'react';
import ChartsEmbedSDK from '@mongodb-js/charts-embed-dom';
export const App() {
const divRef = useRef(document.createElement('div'));
useLayoutEffect(() => {
const sdk = new ChartsEmbedSDK({
baseUrl: 'https://charts.mongodb.com/charts-chartsss-ktjra',
});
const chart = sdk.createChart({
chartId: '137cc4ba-09cb-413e-2226-9e119ff05343',
getUserToken: () => window.prompt('Type your token') || ''
});
chart.render(divRef.current);
return () => {
// I need to destroy the chart over here
}
}, [])
return (
<div className='chart' ref={divRef}></div>
)
}Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request