@mui/x-charts
Version:
The community edition of MUI X Charts components.
37 lines • 1.62 kB
text/typescript
import type { ChartPluginSignature } from "../../models/index.mjs";
import type { UseChartInteractionSignature } from "../useChartInteraction/index.mjs";
import type { UseChartCartesianAxisSignature } from "../useChartCartesianAxis/index.mjs";
import type { UseChartHighlightSignature } from "../useChartHighlight/index.mjs";
import type { FocusedItemIdentifier } from "../../../../models/seriesType/index.mjs";
import type { ChartSeriesType } from "../../../../models/seriesType/config.mjs";
export interface UseChartKeyboardNavigationInstance {}
export interface UseChartKeyboardNavigationState {
keyboardNavigation: {
/**
* The item with keyboard focus. It is `null` when no item is focused.
*/
item: null | FocusedItemIdentifier<ChartSeriesType>;
/**
* If `false` the focus is ignored, but we keep the item in the state to be able to restore it when focus is active again.
*/
isFocused: boolean;
/**
* Indicates whether keyboard navigation is enabled or not.
*/
enabled: boolean;
};
}
type UseChartKeyboardNavigationParameters = {
/**
* If `true`, disables keyboard navigation for the chart.
*/
disableKeyboardNavigation?: boolean;
};
export type UseChartKeyboardNavigationSignature = ChartPluginSignature<{
params: UseChartKeyboardNavigationParameters;
defaultizedParams: UseChartKeyboardNavigationParameters;
instance: UseChartKeyboardNavigationInstance;
state: UseChartKeyboardNavigationState;
optionalDependencies: [UseChartInteractionSignature, UseChartHighlightSignature<ChartSeriesType>, UseChartCartesianAxisSignature];
}>;
export {};