import { type AnyType } from '../types/any';
import { Format } from '../types/field';
import { type Organization } from '../types/organization';
import { type RawResultRow } from '../types/results';
import { CartesianSeriesType, ChartKind } from '../types/savedCharts';
import { type SqlRunnerQuery } from '../types/sqlRunner';
import { StackType, VizIndexType, type AxisSide, type PivotChartData, type PivotChartLayout, type VizCartesianChartConfig, type VizCartesianChartOptions } from './types';
import { type IResultsRunner } from './types/IResultsRunner';
type CartesianChartKind = Extract<ChartKind, ChartKind.LINE | ChartKind.VERTICAL_BAR>;
export declare enum ValueLabelPositionOptions {
    HIDDEN = "hidden",
    TOP = "top",
    BOTTOM = "bottom",
    LEFT = "left",
    RIGHT = "right",
    INSIDE = "inside"
}
export declare class CartesianChartDataModel {
    private readonly resultsRunner;
    private readonly fieldConfig;
    private readonly type;
    private pivotedChartData;
    constructor(args: {
        resultsRunner: IResultsRunner;
        fieldConfig?: PivotChartLayout;
        type?: CartesianChartKind;
    });
    static getTooltipFormatter(format: Format | undefined): ((value: number) => string) | undefined;
    static getValueFormatter(format: Format | undefined, isStack100?: boolean): ((params: AnyType) => string) | undefined;
    mergeConfig(chartKind: CartesianChartKind, existingConfig: VizCartesianChartConfig | undefined): VizCartesianChartConfig;
    getChartOptions(): VizCartesianChartOptions;
    getDefaultLayout(): PivotChartLayout | undefined;
    getConfigErrors(fieldConfig?: PivotChartLayout): {
        groupByFieldError?: {
            references: string[];
        } | undefined;
        customMetricFieldError?: {
            references: string[];
        } | undefined;
        metricFieldError?: {
            references: string[];
        } | undefined;
        indexFieldError?: {
            reference: string;
        } | undefined;
    } | undefined;
    static getDefaultColor(index: number, orgColors?: string[]): string;
    getTransformedData(query?: SqlRunnerQuery): Promise<PivotChartData | undefined>;
    getPivotedChartData({ sortBy, filters, limit, sql, }: Pick<SqlRunnerQuery, 'sortBy' | 'filters' | 'limit' | 'sql'>): Promise<PivotChartData | undefined>;
    getPivotedTableData(): {
        columns: string[];
        rows: RawResultRow[];
    } | undefined;
    getDataDownloadUrl(): string | undefined;
    private static convertToPercentageStacking;
    getSpec(display?: CartesianChartDisplay, colors?: Organization['chartColors']): Record<string, AnyType>;
}
export type CartesianChartDisplay = {
    xAxis?: {
        label?: string;
        type?: VizIndexType;
        dateFormat?: string;
    };
    yAxis?: {
        label?: string;
        position?: string;
        format?: Format;
    }[];
    series?: {
        [key: string]: {
            label?: string;
            format?: Format;
            yAxisIndex?: number;
            color?: string;
            type?: CartesianSeriesType.LINE | CartesianSeriesType.BAR;
            valueLabelPosition?: ValueLabelPositionOptions;
            whichYAxis?: AxisSide;
        };
    };
    legend?: {
        position: 'top' | 'bottom' | 'left' | 'right';
        align: 'start' | 'center' | 'end';
    };
    stack?: boolean | StackType;
};
export {};
//# sourceMappingURL=CartesianChartDataModel.d.ts.map