UNPKG

@superset-ui/core

Version:
59 lines 1.95 kB
import { PureComponent } from 'react'; import ChartProps from '../models/ChartProps'; import { PreTransformProps, TransformProps, PostTransformProps } from '../types/TransformFunction'; import { HandlerFunction } from '../types/Base'; declare function IDENTITY<T>(x: T): T; export type Props = { id?: string; className?: string; chartProps?: ChartProps | null; chartType: string; preTransformProps?: PreTransformProps; overrideTransformProps?: TransformProps; postTransformProps?: PostTransformProps; onRenderSuccess?: HandlerFunction; onRenderFailure?: HandlerFunction; }; export default class SuperChartCore extends PureComponent<Props, {}> { /** * The HTML element that wraps all chart content */ container?: HTMLElement | null; /** * memoized function so it will not recompute * and return previous value * unless one of * - preTransformProps * - transformProps * - postTransformProps * - chartProps * is changed. */ processChartProps: ((state: any) => any) & import("reselect").OutputSelectorFields<(args_0: ChartProps<import("@superset-ui/core").PlainObject>, args_1: any, args_2: any, args_3: any) => any> & { clearCache: () => void; }; /** * memoized function so it will not recompute * and return previous value * unless one of * - chartType * - overrideTransformProps * is changed. */ private createLoadableRenderer; static defaultProps: { id: string; className: string; preTransformProps: typeof IDENTITY; overrideTransformProps: undefined; postTransformProps: typeof IDENTITY; onRenderSuccess(): void; onRenderFailure(): void; }; private renderChart; private renderLoading; private setRef; render(): import("react").JSX.Element | null; } export {}; //# sourceMappingURL=SuperChartCore.d.ts.map