@visactor/react-vchart
Version:
The react version of VChart 4.x
26 lines (25 loc) • 1.58 kB
TypeScript
import type { IVChart, IData, IInitOption, ISpec, IVChartConstructor, IHierarchyData, IVChartRenderOption } from '@visactor/vchart';
import React from 'react';
import type { ContainerProps } from '../containers/withContainer';
import type { EventsProps, LegendEventProps, ScrollBarEventProps, BrushEventProps, DataZoomEventProps, PlayerEventProps, DimensionEventProps, HierarchyEventProps, ChartLifeCycleEventProps } from '../eventsUtils';
import type { IReactTooltipProps } from '../components/tooltip/interface';
export type ChartOptions = Omit<IInitOption, 'dom'>;
export interface BaseChartProps extends EventsProps, LegendEventProps, ScrollBarEventProps, BrushEventProps, DataZoomEventProps, PlayerEventProps, DimensionEventProps, HierarchyEventProps, ChartLifeCycleEventProps, IReactTooltipProps, ContainerProps {
vchartConstructor?: IVChartConstructor;
vchartConstrouctor?: IVChartConstructor;
type?: string;
container?: HTMLDivElement;
spec?: ISpec;
data?: IData | IHierarchyData;
width?: number;
height?: number;
options?: ChartOptions;
skipFunctionDiff?: boolean;
morphConfig?: IVChartRenderOption['morphConfig'];
onReady?: (instance: IVChart, isInitial: boolean) => void;
onError?: (err: Error) => void;
useSyncRender?: boolean;
}
type Props = React.PropsWithChildren<BaseChartProps>;
export declare const createChart: <T extends Props>(componentName: string, defaultProps?: Partial<T>, registers?: (() => void)[]) => React.ForwardRefExoticComponent<React.PropsWithoutRef<T> & React.RefAttributes<any>>;
export {};