UNPKG

@mui/x-charts

Version:

The community edition of the charts components (MUI X).

31 lines (30 loc) 959 B
import { DefaultizedProps } from '../helpers'; import { CartesianSeriesType, CommonSeriesType, CommonDefaultizedProps, StackableSeriesType } from './common'; export interface BarSeriesType extends CommonSeriesType<number>, CartesianSeriesType, StackableSeriesType { type: 'bar'; /** * Data associated to each bar. */ data?: number[]; /** * The key used to retrive data from the dataset. */ dataKey?: string; label?: string; /** * Layout of the bars. All bar should have the same layout. * @default 'vertical' */ layout?: 'horizontal' | 'vertical'; } /** * An object that allows to identify a single bar. * Used for item interaction */ export type BarItemIdentifier = { type: 'bar'; seriesId: DefaultizedBarSeriesType['id']; dataIndex: number; }; export interface DefaultizedBarSeriesType extends DefaultizedProps<BarSeriesType, CommonDefaultizedProps | 'color' | 'layout'> { }