UNPKG

@graphique/graphique

Version:

A data visualization system for React based on the Grammar of Graphics.

15 lines (12 loc) 307 B
import { atom } from 'jotai' import { XYScaleProps } from './types' interface XScaleProps extends XYScaleProps { isFixed?: boolean } export const xScaleState = atom<XScaleProps>({ numTicks: (width) => { if (width && width < 500) return 3 if (width < 800) return 5 return undefined }, })