@mui/x-charts
Version:
The community edition of the Charts components (MUI X).
36 lines (35 loc) • 1.16 kB
TypeScript
import * as React from 'react';
import { SxProps, Theme } from '@mui/material/styles';
export declare function useNoData(): boolean;
export type CommonOverlayProps = React.SVGAttributes<SVGTextElement> & {
/**
* The message displayed by the overlay.
*/
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?: Partial<CommonOverlayProps>;
noDataOverlay?: Partial<CommonOverlayProps>;
}
export interface ChartsOverlayProps {
/**
* If `true`, a loading overlay is displayed.
*/
loading?: boolean;
slots?: ChartsOverlaySlots;
slotProps?: ChartsOverlaySlotProps;
}
export declare function ChartsOverlay(props: ChartsOverlayProps): React.JSX.Element | null;