import { ChartDataset, ChartType } from 'chart.js'; import { CustomChartOptions } from './options'; import { StatisticBucket } from './response'; export interface StatisticRequestConfig { pageProvider: string; headers?: Record; params?: Record; propertyPath: string; bindLabel?: string; bindValue?: string; retryCount?: number; ignoreCache?: boolean; onQuery?: (data: Record) => Record; transformData?: (data: any, response?: any) => StatisticBucket[]; onError?: (error: Error) => void; } export type DataSourceConfig = Array<{ label?: string; colors?: string[]; config: StatisticRequestConfig[]; dataset?: Omit, 'data'>; }>; export type DataSourceResult = { results: StatisticBucket[]; meta: { label: string; colors?: string[]; dataset: CustomChartOptions; }; };