import { Datasource } from '@superset-ui/query'; import { HandlerFunction, PlainObject } from '../types/Base'; import { QueryData, DataRecordFilters } from '../types/QueryResponse'; declare type AnnotationData = PlainObject; declare type SnakeCaseDatasource = PlainObject; declare type CamelCaseFormData = PlainObject; declare type SnakeCaseFormData = PlainObject; declare type RawFormData = CamelCaseFormData | SnakeCaseFormData; declare type ChartPropsSelector = (c: ChartPropsConfig) => ChartProps; /** Optional field for event handlers, renderers */ declare type Hooks = { /** * sync active filters between chart and dashboard, "add" actually * also handles "change" and "remove". */ onAddFilter?: (newFilters: DataRecordFilters, merge?: boolean) => void; /** handle errors */ onError?: HandlerFunction; /** use the vis as control to update state */ setControlValue?: HandlerFunction; /** handle tooltip */ setTooltip?: HandlerFunction; } & PlainObject; /** * Preferred format for ChartProps config */ export interface ChartPropsConfig { annotationData?: AnnotationData; /** Datasource metadata */ datasource?: SnakeCaseDatasource; /** * Formerly called "filters", which was misleading because it is actually * initial values of the filter_box and table vis */ initialValues?: DataRecordFilters; /** Main configuration of the chart */ formData?: RawFormData; /** Chart height */ height?: number; /** Programmatic overrides such as event handlers, renderers */ hooks?: Hooks; /** Formerly called "payload" */ queryData?: QueryData; /** Chart width */ width?: number; } export default class ChartProps { static createSelector: () => ChartPropsSelector; annotationData: AnnotationData; datasource: Datasource; rawDatasource: SnakeCaseDatasource; initialValues: DataRecordFilters; formData: CamelCaseFormData; rawFormData: RawFormData; height: number; hooks: Hooks; queryData: QueryData; width: number; constructor(config?: ChartPropsConfig); } export {}; //# sourceMappingURL=ChartProps.d.ts.map