UNPKG

@mui/x-charts

Version:

The community edition of MUI X Charts components.

39 lines 2.65 kB
import type { UseChartKeyboardNavigationSignature } from "./plugins/featurePlugins/useChartKeyboardNavigation/index.js"; import type { ChartState } from "./plugins/models/chart.js"; import type { ChartSeriesType } from "../models/seriesType/config.js"; import type { SeriesId, FocusedItemIdentifier } from "../models/seriesType/index.js"; type ReturnedItem<OutSeriesType extends ChartSeriesType> = { type: OutSeriesType; seriesId: SeriesId; dataIndex: number; } | null; type StateParameters<SeriesType extends ChartSeriesType> = Pick<ChartState<[UseChartKeyboardNavigationSignature], [], SeriesType>, 'series'>; export declare function createGetNextIndexFocusedItem<InSeriesType extends Exclude<ChartSeriesType, 'sankey' | 'heatmap'>, OutSeriesType extends Exclude<ChartSeriesType, 'sankey' | 'heatmap'> = InSeriesType>( /** * The set of series types compatible with this navigation action. */ compatibleSeriesTypes: Set<OutSeriesType>, /** * If true, allows cycling from the last item to the first one. */ allowCycles?: boolean): (currentItem: FocusedItemIdentifier<InSeriesType> | null, state: StateParameters<InSeriesType>) => ReturnedItem<OutSeriesType>; export declare function createGetPreviousIndexFocusedItem<InSeriesType extends Exclude<ChartSeriesType, 'sankey' | 'heatmap'>, OutSeriesType extends Exclude<ChartSeriesType, 'sankey' | 'heatmap'> = InSeriesType>( /** * The set of series types compatible with this navigation action. */ compatibleSeriesTypes: Set<OutSeriesType>, /** * If true, allows cycling from the last item to the first one. */ allowCycles?: boolean): (currentItem: FocusedItemIdentifier<InSeriesType> | null, state: StateParameters<InSeriesType>) => ReturnedItem<OutSeriesType>; export declare function createGetNextSeriesFocusedItem<InSeriesType extends Exclude<ChartSeriesType, 'sankey' | 'heatmap'>, OutSeriesType extends Exclude<ChartSeriesType, 'sankey' | 'heatmap'> = InSeriesType>( /** * The set of series types compatible with this navigation action. */ compatibleSeriesTypes: Set<OutSeriesType>): (currentItem: FocusedItemIdentifier<InSeriesType> | null, state: StateParameters<InSeriesType>) => ReturnedItem<OutSeriesType>; export declare function createGetPreviousSeriesFocusedItem<InSeriesType extends Exclude<ChartSeriesType, 'sankey' | 'heatmap'>, OutSeriesType extends Exclude<ChartSeriesType, 'sankey' | 'heatmap'> = InSeriesType>( /** * The set of series types compatible with this navigation action. */ compatibleSeriesTypes: Set<OutSeriesType>): (currentItem: FocusedItemIdentifier<InSeriesType> | null, state: StateParameters<InSeriesType>) => ReturnedItem<OutSeriesType>; export {};