UNPKG

@adobe/react-spectrum-charts

Version:

Declarative library for composing Spectrum visualizations in React.

24 lines 1.08 kB
import { MutableRefObject, ReactNode } from 'react'; import { Signal, View } from 'vega'; import { Datum, MarkBounds } from '@spectrum-charts/vega-spec-builder'; interface ChartContextValue { chartView: MutableRefObject<View | undefined>; chartId: string; selectedData: MutableRefObject<Datum | null>; selectedDataName: MutableRefObject<string>; selectedDataBounds: MutableRefObject<MarkBounds>; isPopoverOpen: boolean; setIsPopoverOpen: (isOpen: boolean) => void; popoverAnchorRef: MutableRefObject<HTMLDivElement | null>; controlledHoveredIdSignal: MutableRefObject<Signal | undefined>; controlledHoveredGroupSignal: MutableRefObject<Signal | undefined>; } interface ChartProviderProps { children: ReactNode; chartId: string; chartView: MutableRefObject<View | undefined>; } export declare const ChartProvider: ({ children, chartId, chartView }: ChartProviderProps) => import("react/jsx-runtime").JSX.Element; export declare const useChartContext: () => ChartContextValue; export {}; //# sourceMappingURL=RscChartContext.d.ts.map