import type { MutableRefObject } from "react";
import * as d3 from "d3";
export declare type SvgSelection = d3.Selection<d3.BaseType, unknown, HTMLElement, any>;
export declare type Point = [number, number];
export declare type ChartType = "line" | "bar";
declare type AnimationSettings = {
    lineDurationMs?: number;
    lineDelayMs?: number;
    gradientDurationMs?: number;
    gradientDelayMs?: number;
};
export declare type ChartPayload = {
    id: string;
    title: string;
    type: ChartType;
    serie: Point[];
    color: string;
    yOffset?: number;
    animationSettings?: AnimationSettings;
    showGradient?: boolean;
    showFocus?: boolean;
};
export declare const isDefined: <T>(x: T | undefined) => x is T;
export declare const drawXAxis: ({ svg, xScale, yScale, height, showGrid, scaleFonts, padding, yOffset, }: {
    svg: d3.Selection<SVGSVGElement, unknown, null, undefined>;
    xScale: d3.ScaleBand<string> | d3.ScaleLinear<number, number, never>;
    yScale: d3.ScaleLinear<number, number, any>;
    height: number;
    yOffset?: number | undefined;
    showGrid: {
        horizontal: boolean;
        vertical: boolean;
    };
    padding: {
        top: number;
        right: number;
        bottom: number;
        left: number;
    };
    scaleFonts?: {
        fontSize?: number | undefined;
        fontFamily?: string | undefined;
    } | undefined;
}) => void;
export declare const getExtents: (series: {
    serie: Point[];
}[]) => {
    minX: number | undefined;
    maxX: number | undefined;
    minY: number | undefined;
    maxY: number | undefined;
};
export declare const drawBars: ({ svg, chartPayload: { id, color, serie, animationSettings }, xScale, yScale, barPadding, formatterX, }: {
    svg: d3.Selection<SVGSVGElement, unknown, null, undefined>;
    chartPayload: ChartPayload;
    height: number;
    xScale: d3.ScaleBand<string>;
    yScale: d3.ScaleLinear<number, number, never>;
    barPadding: number;
    formatterX: (point: Point) => string;
}) => void;
export declare const drawLine: ({ nonce, svg, chartPayload: { serie, id, color, yOffset, animationSettings }, xScale, yScale, strokeWidth, xOffset, formatterX, }: {
    nonce: MutableRefObject<number>;
    svg: d3.Selection<SVGSVGElement, unknown, null, undefined>;
    chartPayload: ChartPayload;
    xScale: d3.ScaleBand<string> | d3.ScaleLinear<number, number, never>;
    yScale: d3.ScaleLinear<number, number, never>;
    strokeWidth: number;
    xOffset?: number | undefined;
    formatterX: (point: Point) => string;
}) => void;
export declare const drawGradient: ({ svg, chartPayload: { serie, color, animationSettings }, xScale, yScale, minY, }: {
    svg: d3.Selection<SVGSVGElement, unknown, null, undefined>;
    chartPayload: ChartPayload;
    xScale: d3.ScaleLinear<number, number, never>;
    yScale: d3.ScaleLinear<number, number, never>;
    minY: number;
}) => void;
export declare const getClosest: ({ x, xScale, serie, }: {
    x: number;
    serie: Point[];
    xScale: d3.ScaleLinear<number, number, never>;
}) => Point;
export declare const drawFocus: ({ svg, color, }: {
    svg: d3.Selection<SVGSVGElement, unknown, null, undefined>;
    color: string;
}) => d3.Selection<SVGGElement, unknown, null, undefined>;
export declare const showFocus: ({ focus, xScale, yScale, closest, }: {
    focus: d3.Selection<SVGGElement, unknown, null, undefined>;
    xScale: d3.ScaleLinear<number, number, never>;
    yScale: d3.ScaleLinear<number, number, never>;
    closest: Point;
}) => void;
export declare const hideFocus: (focus: d3.Selection<SVGGElement, unknown, null, undefined>) => void;
export {};
