import type { Chart, NormalizedChart } from 'modern-idoc'; import type { Element2D } from './Element2D'; import { CoreObject } from '../../../core'; import { CanvasTexture } from '../../resources'; /** * Renders an idoc chart with echarts (optional dependency). echarts draws into an * offscreen canvas, which is uploaded as a CanvasTexture and drawn directly onto the * parent element in `draw()` — the same way fill/background paint a texture, so the * chart is the element's own content (no extra child node). Updates are * microtask-coalesced. Without echarts installed, charts render nothing (warned once). */ export declare class Element2DChart extends CoreObject implements NormalizedChart { protected _parent: Element2D; enabled: boolean; type: NormalizedChart['type']; grouping: NormalizedChart['grouping']; categories: NormalizedChart['categories']; series: NormalizedChart['series']; title: NormalizedChart['title']; legend: NormalizedChart['legend']; categoryAxis: NormalizedChart['categoryAxis']; valueAxis: NormalizedChart['valueAxis']; protected _instance?: any; protected _container?: HTMLElement; protected _texture?: CanvasTexture; protected _dirty: boolean; protected _scheduled: boolean; constructor(_parent: Element2D); setProperties(properties?: Chart): this; protected _updateProperty(key: string, value: any, oldValue: any): void; protected _requestUpdate(): void; isValid(): boolean; /** Render with echarts into the offscreen canvas backing `_texture`. */ update(): Promise; /** echarts 缺失时画一个虚线框 + 文案的占位纹理,而非静默空白。 */ protected _renderPlaceholder(width: number, height: number): void; /** Paint the echarts texture onto the element, like fill/background do. */ draw(): void; /** Map the normalized idoc chart to an echarts option. */ protected _toOption(): Record; protected _teardown(): void; protected _destroy(): void; }