@mui/x-charts
Version:
The community edition of MUI X Charts components.
39 lines • 2.58 kB
TypeScript
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 { FocusedItemIdentifier, SeriesId, SeriesItemIdentifier } from "../models/seriesType/index.js";
type ReturnedItem<OutSeriesType extends ChartSeriesType> = {
type: OutSeriesType;
seriesId: SeriesId;
dataIndex: number;
} | null;
type StateParameters<TSeriesType extends ChartSeriesType> = Pick<ChartState<[UseChartKeyboardNavigationSignature], [], TSeriesType>, 'series'>;
export declare function createGetNextIndexFocusedItem<InSeriesType extends Exclude<ChartSeriesType, 'sankey'>, OutSeriesType extends Exclude<ChartSeriesType, 'sankey'> = 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'>, OutSeriesType extends Exclude<ChartSeriesType, 'sankey'> = 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: SeriesItemIdentifier<InSeriesType> | null, state: StateParameters<InSeriesType>) => ReturnedItem<OutSeriesType>;
export declare function createGetNextSeriesFocusedItem<InSeriesType extends Exclude<ChartSeriesType, 'sankey'>, OutSeriesType extends Exclude<ChartSeriesType, 'sankey'> = InSeriesType>(
/**
* The set of series types compatible with this navigation action.
*/
compatibleSeriesTypes: Set<OutSeriesType>): (currentItem: SeriesItemIdentifier<InSeriesType> | null, state: StateParameters<InSeriesType>) => ReturnedItem<OutSeriesType>;
export declare function createGetPreviousSeriesFocusedItem<InSeriesType extends Exclude<ChartSeriesType, 'sankey'>, OutSeriesType extends Exclude<ChartSeriesType, 'sankey'> = InSeriesType>(
/**
* The set of series types compatible with this navigation action.
*/
compatibleSeriesTypes: Set<OutSeriesType>): (currentItem: SeriesItemIdentifier<InSeriesType> | null, state: StateParameters<InSeriesType>) => ReturnedItem<OutSeriesType>;
export {};