UNPKG

ag-charts-enterprise

Version:

Advanced Charting / Charts supporting Javascript / Typescript / React / Angular / Vue

109 lines (108 loc) 4.6 kB
import { type AgTreemapHighlightState, type AgTreemapSeriesOptions, type AgTreemapSeriesStyle, type FontStyle, type FontWeight, type TextAlign, type VerticalAlign, _ModuleSupport } from 'ag-charts-community'; import { type NormalisedTextOrSegments, type Point } from 'ag-charts-core'; import { HierarchyDataSet } from '../../charts/hierarchyDataSet'; import { TreemapSeriesProperties } from './treemapSeriesProperties'; declare class TreemapNode extends _ModuleSupport.HierarchyNode<TreemapNode> { labelValue: string | undefined; secondaryLabelValue: string | undefined; labelText: NormalisedTextOrSegments | undefined; secondaryLabelText: NormalisedTextOrSegments | undefined; label: LabelLayout | undefined; secondaryLabel: LabelLayout | undefined; bbox: _ModuleSupport.BBox | undefined; padding: Padding | undefined; } interface Padding { top: number; right: number; bottom: number; left: number; } interface LabelLayout { text: NormalisedTextOrSegments; fontSize: number; lineHeight: number; fontStyle: FontStyle; fontFamily: string; fontWeight: FontWeight; color: string; textAlign: TextAlign; verticalAlign: VerticalAlign; x: number; y: number; } type ItemStyle = Pick<AgTreemapSeriesStyle, 'fill' | 'stroke'> & Omit<Required<AgTreemapSeriesStyle>, 'fill' | 'stroke'>; export declare class TreemapSeries extends _ModuleSupport.HierarchySeries<TreemapNode, _ModuleSupport.Rect<TreemapNode>, AgTreemapSeriesOptions, TreemapSeriesProperties> { static readonly className = "TreemapSeries"; static readonly type: "treemap"; NodeClass: typeof TreemapNode; properties: TreemapSeriesProperties; private readonly rectGroup; protected readonly datumSelection: _ModuleSupport.Selection<TreemapNode, _ModuleSupport.Rect<TreemapNode>>; private readonly labelSelection; private readonly highlightSelection; protected _data?: HierarchyDataSet<any>; protected _chartData?: HierarchyDataSet<any>; get data(): HierarchyDataSet<any> | undefined; private groupTitleHeight; private getNodePadding; private sortChildren; /** * Squarified Treemap algorithm * https://www.win.tue.nl/~vanwijk/stm.pdf */ private squarify; private applyGap; createNodeData(): undefined; protected getItemStyle(nodeDatum: Pick<TreemapNode, 'path' | 'datumIndex' | 'datum' | 'depth' | 'colorValue'>, isLeaf: boolean, isHighlight: boolean): Required<AgTreemapSeriesStyle> & { opacity: number; } & Partial<ItemStyle> & { opacity?: number; } & Partial<object & { fill: import("ag-charts-core").NormalisedColorType; fillOpacity: number; stroke: string; strokeWidth: number; strokeOpacity: number; lineDash: number[]; lineDashOffset: number; opacity: number; }>; private makeItemStylerParams; updateSelections(): void; protected getActiveHighlightNode(): TreemapNode | undefined; updateNodes(): void; private getGroupHighlightState; private getTileHighlightStyle; private getGroupHighlightStyle; isSelectionEnabled(): boolean; isDatumSelectable(datumIndex: _ModuleSupport.DatumIndex): boolean; getTileSelectionStyle(datumIndex?: _ModuleSupport.DatumIndex): Partial<object & { fill: import("ag-charts-core").NormalisedColorType; fillOpacity: number; stroke: string; strokeWidth: number; strokeOpacity: number; lineDash: number[]; lineDashOffset: number; opacity: number; }> | undefined; getGroupSelectionStyle(datumIndex?: _ModuleSupport.DatumIndex): Partial<object & { fill: import("ag-charts-core").NormalisedColorType; fillOpacity: number; stroke: string; strokeWidth: number; strokeOpacity: number; lineDash: number[]; lineDashOffset: number; opacity: number; }> | undefined; getHighlightStateString(_datum: _ModuleSupport.HighlightNodeDatum | undefined, isHighlight?: boolean, datumIndex?: _ModuleSupport.DatumIndex): AgTreemapHighlightState; private isDescendantDatumIndex; pickNodesExactShape(point: Point): TreemapNode[]; protected pickNodeClosestDatum(point: Point): _ModuleSupport.SeriesNodePickMatch | undefined; getTooltipContent(datumIndex: _ModuleSupport.DatumIndex): _ModuleSupport.TooltipContent | undefined; protected computeFocusBounds(node: _ModuleSupport.Rect): _ModuleSupport.BBox | undefined; protected hasItemStylers(): boolean; } export {};