@mui/x-charts
Version:
The community edition of MUI X Charts components.
16 lines • 983 B
TypeScript
import type { HighlightItemIdentifierWithType } from "../models/seriesType/index.js";
import type { ChartSeriesType } from "../models/seriesType/config.js";
export type HighlightState = 'highlighted' | 'faded' | 'none';
type UseItemHighlightedReturnType = HighlightState;
type UseItemHighlightedParams<SeriesType extends ChartSeriesType = ChartSeriesType> = HighlightItemIdentifierWithType<SeriesType> | null;
/**
* A hook to check the highlighted state of the item.
* This function already calculates that an item is not faded if it is highlighted.
*
* If you need fine control over the state, use the `useItemHighlightStateGetter` hook instead.
*
* @param {HighlightItemIdentifierWithType<SeriesType> | null} item is the item to check
* @returns {HighlightState} the state of the item
*/
export declare function useItemHighlightState<SeriesType extends ChartSeriesType = ChartSeriesType>(item: UseItemHighlightedParams<SeriesType>): UseItemHighlightedReturnType;
export {};