@mui/x-charts
Version:
The community edition of MUI X Charts components.
47 lines • 1.62 kB
TypeScript
import * as React from 'react';
import { SxProps, Theme } from '@mui/material/styles';
import { SlotComponentPropsFromProps } from '@mui/x-internals/types';
export declare function useNoData(): boolean;
export type CommonOverlayProps = React.SVGAttributes<SVGTextElement> & {
/**
* The message displayed by the overlay.
* @deprecated The customization of the message should be done with the localization key `loading` and `noData`.
* @see See {@link https://mui.com/x/react-charts/localization/ localization docs} for more details.
*/
message?: string;
sx?: SxProps<Theme>;
};
export interface ChartsOverlaySlots {
/**
* Overlay component rendered when the chart is in a loading state.
* @default ChartsLoadingOverlay
*/
loadingOverlay?: React.ElementType<CommonOverlayProps>;
/**
* Overlay component rendered when the chart has no data to display.
* @default ChartsNoDataOverlay
*/
noDataOverlay?: React.ElementType<CommonOverlayProps>;
}
export interface ChartsOverlaySlotProps {
loadingOverlay?: SlotComponentPropsFromProps<CommonOverlayProps, {}, {}>;
noDataOverlay?: SlotComponentPropsFromProps<CommonOverlayProps, {}, {}>;
}
export interface ChartsOverlayProps {
/**
* If `true`, a loading overlay is displayed.
* @default false
*/
loading?: boolean;
/**
* Overridable component slots.
* @default {}
*/
slots?: ChartsOverlaySlots;
/**
* The props used for each component slot.
* @default {}
*/
slotProps?: ChartsOverlaySlotProps;
}
export declare function ChartsOverlay(props: ChartsOverlayProps): React.JSX.Element | null;