UNPKG

@tanstack/charts

Version:

<div align="center"> <picture> <source media="(prefers-color-scheme: dark)" srcset="https://tanstack.com/api/readme/charts.png?theme=dark" /> <source media="(prefers-color-scheme: light)" srcset="https://tanstack.com/

16 lines (15 loc) 861 B
import type { ChartMotionPhase, ChartMotionRole, ChartMotionTiming } from './types.js'; export interface ChartMotionStaggerOptions { /** Index used to calculate the delay. Defaults to `datum`. */ by?: 'datum' | 'series'; /** Milliseconds between adjacent entries. */ each: number; /** Fixed milliseconds before the first entry. Defaults to zero. */ offset?: number; /** Restricts staggering to one or more lifecycle phases. Defaults to `enter`. */ phase?: ChartMotionPhase | readonly ChartMotionPhase[]; /** Restricts staggering to one or more semantic roles. */ roles?: ChartMotionRole | readonly ChartMotionRole[]; } /** Creates a delay timing field that composes through object spread. */ export declare function stagger<TDatum = unknown>(options: ChartMotionStaggerOptions): Pick<ChartMotionTiming<TDatum>, 'delay'>;