UNPKG

reaviz

Version:

Data Visualization using React

28 lines (27 loc) 1.02 kB
import { Dimensions } from '../utils'; import { LinearAxisDimensionChanged } from '../Axis'; export interface ChartContextProps extends Dimensions { /** * Unique id of the chart. */ id: string; /** * Whether the chart has reached its final size and is ready to render data. */ chartSized?: boolean; /** * Whether the Y axis has finished measuring itself. */ yAxisSized?: boolean; /** * Whether the X axis has finished measuring itself. */ xAxisSized?: boolean; /** * Callback fired when an axis reports a new dimension. */ updateAxes: (orientation: 'horizontal' | 'vertical', event: LinearAxisDimensionChanged) => void; } export declare const ChartContext: import('react').Context<Partial<ChartContextProps>>; export declare const ChartProvider: import('react').Provider<Partial<ChartContextProps>>, ChartConsumer: import('react').Consumer<Partial<ChartContextProps>>; export declare const useChart: () => Partial<ChartContextProps>;