import { ChartType, type ChartConfig } from '../types/savedCharts';
/**
 * Input for detecting unused dimensions in a cartesian chart.
 */
export type UnusedDimensionsInput = {
    /** The chart configuration */
    chartType: ChartType;
    /** The chart config object (contains layout for cartesian charts) */
    chartConfig: ChartConfig['config'] | undefined;
    /** Pivot/group by dimension field IDs */
    pivotDimensions: string[];
    /** All dimension field IDs in the metric query */
    queryDimensions: string[];
};
/**
 * Detects dimensions in the query that are not used in the chart configuration.
 *
 * For cartesian charts, dimensions should be used in one of:
 * - x-axis (xField)
 * - y-axis (yField) - though typically metrics go here
 * - group by / pivot (pivotDimensions)
 *
 * If a dimension is in the query but not used in any of these places,
 * it may cause incorrect results when using backend pivoting.
 *
 * @returns Array of unused dimension field IDs, or empty array if none
 */
export declare function getUnusedDimensions(input: UnusedDimensionsInput): {
    unusedDimensions: string[];
};
/**
 * Checks if a chart has unused dimensions that may cause incorrect results.
 * This is a convenience wrapper around getUnusedDimensions.
 */
export declare function hasUnusedDimensions(input: UnusedDimensionsInput): boolean;
/**
 * Input for detecting unused table calculations in a cartesian chart.
 */
export type UnusedTableCalculationsInput = {
    /** The chart configuration */
    chartType: ChartType;
    /** The chart config object (contains layout for cartesian charts) */
    chartConfig: ChartConfig['config'] | undefined;
    /** All table calculation names in the metric query */
    queryTableCalculations: string[];
};
/**
 * Detects table calculations in the query that are not used in the chart configuration.
 *
 * For cartesian charts, table calculations should be used in one of:
 * - x-axis (xField)
 * - y-axis (yField)
 *
 * If a table calculation is in the query but not used in any of these places,
 * it may cause incorrect results (extra rows that don't aggregate properly).
 *
 * @returns Array of unused table calculation names, or empty array if none
 */
export declare function getUnusedTableCalculations(input: UnusedTableCalculationsInput): {
    unusedTableCalculations: string[];
};
/**
 * Checks if a chart has unused table calculations that may cause incorrect results.
 * This is a convenience wrapper around getUnusedTableCalculations.
 */
export declare function hasUnusedTableCalculations(input: UnusedTableCalculationsInput): boolean;
//# sourceMappingURL=chartValidation.d.ts.map