import { type RawResultRow } from '../../../types/results';
import { type EChartsSeries, type SqlRunnerEChartsSeries } from '../../types';
/**
 * Calculate dynamic border radius based on estimated bar width
 * @param dataPointCount - Number of data points (categories) in the chart
 * @param seriesCount - Number of bar series (non-stacked bars in same category)
 * @param isStacked - Whether bars are stacked
 * @param isHorizontal - Whether the bar chart is horizontal (flipAxes)
 * @returns Appropriate border radius (max 4px, scales down for thin bars)
 */
export declare const calculateDynamicBorderRadius: (dataPointCount: number, seriesCount: number, isStacked: boolean, isHorizontal?: boolean) => number;
/**
 * Get border radius array for a bar chart data point
 * @param isHorizontal - Whether the bar chart is horizontal (flipAxes)
 * @param isStackEnd - Whether this data point is at the end (top/right) of the stack
 * @param radius - The border radius value to apply
 */
export declare const getBarBorderRadius: (isHorizontal: boolean, isStackEnd: boolean, radius?: number) => number | number[];
/**
 * Get base bar styling configuration for cartesian charts
 */
export declare const getBarStyle: () => {
    barCategoryGap: string;
};
/**
 * Get bar total label styling (values above/beside stacked bars)
 * This is specifically for stack totals, not individual bar labels
 */
export declare const getBarTotalLabelStyle: () => {
    color: string;
    fontWeight: string;
    fontSize: number;
};
/**
 * Resolve the tuple index for x/y given encode + dimensions
 * @param enc - The encode object
 * @param dimNames - The dimension names
 * @param which - The axis to resolve the index for
 * @returns The index of the axis
 */
export declare const getIndexFromEncode: (enc: EChartsSeries["encode"] | SqlRunnerEChartsSeries["encode"], dimNames: string[] | undefined, which: "x" | "y") => number | undefined;
type LegendValues = {
    [name: string]: boolean;
} | undefined;
/**
 * Apply rounded corners to stacked bars for SQL Runner (flat data format)
 * SQL Runner data is flat: { field: value } instead of { field: { value: { raw: value } } }
 */
export declare const applyRoundedCornersToSqlRunnerStackData: (series: SqlRunnerEChartsSeries[], rows: RawResultRow[], { radius, isHorizontal, legendSelected, }?: {
    radius?: number;
    isHorizontal?: boolean;
    legendSelected?: {
        [name: string]: boolean;
    } | undefined;
}) => SqlRunnerEChartsSeries[];
/**
 * Apply rounded corners to the visible end-segments of stacked bar series.
 * Ref: https://github.com/apache/echarts/issues/12319#issuecomment-1341387601
 *
 * Consumes the same flat dataset that ECharts renders from (post-padding for
 * continuous-date axes) so category values match xAxis.data exactly.
 *
 * @param series ECharts series produced for a cartesian chart
 * @param rows Flat dataset rows aligned with the chart categories (same shape
 *             as dataset.source)
 * @param options.radius Corner radius in px (default: 4)
 * @param options.isHorizontal Whether the chart is horizontal (flipAxes)
 * @param options.legendSelected Map of legend selection states used to ignore hidden series
 * @returns New series array with `itemStyle.borderRadius` applied to end segments only
 *
 */
export declare const applyRoundedCornersToStackData: (series: EChartsSeries[], rows: Record<string, unknown>[], { radius, isHorizontal, legendSelected, }?: {
    radius?: number;
    isHorizontal?: boolean;
    legendSelected?: LegendValues;
}) => EChartsSeries[];
export {};
//# sourceMappingURL=barChartStyles.d.ts.map