import type { HistogramBucket } from "./createHistogramBuckets.js";
export type DateHistogramGranularity = "day" | "month" | "year";
export interface DateHistogramData {
	buckets: Array<HistogramBucket<Date>>;
	/** Period label rendered as the bottom-center subtitle (e.g. "2020-05"). */
	subtitle: string;
	granularity: DateHistogramGranularity;
}
interface ValueCountPair {
	value: Date;
	count: number;
}
/**
* Picks calendar-aligned histogram buckets for a date series.
*
* Granularity is chosen from the data span:
*   span ≤ 31 days   → daily buckets, ticks "1" / "2" / ... / "31"
*   span ≤ 365 days  → monthly buckets, ticks "Jan" / "Feb" / ... (locale-aware)
*   span >  365 days → yearly buckets, ticks "2020" / "2021" / ...
*
* Month ticks use `Intl.DateTimeFormat(..., { month: "short" })` so each
* browser locale renders its native short-month names rather than getting
* English-only "Jan"/"Feb". Day and year ticks remain locale-neutral integers.
*
* The subtitle reflects the surrounding calendar context — e.g. "2020-05"
* for a daily histogram inside one month, "2020" for a monthly histogram
* inside one year. When the data straddles multiple periods (e.g. monthly
* histogram across multiple years) the subtitle is empty so the per-bucket
* tick labels stay self-describing.
*
* @param formatDate Consumer-provided display formatter. Used for the
* subtitle only.
* @param formatTickLabel Optional override for per-bucket tick labels.
* Receives the bucket's start `Date` and the chosen granularity.
*/
export declare function createDateHistogramBuckets(pairs: ReadonlyArray<ValueCountPair>, range: {
	min: Date
	max: Date
}, formatDate?: (date: Date) => string, formatTickLabel?: (date: Date, granularity: DateHistogramGranularity) => string): DateHistogramData;
export {};
