import { AxisScale } from '@visx/axis'; import { ResizeObserverPolyfill } from '@visx/responsive/lib/types'; import { ScaleTypeToD3Scale, ScaleInput } from '@visx/scale'; import DataRegistry from '../classes/DataRegistry'; import { XYChartTheme } from './theme'; export declare type Margin = { top: number; right: number; bottom: number; left: number; }; export declare type LegendShape = 'rect' | 'line' | 'dashed-line' | 'circle'; export interface DataRegistryEntry { /** unique data key */ key: string; /** array of data for the key. */ data: Datum[]; /** function that returns the x value of a datum. */ xAccessor: (d: Datum) => ScaleInput; /** function that returns the y value of a datum. */ yAccessor: (d: Datum) => ScaleInput; /** whether the entry supports mouse events. */ mouseEvents?: boolean; /** Optionally update the xScale. */ xScale?: (xScale: Scale) => Scale; /** Optionally update the yScale. */ yScale?: (yScale: Scale) => Scale; /** Legend shape for the data key. */ legendShape?: LegendShape; } export interface DataContextType { xScale: XScale; yScale: YScale; colorScale: ScaleTypeToD3Scale['ordinal']; width: number; height: number; innerWidth: number; innerHeight: number; margin: Margin; dataRegistry: Omit, 'registry' | 'registryKeys'>; registerData: (data: DataRegistryEntry | DataRegistryEntry[]) => void; unregisterData: (keyOrKeys: string | string[]) => void; setDimensions: (dims: { width: number; height: number; margin: Margin; }) => void; theme: XYChartTheme; horizontal: boolean; resizeObserverPolyfill?: ResizeObserverPolyfill; } //# sourceMappingURL=data.d.ts.map