UNPKG

@mui/x-charts

Version:

The community edition of MUI X Charts components.

8 lines 878 B
import { createSelector } from '@mui/x-internals/store'; const selectInteraction = state => state.interaction; export const selectorChartsInteractionIsInitialized = createSelector(selectInteraction, interaction => interaction !== undefined); export const selectorChartsInteractionPointer = createSelector(selectInteraction, interaction => interaction?.pointer ?? null); export const selectorChartsInteractionPointerX = createSelector(selectorChartsInteractionPointer, pointer => pointer && pointer.x); export const selectorChartsInteractionPointerY = createSelector(selectorChartsInteractionPointer, pointer => pointer && pointer.y); export const selectorChartsLastInteraction = createSelector(selectInteraction, interaction => interaction?.lastUpdate); export const selectorChartsPointerType = createSelector(selectInteraction, interaction => interaction?.pointerType ?? null);