import { type ResolvedRamp } from "./heat.colour.ts"; import type { ContourLayer, HeatmapLayer, HexbinLayer, LegendLayer, ZonesLayer } from "./heat.types.ts"; import { type Env, type Made } from "./layers.env.ts"; /** The layers this file draws, except the legend. */ export type HeatLayer = HeatmapLayer | HexbinLayer | ZonesLayer | ContourLayer; /** A ramp cut into steps over a domain. */ interface Colours { ramp: ResolvedRamp; steps: number; domain: [number, number]; /** True when the ramp's pale end is left unused (a sequential ramp). */ floor: boolean; /** True when the domain is symmetric about a value (so the ramp diverges). */ centre: number | undefined; } /** Draw a heat layer. `gid` is the id of its group, which the dark colours of its ramp are scoped to. */ export declare function drawHeat(layer: HeatLayer, env: Env, gid: string, known?: Map): Made; /** The marks counted into each zone of a zone chart, without drawing it: for each zone its id, its name (in the drawing's language), the marks in it, those whose outcome is a success and its value. */ export declare function zoneCounts(layer: ZonesLayer, env: Env): { id: string; name: string; n: number; hits: number; value: number | null; }[]; /** What a legend takes from the layer it is for. */ export interface LegendInfo { colours: Colours; stat: string; percent: boolean; } /** A legend layer: a colour bar for another heat layer (`for`) or with a ramp and a domain of its own. `known` holds the colours of the layers drawn. */ export declare function drawLegend(layer: LegendLayer, env: Env, gid: string, known: ReadonlyMap): Made; /** A table of a heat layer's numbers: the heading cells, the rows, and the note for the caption. */ export interface HeatTable { head: string[]; rows: (string | number | null)[][]; title: string; note: string; } /** The numbers a heat layer shows, as table rows: a row for each zone; the cells that hold something, the hottest first; or a row for each contour level. */ export declare function heatTable(layer: HeatLayer, env: Env): HeatTable; export {};