import type { ChartTypeBits, IChartSnapshot } from '@univerjs-pro/engine-chart'; import type { Nullable } from '@univerjs/core'; import { ChartModel } from '@univerjs-pro/engine-chart'; import { Disposable, ILogService, IResourceManagerService, IUniverInstanceService, LocaleService } from '@univerjs/core'; import { IDrawingManagerService } from '@univerjs/drawing'; import { ISheetDrawingService } from '@univerjs/sheets-drawing'; import type { IInitialSheetChartMapping, IInitialSheetChartSourceResult } from '../chart-source/initial-sheet-chart-source-inference'; import type { ISheetChartDataSource, ISheetChartMetadata, ISheetChartSourceRanges } from '../models/types'; import { ChartModelService } from './chart-model.service'; import { SheetChartDataSourceManager } from './sheet-chart-data-source-manager'; export declare const SHEET_CHART_PLUGIN = "SHEET_CHART_PLUGIN"; export interface ISheetChartSnapshot extends IChartSnapshot, ISheetChartMetadata { rangeInfo: ISheetChartSourceRanges; } type OptionalProperties = Omit & { [P in K]+?: T[P]; }; export type ISheetChartModelOptions = OptionalProperties; export interface ISheetsChartResource { [sheetId: string]: ISheetChartSnapshot[]; } export declare class SheetsChartService extends Disposable { private readonly _resourcesManagerService; private readonly _univerInstanceService; private readonly _chartModelService; private readonly _dataSourceManager; private readonly _localeService; private readonly _sheetDrawingService; private readonly _drawingManagerService; private readonly _logService; private readonly _chartMetadata; private _chartModelIdMap; private _dataSourceBindings; constructor(_resourcesManagerService: IResourceManagerService, _univerInstanceService: IUniverInstanceService, _chartModelService: ChartModelService, _dataSourceManager: SheetChartDataSourceManager, _localeService: LocaleService, _sheetDrawingService: ISheetDrawingService, _drawingManagerService: IDrawingManagerService, _logService: ILogService); getSubUnitId(unitId: string, chartModelId: string): Nullable; getUnitChartModels(unitId: string, subUnitId: string): (ChartModel | undefined)[]; getPrimaryChartModel(unitId: string, subUnitId: string): ChartModel | undefined; inferInitialChartMapping(rangeInfo: ISheetChartSourceRanges, chartType: ChartTypeBits, context?: NonNullable): IInitialSheetChartMapping; inferInitialChartSource(rangeInfo: ISheetChartSourceRanges, chartType: ChartTypeBits, context?: NonNullable): IInitialSheetChartSourceResult; private _inferPrimaryDataOrientation; private _getInitialDataOrientation; private _hasNonNumberCellInSingleRow; ensureChartModelCollection(unitId: string, subUnitId: string): Set; getChartDataSource(id: string): ISheetChartDataSource | undefined; getChartSourceSpec(id: string): ISheetChartSourceRanges | undefined; replaceChartDataSource(id: string, rangeInfo: ISheetChartSourceRanges): boolean; refreshChartSource(): void; createChartModel(unitId: string, subUnitId: string, options: ISheetChartModelOptions, isNew?: boolean): ChartModel; getChartMetadata(chartId: string): ISheetChartMetadata | null; replaceChartMetadata(unitId: string, subUnitId: string, chartId: string, metadata: ISheetChartMetadata | null): boolean; private _isChartMetadataValid; private _isChartHostMetadataValid; private _normalizeHeader; private _applyInitialMappingToRangeInfo; rehostChartModel(unitId: string, from: string, to: string, chartId: string): boolean; removeChartModel(id: string): void; getChartModel(id: string): ChartModel | undefined; private _serializeChartForUnit; private _createDataSourceRuntimeBinding; private _reportUnavailableChartTitles; private _disposeDataSourceRuntimeBinding; private _replaceReconciledContext; private _deserializeChartForUnit; private _initSnapshot; dispose(): void; } export {};