import type { DashboardVizProps, DataSource, VizConfig } from '../interfaces'; import { ChartEvent } from '../interfaces/ChartEvent'; export declare const convertToArrOfObjects: (columns: (string | any[])[], fields: any[]) => any[]; export type DownsampleOptions = { threshold: number; } & Pick; export declare const isDownsamplingEnabledForViz: ({ vizConfig }: { vizConfig: VizConfig; }) => boolean; export declare const calculateThresholdOnRangeSelect: ({ firstIndex, lastIndex, dataSources, width, }: Pick & { firstIndex: number; lastIndex: number; width: number | string; }) => number; /** * Calculates the downsampling threshold based on the range selection. If search zoom is enabled or there is no selection, * then returns the width of the visualization. * * Otherwise calculates the threshold based on the ratio of the window selected compared to the size of the non-downsampled * data sources. Returns null if the chart event's dataset does not match the passed in primary data source or if the chart is zoomed * in for a categorical chart. */ export declare const calculateDownsamplingThreshold: ({ enableSearchZoom, dataSources, selectChartEvent, width, xField, }: { enableSearchZoom: boolean; dataSources: Record | null; selectChartEvent: ChartEvent<"chartRangeSelect"> | null; width: number; xField: string; }) => number | null; export declare const downsampleDataSources: ({ dataSources, threshold, options }: DownsampleOptions) => Record; //# sourceMappingURL=dataUtils.d.ts.map