import React, { ReactNode } from 'react'; import { ErrorBoundaryProps, FallbackProps } from 'react-error-boundary'; import { Dimension } from '@superset-ui/dimension'; import SuperChartCore, { Props as SuperChartCoreProps } from './SuperChartCore'; import DefaultFallbackComponent from './FallbackComponent'; import { ChartPropsConfig } from '../models/ChartProps'; export declare type FallbackPropsWithDimension = FallbackProps & Partial; export declare type WrapperProps = Dimension & { children: ReactNode; }; export declare type Props = Omit & Omit & { /** * Set this to true to disable error boundary built-in in SuperChart * and let the error propagate to upper level * and handle by yourself */ disableErrorBoundary?: boolean; /** debounceTime to check for container resize */ debounceTime?: number; /** Component to render when there are unexpected errors */ FallbackComponent?: React.ComponentType; /** Event listener for unexpected errors from chart */ onErrorBoundary?: ErrorBoundaryProps['onError']; /** Chart width */ height?: number | string; /** Chart height */ width?: number | string; /** * Component to wrap the actual chart * after the dynamic width and height are determined. * This can be useful for handling tooltip z-index, etc. * e.g.
* You cannot just wrap this same component outside of SuperChart * when using dynamic width or height * because it will clash with auto-sizing. */ Wrapper?: React.ComponentType; }; export default class SuperChart extends React.PureComponent { /** * SuperChart's core */ core?: SuperChartCore | null; private createChartProps; private parseDimension; static defaultProps: { FallbackComponent: typeof DefaultFallbackComponent; height: string | number; width: string | number; }; private setRef; renderChart(width: number, height: number): JSX.Element; render(): JSX.Element; } //# sourceMappingURL=SuperChart.d.ts.map