diff --git a/src/components/ChartKit.tsx b/src/components/ChartKit.tsx index 8cc8a40c..0dbaf0c7 100644 --- a/src/components/ChartKit.tsx +++ b/src/components/ChartKit.tsx @@ -18,7 +18,11 @@ type ChartKitComponentProps = Omit, 'on const ChartKitComponent = (props: ChartKitComponentProps) => { const widgetRef = React.useRef(); - const {instanceRef, id = getRandomCKId(), type, data, onLoad, isMobile, ...restProps} = props; + const {instanceRef, id: propsId, type, data, onLoad, isMobile, ...restProps} = props; + + const ckId = React.useMemo(() => getRandomCKId(), []); + const id = propsId || ckId; + const lang = settings.get('lang'); const plugins = settings.get('plugins'); const plugin = plugins.find((iteratedPlugin) => iteratedPlugin.type === type);