@mui/x-charts
Version:
The community edition of MUI X Charts components.
15 lines (14 loc) • 472 B
JavaScript
import { selectorBrushState } from "../internals/plugins/featurePlugins/useChartBrush/index.js";
import { useStore } from "../internals/store/useStore.js";
/**
* Get the current brush state.
*
* - `start` is the starting point of the brush selection.
* - `current` is the current point of the brush selection.
*
* @returns `{ start, current }` - The brush state.
*/
export function useBrush() {
const store = useStore();
return store.use(selectorBrushState);
}