import { AbstractChart } from "../chart-base"; import type { ColumnDataMap } from "../../data/view-reader"; import { NodeStore } from "./node-store"; import { LazyTooltip } from "../../interaction/lazy-tooltip"; /** * Sentinel fallback for the Size slot when the user hasn't picked one: * use the first non-metadata column in the incoming view. Tree charts * still need *some* numeric-ish column to size geometry. */ export declare function firstNonMetadataColumn(columns: ColumnDataMap): string; /** * Shared state for hierarchical charts (treemap, sunburst). Holds the * tree store + streaming-insert scaffolding + per-row tooltip data * buffers. Concrete chart classes extend this and add their own * layout / render / interact state. * * Fields are `public` so the `tree-data.ts` helpers and per-chart * layout modules can read/write them without friction. */ export declare abstract class TreeChartBase extends AbstractChart { _sizeName: string; _colorName: string; /** * Color-slot semantics. * - `"empty"`: no Color slot → single palette[0], legend suppressed. * - `"numeric"`: Color column is float / integer / date / datetime → * continuous gradient via `colorValueToT`. * - `"series"`: Color column is any other type → discrete series * palette keyed by the composite of group_by level values. */ _colorMode: "empty" | "numeric" | "series"; _nodeStore: NodeStore; _rootId: number; _currentRootId: number; _breadcrumbIds: number[]; /** * Per-parent `Map` for O(1) find-or-create * during streaming tree insertion. Rebuilt on each dataset reset. */ _childLookup: Map>; _rowCount: number; _colorMin: number; _colorMax: number; _uniqueColorLabels: Map; _visibleNodeIds: Int32Array | null; _visibleNodeCount: number; /** * Lazy-tooltip cache. `lines` is `null` until the async row fetch * resolves; the controller's serial dance drops stale results so * rapid mouse motion doesn't paint out-of-date text. The render * path consults `hoveredTarget` to verify cached lines belong to * the currently hovered node before painting. */ _lazyTooltip: LazyTooltip; }