Overriding the default snapshot menu
To override the default snapshot sharing menu, input SnapshotMenuItems into the uiOverrides property in the ChartReactApp.
interface ChartSnapshotMenuItem {/*** unique key for dropdown item*/readonly key: string;readonly onSelect?: () => void;readonly icon?: React.ReactNode;/*** label will be rendered in the menu*/readonly label: string;}
The default snapshot sharing menu items are:
DEFAULT_SNAPSHOT_MENU_ITEMS: Array<SnapshotMenuItemDeclaration> = ['downloadImage','copyImage','copyLink','tweet','telegram',]
Example
Source code
import React from 'react';import { FlexContainer } from '../../../../../src/components/FlexContainer';import { ChartReactAppWrapper } from '../../../../../src/components/ChartReactApp';export const OverridingSnapshotOptions = () => {const overridenSnapshotItems = ['downloadImage', 'copyImage', 'copyLink'];return (<><FlexContainer $justifyContent={'flex-start'}><ChartReactAppWrapper uiOverrides={{ SnapshotMenuItems: overridenSnapshotItems }} /></FlexContainer></>);};