/**
 * Chart utility functions
 * @countermeasure/web-components/charts/utils
 */
/** Create a linear scale mapping from domain to range */
export declare function scaleLinear(domain: [number, number], range: [number, number]): (value: number) => number;
/** Band scale result with callable signature */
export interface ScaleBand {
    (value: string): number;
    bandwidth(): number;
    domain(): string[];
}
/** Create a band (categorical) scale mapping discrete values to a continuous range */
export declare function scaleBand(domain: string[], range: [number, number], padding?: number): ScaleBand;
/** Return a palette of 12 distinct chart colors */
export declare function defaultColors(): string[];
/** Convert a hex color string to an rgba string */
export declare function hexToRgba(hex: string, alpha: number): string;
/** Clamp a value to a min/max range */
export declare function clamp(value: number, min: number, max: number): number;
/** Format a number with K/M/B suffixes for compact display */
export declare function formatNumber(value: number): string;
/** Compute nice axis bounds with evenly spaced ticks */
export declare function niceScale(min: number, max: number, tickCount: number): {
    min: number;
    max: number;
    step: number;
};
/** Linearly interpolate between two hex colors */
export declare function lerpColor(color1: string, color2: string, t: number): string;
/** Convert polar coordinates to cartesian */
export declare function polarToCartesian(cx: number, cy: number, radius: number, angleDeg: number): {
    x: number;
    y: number;
};
/**
 * Draw a rounded rectangle path on a canvas context.
 * Does not fill or stroke - caller should do that after calling this.
 */
export declare function roundRect(ctx: CanvasRenderingContext2D, x: number, y: number, w: number, h: number, r: number): void;
/** Resolve a color from a palette by index, with a default fallback */
export declare function resolveColor(index: number, colors?: string[], fallback?: string): string;
/** Draw a filled rounded bar on a canvas context */
export declare function drawFilledBar(ctx: CanvasRenderingContext2D, x: number, y: number, w: number, h: number, radius: number, color: string, hovered?: boolean): void;
/** Test whether a point (mx, my) is inside a rectangle */
export declare function hitTestRect(mx: number, my: number, rect: {
    x: number;
    y: number;
    width: number;
    height: number;
}): boolean;
/** Find the closest point to (mx, my) within a threshold distance */
export declare function findClosestPoint<T extends {
    px: number;
    py: number;
}>(mx: number, my: number, points: T[], threshold: number): {
    point: T;
    dist: number;
} | null;
/** Point with pixel coordinates for smooth path drawing */
export interface PathPoint {
    px: number;
    py: number;
}
/**
 * Draw a smooth Catmull-Rom spline path through the given points.
 * Assumes ctx.moveTo has already been called to the first point.
 * Uses bezier curves for smooth interpolation.
 *
 * @param ctx Canvas 2D rendering context
 * @param points Array of points with px/py pixel coordinates
 * @param tension Controls curve tightness (default 0.5)
 */
export declare function drawSmoothPath(ctx: CanvasRenderingContext2D, points: PathPoint[], tension?: number): void;
//# sourceMappingURL=utils.d.ts.map