import type { ColumnDataMap } from "../../data/view-reader"; import type { WebGLContextManager } from "../../webgl/context-manager"; import { TreeChartBase } from "../common/tree-chart"; import { type SunburstBreadcrumbRegion } from "./sunburst-interact"; export interface SunburstLocations { u_center: WebGLUniformLocation | null; u_resolution: WebGLUniformLocation | null; u_border_px: WebGLUniformLocation | null; a_strip_t: number; a_side: number; a_angles: number; a_radii: number; a_color: number; } /** * Sunburst chart. Shares tree storage + streaming pipeline + color * mode with `TreeChartBase`; adds polar layout + instanced-arc WebGL * rendering + drill / tooltip interactions. * * Internal option: `_labelRotation` — `"upright"` keeps labels on the * left half flipped 180° so they read upright (d3fc behavior); * `"radial"` leaves them purely tangent to the arc. Defaults to * `"upright"`; toggle here if a call site wants flat radial labels. */ export declare class SunburstChart extends TreeChartBase { _program: WebGLProgram | null; _locations: SunburstLocations | null; _stripBuffer: WebGLBuffer | null; _instanceBuffer: WebGLBuffer | null; _instanceCount: number; /** * Label orientation mode — see class docstring. */ _labelRotation: "upright" | "radial"; _centerX: number; _centerY: number; _maxRadius: number; _hoveredNodeId: number; _pinnedNodeId: number; _breadcrumbRegions: SunburstBreadcrumbRegion[]; _chromeCache: ImageBitmap | null; _chromeCacheDirty: boolean; /** * See `TreemapChart._chromeCacheGen` — same race, same fix. */ _chromeCacheGen: number; _facetGrid: import("../../layout/facet-grid").FacetGrid | null; /** * Per-facet drill roots — mirrors `TreemapChart._facetDrillRoots`. */ _facetDrillRoots: Map; /** * Per-facet rendering state. `index` matches the facet grid cell; * `centerX`, `centerY`, `maxRadius` are used for layout + hit test; * `drillRoot` is the sub-root the facet is currently showing; * `instanceStart`, `instanceCount` index into the shared GPU * instance buffer for draw dispatch (these are post-skip values, * rewritten by `uploadArcInstances` after zero-width arcs and the * drill root are filtered out). `nodeStart`, `nodeCount` are the * pre-skip range over `_visibleNodeIds` and are *not* rewritten — * canvas chrome (arc-label translate origin) walks this range so * each label can be placed around its own facet's center instead * of the chart-wide `_centerX/_centerY` (which always point at the * first facet). */ _facets: { label: string; centerX: number; centerY: number; maxRadius: number; drillRoot: number; instanceStart: number; instanceCount: number; nodeStart: number; nodeCount: number; }[]; protected tooltipCallbacks(): { onHover: (mx: number, my: number) => void; onLeave: () => void; onClickPre: (mx: number, my: number) => boolean; }; uploadAndRender(glManager: WebGLContextManager, columns: ColumnDataMap, startRow: number, _endRow: number): Promise; _fullRender(glManager: WebGLContextManager): void; protected destroyInternal(): void; }