@univerjs-pro/sheets-chart 1.0.0-alpha.8 → 1.0.0-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (112) hide show
  1. package/lib/cjs/facade.js +1 -1
  2. package/lib/cjs/index.js +1 -1
  3. package/lib/cjs/locale/ar-SA.js +1 -1
  4. package/lib/cjs/locale/ca-ES.js +1 -1
  5. package/lib/cjs/locale/de-DE.js +1 -1
  6. package/lib/cjs/locale/en-US.js +1 -1
  7. package/lib/cjs/locale/es-ES.js +1 -1
  8. package/lib/cjs/locale/fa-IR.js +1 -1
  9. package/lib/cjs/locale/fr-FR.js +1 -1
  10. package/lib/cjs/locale/id-ID.js +1 -1
  11. package/lib/cjs/locale/it-IT.js +1 -1
  12. package/lib/cjs/locale/ja-JP.js +1 -1
  13. package/lib/cjs/locale/ko-KR.js +1 -1
  14. package/lib/cjs/locale/pl-PL.js +1 -1
  15. package/lib/cjs/locale/pt-BR.js +1 -1
  16. package/lib/cjs/locale/ru-RU.js +1 -1
  17. package/lib/cjs/locale/sk-SK.js +1 -1
  18. package/lib/cjs/locale/vi-VN.js +1 -1
  19. package/lib/cjs/locale/zh-CN.js +1 -1
  20. package/lib/cjs/locale/zh-HK.js +1 -1
  21. package/lib/cjs/locale/zh-TW.js +1 -1
  22. package/lib/es/facade.js +1 -1
  23. package/lib/es/index.js +1 -1
  24. package/lib/es/locale/ar-SA.js +1 -1
  25. package/lib/es/locale/ca-ES.js +1 -1
  26. package/lib/es/locale/de-DE.js +1 -1
  27. package/lib/es/locale/en-US.js +1 -1
  28. package/lib/es/locale/es-ES.js +1 -1
  29. package/lib/es/locale/fa-IR.js +1 -1
  30. package/lib/es/locale/fr-FR.js +1 -1
  31. package/lib/es/locale/id-ID.js +1 -1
  32. package/lib/es/locale/it-IT.js +1 -1
  33. package/lib/es/locale/ja-JP.js +1 -1
  34. package/lib/es/locale/ko-KR.js +1 -1
  35. package/lib/es/locale/pl-PL.js +1 -1
  36. package/lib/es/locale/pt-BR.js +1 -1
  37. package/lib/es/locale/ru-RU.js +1 -1
  38. package/lib/es/locale/sk-SK.js +1 -1
  39. package/lib/es/locale/vi-VN.js +1 -1
  40. package/lib/es/locale/zh-CN.js +1 -1
  41. package/lib/es/locale/zh-HK.js +1 -1
  42. package/lib/es/locale/zh-TW.js +1 -1
  43. package/lib/facade.js +1 -1
  44. package/lib/index.js +1 -1
  45. package/lib/locale/ar-SA.js +1 -1
  46. package/lib/locale/ca-ES.js +1 -1
  47. package/lib/locale/de-DE.js +1 -1
  48. package/lib/locale/en-US.js +1 -1
  49. package/lib/locale/es-ES.js +1 -1
  50. package/lib/locale/fa-IR.js +1 -1
  51. package/lib/locale/fr-FR.js +1 -1
  52. package/lib/locale/id-ID.js +1 -1
  53. package/lib/locale/it-IT.js +1 -1
  54. package/lib/locale/ja-JP.js +1 -1
  55. package/lib/locale/ko-KR.js +1 -1
  56. package/lib/locale/pl-PL.js +1 -1
  57. package/lib/locale/pt-BR.js +1 -1
  58. package/lib/locale/ru-RU.js +1 -1
  59. package/lib/locale/sk-SK.js +1 -1
  60. package/lib/locale/vi-VN.js +1 -1
  61. package/lib/locale/zh-CN.js +1 -1
  62. package/lib/locale/zh-HK.js +1 -1
  63. package/lib/locale/zh-TW.js +1 -1
  64. package/lib/types/chart-builder/{sheet-chart-builder-adapter.d.ts → sheet-chart-config-adapter.d.ts} +17 -8
  65. package/lib/types/chart-builder/types.d.ts +5 -1
  66. package/lib/types/chart-source/chart-source.d.ts +2 -0
  67. package/lib/types/chart-source/source-util.d.ts +5 -21
  68. package/lib/types/commands/chart-persisted-context.d.ts +3 -0
  69. package/lib/types/commands/commands/sheets-chart-update-config.command.d.ts +7 -3
  70. package/lib/types/commands/mutations/sheets-chart-update-config.mutation.d.ts +3 -3
  71. package/lib/types/common/util.d.ts +2 -0
  72. package/lib/types/config/config.d.ts +2 -2
  73. package/lib/types/facade/f-enum.d.ts +27 -0
  74. package/lib/types/facade/f-worksheet.d.ts +134 -0
  75. package/lib/types/facade/index.d.ts +3 -3
  76. package/lib/types/index.d.ts +8 -3
  77. package/lib/types/locale/en-US.d.ts +37 -2
  78. package/lib/types/plugin.d.ts +0 -1
  79. package/lib/types/services/chart-model.service.d.ts +13 -14
  80. package/lib/types/services/sheet-chart-range-watcher.d.ts +5 -5
  81. package/lib/types/services/sheets-chart.service.d.ts +7 -5
  82. package/lib/umd/facade.js +1 -1
  83. package/lib/umd/index.js +1 -1
  84. package/lib/umd/locale/ar-SA.js +1 -1
  85. package/lib/umd/locale/ca-ES.js +1 -1
  86. package/lib/umd/locale/de-DE.js +1 -1
  87. package/lib/umd/locale/en-US.js +1 -1
  88. package/lib/umd/locale/es-ES.js +1 -1
  89. package/lib/umd/locale/fa-IR.js +1 -1
  90. package/lib/umd/locale/fr-FR.js +1 -1
  91. package/lib/umd/locale/id-ID.js +1 -1
  92. package/lib/umd/locale/it-IT.js +1 -1
  93. package/lib/umd/locale/ja-JP.js +1 -1
  94. package/lib/umd/locale/ko-KR.js +1 -1
  95. package/lib/umd/locale/pl-PL.js +1 -1
  96. package/lib/umd/locale/pt-BR.js +1 -1
  97. package/lib/umd/locale/ru-RU.js +1 -1
  98. package/lib/umd/locale/sk-SK.js +1 -1
  99. package/lib/umd/locale/vi-VN.js +1 -1
  100. package/lib/umd/locale/zh-CN.js +1 -1
  101. package/lib/umd/locale/zh-HK.js +1 -1
  102. package/lib/umd/locale/zh-TW.js +1 -1
  103. package/package.json +10 -9
  104. package/lib/types/chart-builder/index.d.ts +0 -10
  105. package/lib/types/chart-builder/sheet-chart-builder.d.ts +0 -17
  106. package/lib/types/chart-builder/sheet-chart-create-spec.d.ts +0 -6
  107. package/lib/types/facade/chart/f-sheet-chart-builder.d.ts +0 -83
  108. package/lib/types/facade/chart/f-sheet-charts.d.ts +0 -100
  109. package/lib/types/facade/chart/index.d.ts +0 -2
  110. package/lib/types/facade/chart/sheet-chart-command-adapter.d.ts +0 -13
  111. package/lib/types/facade/f-worksheet-charts.d.ts +0 -12
  112. package/lib/types/models/chart-model.d.ts +0 -22
@@ -1 +1 @@
1
- const _0x59a515=_0x5942;(function(_0x3ce87e,_0x3f5c63){const _0x552857=_0x5942,_0x4d3016=_0x3ce87e();while(!![]){try{const _0x448419=parseInt(_0x552857(0x138))/0x1*(parseInt(_0x552857(0x137))/0x2)+parseInt(_0x552857(0x127))/0x3*(parseInt(_0x552857(0x123))/0x4)+parseInt(_0x552857(0x134))/0x5+parseInt(_0x552857(0x130))/0x6*(parseInt(_0x552857(0x12d))/0x7)+parseInt(_0x552857(0x126))/0x8*(-parseInt(_0x552857(0x12b))/0x9)+parseInt(_0x552857(0x125))/0xa+-parseInt(_0x552857(0x132))/0xb;if(_0x448419===_0x3f5c63)break;else _0x4d3016['push'](_0x4d3016['shift']());}catch(_0x123dd1){_0x4d3016['push'](_0x4d3016['shift']());}}}(_0x31cf,0xc0398));const e={'sheets-chart':{'category':'類別','series':'系列','seriesDefaultName':'系列\x20{0}','categoryDefaultName':_0x59a515(0x12f),'blank':_0x59a515(0x128),'msg':{'emptyTips':'請先添加系列開始數據可視化','sankeyCircularTips':_0x59a515(0x13a)},'bubble':{'emptyTips':_0x59a515(0x12c)},'relation':{'emptyTips':_0x59a515(0x12a)},'cloud':{'word':'詞','frequency':'頻率'},'waterfall':{'positive':'正值','negative':'負值','subtotal':'小計'},'pareto':{'lineName':_0x59a515(0x124)},'candlestick':{'series':_0x59a515(0x129),'category':_0x59a515(0x135),'open':'Open','high':'High','low':_0x59a515(0x136),'close':'Close'},'boxplot':{'min':_0x59a515(0x139),'q1':_0x59a515(0x12e),'median':'中位數','q3':'第三四分位數','max':_0x59a515(0x133)},'histogram':{'frequency':'頻數'},'treemap':{'hierarchy':'層級','value':'','ownValue':_0x59a515(0x131),'children':'子項'}}};function _0x5942(_0x4b2685,_0x1dc560){_0x4b2685=_0x4b2685-0x123;const _0x31cf08=_0x31cf();let _0x59423d=_0x31cf08[_0x4b2685];return _0x59423d;}function _0x31cf(){const _0x160633=['最小值','桑基圖不能包含循環數據','84052tiYQbz','累積占比','7797630fYoers','1588984THJLOG','3qfXKqm','()','OHLC','關係圖資料來源為額外新增類型欄在第二欄的共詞矩陣','63wGaZcn','氣泡圖至少需要2欄,X軸、Y軸。','116284xsEcnQ','第一四分位數','類別\x20{0}','102plgjOh','自身值','6337870ETgUXE','最大值','4071945xCwHXv','Category','Low','678XcsKxg','2526TkcsUq'];_0x31cf=function(){return _0x160633;};return _0x31cf();}export{e as default};
1
+ const _0xa5ae37=_0x1183;(function(_0x3d00a1,_0x117974){const _0xa64fcf=_0x1183,_0x5dac38=_0x3d00a1();while(!![]){try{const _0x4c4857=parseInt(_0xa64fcf(0x151))/0x1*(-parseInt(_0xa64fcf(0x138))/0x2)+-parseInt(_0xa64fcf(0x148))/0x3*(parseInt(_0xa64fcf(0x132))/0x4)+-parseInt(_0xa64fcf(0x12d))/0x5*(-parseInt(_0xa64fcf(0x13b))/0x6)+parseInt(_0xa64fcf(0x136))/0x7+-parseInt(_0xa64fcf(0x129))/0x8+-parseInt(_0xa64fcf(0x14f))/0x9+parseInt(_0xa64fcf(0x12a))/0xa*(parseInt(_0xa64fcf(0x13f))/0xb);if(_0x4c4857===_0x117974)break;else _0x5dac38['push'](_0x5dac38['shift']());}catch(_0x2336e9){_0x5dac38['push'](_0x5dac38['shift']());}}}(_0x3dce,0xdfe5e));function _0x1183(_0x35a232,_0x4023de){_0x35a232=_0x35a232-0x129;const _0x3dce67=_0x3dce();let _0x1183fa=_0x3dce67[_0x35a232];return _0x1183fa;}function _0x3dce(){const _0x3fc9e8=['最大值','168aQhCoN','選取的欄位無法構成這個圖表所需的有效資料結構。','這個圖表需要更多標籤欄位。','關係數','33BRZaKo','最高價','旭日圖至少需要一個階層欄位和一個數值欄位。','選取的圖表欄位已無法使用。','儀表圖需要一個標籤欄位,而且只能有一個數值欄位。','儀表圖至少需要一個有限數值。','弦圖需要不同的來源與目標欄位,並可選擇一個與兩者不同的數值欄位。','第三四分位數','這個圖表需要更多數值欄位。','1452rOGfcg','累積占比','自身值','類別\x20{0}','儀表圖設定無效,請檢查刻度範圍、分段區間、比例和尺寸。','關聯值','最小值','202428oAXgOF','關係圖資料來源為額外新增類型欄在第二欄的共詞矩陣','2YeZjIb','8047112bhuZLd','11264410ErZPVr','收盤價','最低價','31905cuoFrJ','弦圖設定無效,請檢查角度、半徑、不透明度和尺寸。','開盤價','氣泡圖至少需要2欄,X軸、Y軸。','請先添加系列開始數據可視化','10312wDtLkm','第一四分位數','(空)','這個圖表類型沒有欄位使用規則。','7997822mnLnFj','OHLC\x20數列','1507318MyTuxu','中位數'];_0x3dce=function(){return _0x3fc9e8;};return _0x3dce();}const e={'sheets-chart':{'seriesDefaultName':'系列\x20{0}','categoryDefaultName':_0xa5ae37(0x14b),'blank':_0xa5ae37(0x134),'msg':{'emptyTips':_0xa5ae37(0x131),'sankeyCircularTips':'桑基圖不能包含循環數據'},'bubble':{'emptyTips':_0xa5ae37(0x130)},'relation':{'emptyTips':_0xa5ae37(0x150)},'cloud':{'word':'詞','frequency':'頻率'},'waterfall':{'positive':'正值','negative':'負值','subtotal':'小計'},'pareto':{'lineName':_0xa5ae37(0x149)},'boxplot':{'min':_0xa5ae37(0x14e),'q1':_0xa5ae37(0x133),'median':_0xa5ae37(0x139),'q3':_0xa5ae37(0x146),'max':_0xa5ae37(0x13a)},'candlestick':{'series':_0xa5ae37(0x137),'category':'Category','open':_0xa5ae37(0x12f),'high':_0xa5ae37(0x140),'low':_0xa5ae37(0x12c),'close':_0xa5ae37(0x12b)},'histogram':{'frequency':'頻數'},'pie':{'aggregateOther':'其他','aggregateMembers':'成員'},'treemap':{'hierarchy':'階層欄位','value':'數值欄位','ownValue':_0xa5ae37(0x14a),'children':'子項','diagnostic':'矩形樹圖至少需要一個階層欄位和一個數值欄位。'},'sunburst':{'hierarchy':'階層','value':'Value','ownValue':_0xa5ae37(0x14a),'children':'子項','diagnostic':_0xa5ae37(0x141)},'gauge':{'label':'標籤','value':'Value','emptyDiagnostic':_0xa5ae37(0x144),'mappingDiagnostic':_0xa5ae37(0x143),'configDiagnostic':_0xa5ae37(0x14c)},'chord':{'emptyDiagnostic':'弦圖至少需要兩個不同節點之間的一條正權重關係。','mappingDiagnostic':_0xa5ae37(0x145),'configDiagnostic':_0xa5ae37(0x12e),'source':'來源','target':'目標','value':'Value','count':_0xa5ae37(0x13e),'associatedValue':_0xa5ae37(0x14d)},'chartField':{'missingCategoryFields':_0xa5ae37(0x13d),'missingSeriesFields':_0xa5ae37(0x147),'invalidFieldIndex':_0xa5ae37(0x142),'invalidValueFieldType':'選取的數值欄位不包含數值資料。','invalidDataStructure':_0xa5ae37(0x13c),'unsupportedChartType':_0xa5ae37(0x135)}}};export{e as default};
@@ -1,14 +1,14 @@
1
- import type { ChartPendingConfig, IChartBuilderAdapter, IChartData, IChartDescription, IChartRenderModelImageExportOptions, IChartRenderModelImageExportResult, IUniverDataSet } from '@univerjs-pro/engine-chart';
2
- import type { Injector } from '@univerjs/core';
1
+ import type { ChartPendingConfig, IChartBuilderAdapter, IChartCreateConfig, IChartData, IChartDescription, IChartLiveAdapter, IUniverDataSet } from '@univerjs-pro/engine-chart';
2
+ import type { ArrangeTypeEnum, Injector } from '@univerjs/core';
3
3
  import type { ISheetChartDescriptionExtension } from './sheet-chart-description';
4
- import type { ChartSourceSpec, IChartLayoutPatch } from './types';
4
+ import type { ChartSourceSpec, IChartLayoutPatch, ISheetChartInfo } from './types';
5
5
  /** Sheet-owned changes committed alongside engine chart configuration. */
6
6
  export interface ISheetChartHostPatch {
7
7
  source?: ChartSourceSpec;
8
8
  layout?: IChartLayoutPatch;
9
9
  }
10
10
  /** Persistence seam required by a Sheet chart builder. */
11
- export interface ISheetChartBuilderAdapter extends IChartBuilderAdapter<ISheetChartDescriptionExtension> {
11
+ export interface ISheetChartConfigAdapter extends IChartBuilderAdapter<ISheetChartDescriptionExtension> {
12
12
  commitHost(patch: ISheetChartHostPatch): void;
13
13
  resolveData(config: ChartPendingConfig, source?: ChartSourceSpec): IChartData;
14
14
  resolveSource(source: ChartSourceSpec): {
@@ -17,25 +17,34 @@ export interface ISheetChartBuilderAdapter extends IChartBuilderAdapter<ISheetCh
17
17
  };
18
18
  }
19
19
  /** Stable Sheet identity and services used by the builder adapter. */
20
- export interface ISheetChartBuilderAdapterContext {
20
+ export interface ISheetChartConfigAdapterContext {
21
21
  unitId: string;
22
22
  subUnitId: string;
23
23
  chartId: string;
24
24
  injector: Injector;
25
25
  }
26
26
  /** Commits Sheet chart changes using raw identity and package-owned commands. */
27
- export declare class SheetChartBuilderAdapter implements ISheetChartBuilderAdapter {
27
+ export declare class SheetChartConfigAdapter implements ISheetChartConfigAdapter, IChartLiveAdapter<ChartSourceSpec, ISheetChartInfo> {
28
28
  private readonly _context;
29
29
  private readonly _injector;
30
- constructor(_context: ISheetChartBuilderAdapterContext);
30
+ constructor(_context: ISheetChartConfigAdapterContext);
31
31
  describe(config?: ChartPendingConfig, dataSet?: IUniverDataSet): IChartDescription & ISheetChartDescriptionExtension;
32
+ getInfo(): ISheetChartInfo;
32
33
  commit(configChange: ChartPendingConfig): void;
34
+ update(info: ISheetChartInfo): Promise<void>;
35
+ commitChanges(source: ChartSourceSpec, config: IChartCreateConfig, layout: IChartLayoutPatch): Promise<void>;
36
+ private _replaceConfig;
37
+ setDataSource(source: ChartSourceSpec): void;
38
+ setAbsolutePosition(x: number, y: number): void;
39
+ setSize(width: number, height: number): void;
40
+ arrange(type: ArrangeTypeEnum): void;
41
+ setZOrder(zOrder: number): void;
33
42
  resolveData(configChange: ChartPendingConfig, source?: ChartSourceSpec): IChartData;
34
43
  resolveSource(source: ChartSourceSpec): {
35
44
  dataSet: IUniverDataSet;
36
45
  isRowDirection: boolean;
37
46
  };
38
47
  commitHost(patch: ISheetChartHostPatch): void;
39
- exportImage(options?: IChartRenderModelImageExportOptions): Promise<IChartRenderModelImageExportResult | null>;
48
+ remove(): Promise<boolean>;
40
49
  private _resolveSourceRange;
41
50
  }
@@ -1,4 +1,4 @@
1
- import type { ChartTypeString, IChartCreateConfig, IChartDescription as IEngineChartDescription } from '@univerjs-pro/engine-chart';
1
+ import type { ChartTypeString, IChartCreateConfig, IChartInfo, IChartDescription as IEngineChartDescription } from '@univerjs-pro/engine-chart';
2
2
  import type { IRange } from '@univerjs/core';
3
3
  export declare enum ChartSourceOrientation {
4
4
  Auto = "auto",
@@ -83,6 +83,10 @@ export interface IChartCreateSpec extends IChartCreateConfig {
83
83
  };
84
84
  size?: IChartSizeSpec;
85
85
  }
86
+ /** Detached Sheet Chart information produced by the Facade builder. */
87
+ export interface ISheetChartInfo extends IChartInfo<ChartSourceSpec> {
88
+ anchor?: ChartAnchorSpec;
89
+ }
86
90
  export declare enum ChartDiagnosticCode {
87
91
  InvalidRange = "INVALID_RANGE",
88
92
  SingleCellSource = "SINGLE_CELL_SOURCE",
@@ -21,6 +21,7 @@ export declare class ChartDataSourceSingle extends ChartDataSource {
21
21
  watchRange(): void;
22
22
  convertDataSet(sourceInfo?: ISheetChartSourceSingleRange): IUniverDataSet;
23
23
  getDataSet(): IUniverDataSet;
24
+ getDimensionCount(): number;
24
25
  refresh(): void;
25
26
  private _emit;
26
27
  }
@@ -48,6 +49,7 @@ export declare class ChartDataSourceMulti extends ChartDataSource {
48
49
  sourceLabels: string[][];
49
50
  };
50
51
  getDataSet(): IUniverDataSet;
52
+ getDimensionCount(): number;
51
53
  refresh(): void;
52
54
  private _emit;
53
55
  }
@@ -1,34 +1,17 @@
1
1
  import type { ICellData, IDocumentData, IRange, Nullable, ObjectMatrix, Styles, Worksheet } from '@univerjs/core';
2
2
  import type { IChartSourceMultiRangeItem, ISheetChartSourceSingleRange, OptionDataValue } from '../models/types';
3
3
  import { ChartSourceDataTypeEnum } from '@univerjs-pro/engine-chart';
4
+ import { numfmt } from '@univerjs/core';
5
+ type ChartSourcePatternInfoRecord = Record<string, ReturnType<typeof numfmt.getFormatInfo>>;
4
6
  export interface IChartSourceCellEntry {
5
7
  value: OptionDataValue;
6
8
  label: string;
7
9
  sourceType: ChartSourceDataTypeEnum;
8
10
  }
9
11
  export declare const getStringFromDataStream: (data: IDocumentData) => string;
10
- /**
11
- * Get the cell data value as number for source
12
- * @param cellData The cell data
13
- * @returns {number|null} The number value
14
- */
15
- export declare function convertCellDataToNumber(cellData: Nullable<ICellData>, styles: Styles, patternInfoRecord: Record<string, any>): {
16
- v: null | number | string;
17
- t: ChartSourceDataTypeEnum;
18
- };
19
12
  export declare function convertArrayLikeRangeInfoToMatrix(sourceRange: IRange, sheet: Worksheet, index: number, matrix: ObjectMatrix<OptionDataValue>, sourceTypeMatrix: ObjectMatrix<ChartSourceDataTypeEnum>, sourceLabelsMatrix: ObjectMatrix<string>, styles: Styles): void;
20
- export declare function convertCellDataToSourceEntry(cellData: Nullable<ICellData>, styles: Styles, patternInfoRecord: Record<string, any>): IChartSourceCellEntry;
21
- /**
22
- * transform cell data to dimension name
23
- * @param cellData the sheet cell data
24
- * @param styles workBook styles collection
25
- * @param patternInfoRecord The cache record for pattern info
26
- * @returns {string} The dimension name
27
- */
28
- export declare function convertCellDataToString(cellData: Nullable<ICellData>, styles: Styles, patternInfoRecord: Record<string, any>): {
29
- v: string;
30
- t: ChartSourceDataTypeEnum;
31
- };
13
+ export declare function getCellSourceEntry(worksheet: Worksheet, row: number, column: number, styles: Styles, patternInfoRecord: ChartSourcePatternInfoRecord): IChartSourceCellEntry;
14
+ export declare function convertCellDataToSourceEntry(cellData: Nullable<ICellData>, styles: Styles, patternInfoRecord: ChartSourcePatternInfoRecord, sourceCellData?: Nullable<ICellData>): IChartSourceCellEntry;
32
15
  /**
33
16
  * @description this function is used to change the single range info to multi range info, we will split the single range to two range, one is the dimension range, the other is the value range
34
17
  * @param {ISheetChartSourceSingleRange} rangeInfo the single range info
@@ -41,3 +24,4 @@ export declare function changeSingleRangeInfoToMultiRangeInfo(rangeInfo: ISheetC
41
24
  * @returns {boolean} return the multi range info can switch orient or not
42
25
  */
43
26
  export declare function isMultiRangeCanSwitchOrient(rangeInfo: IChartSourceMultiRangeItem[]): boolean;
27
+ export {};
@@ -0,0 +1,3 @@
1
+ import type { IChartContext } from '@univerjs-pro/engine-chart';
2
+ export type IChartPersistedContext = Pick<IChartContext, 'categoryIndexes' | 'seriesIndexes' | 'histogram'>;
3
+ export declare function replacePersistedChartContext(current: IChartContext, persisted: IChartPersistedContext): IChartContext;
@@ -1,9 +1,13 @@
1
- import type { ChartPendingConfig, ChartStyle, ChartTypeBits, DataOrientation, IChartContext, IChartDataAggregation } from '@univerjs-pro/engine-chart';
1
+ import type { ChartPendingConfig, ChartStyle, ChartTypeBits, DataOrientation, IChartDataAggregation } from '@univerjs-pro/engine-chart';
2
2
  import type { ICommand } from '@univerjs/core';
3
+ import type { IChartPersistedContext } from '../chart-persisted-context';
3
4
  /** Switches supplied style, context, and aggregation groups from merge to replacement semantics. */
4
5
  export declare const ReplaceSheetChartConfig: unique symbol;
5
- type SheetChartStylePatch = Omit<ChartStyle, 'candlestick'> & {
6
+ type SheetChartStylePatch = Omit<ChartStyle, 'candlestick' | 'sunburst' | 'gauge' | 'chord'> & {
6
7
  candlestick?: ChartPendingConfig['candlestick'];
8
+ sunburst?: ChartPendingConfig['sunburst'];
9
+ gauge?: ChartPendingConfig['gauge'];
10
+ chord?: ChartPendingConfig['chord'];
7
11
  };
8
12
  export interface IChartUpdateConfigCommandParams {
9
13
  unitId: string;
@@ -12,7 +16,7 @@ export interface IChartUpdateConfigCommandParams {
12
16
  chartType?: ChartTypeBits;
13
17
  dataAggregation?: Partial<IChartDataAggregation>;
14
18
  style?: SheetChartStylePatch;
15
- context?: IChartContext;
19
+ context?: IChartPersistedContext;
16
20
  [ReplaceSheetChartConfig]?: true;
17
21
  }
18
22
  /**
@@ -1,6 +1,6 @@
1
- import type { ChartStyle, DeepNullish, IChartContext, IChartDataAggregation } from '@univerjs-pro/engine-chart';
1
+ import type { ChartStyle, ChartTypeBits, DeepNullish, IChartDataAggregation } from '@univerjs-pro/engine-chart';
2
2
  import type { IMutation } from '@univerjs/core';
3
- import { ChartTypeBits } from '@univerjs-pro/engine-chart';
3
+ import type { IChartPersistedContext } from '../chart-persisted-context';
4
4
  /**
5
5
  * Wire payload shared by incremental and replacement mutations.
6
6
  * Incremental mutations forward nested `null` values to the model; replacement callers should
@@ -12,7 +12,7 @@ export interface IChartUpdateConfigMutationParams {
12
12
  chartType?: ChartTypeBits;
13
13
  dataAggregation?: DeepNullish<IChartDataAggregation>;
14
14
  style?: DeepNullish<ChartStyle>;
15
- context?: DeepNullish<IChartContext>;
15
+ context?: DeepNullish<IChartPersistedContext>;
16
16
  }
17
17
  /**
18
18
  * Incrementally updates the model by merging each supplied config group.
@@ -1,3 +1,4 @@
1
+ import type { ChartRuntimeStyle } from '@univerjs-pro/engine-chart';
1
2
  import type { IAccessor } from '@univerjs/core';
2
3
  export declare const BUILD_TIMESTAMP: number;
3
4
  export declare const DefaultLimitedTypes: string[];
@@ -11,3 +12,4 @@ export declare const setProperty: (data: Record<string, any>, propertyPath: stri
11
12
  export declare const setGraphicToSpec: (spec: Record<string, any>, graphicElements: unknown[]) => void;
12
13
  export declare const translateAngleToRadian: (angle: number) => number;
13
14
  export declare function getAllowedChartTypes(accessor: IAccessor): string[];
15
+ export declare function withSheetChartWatermark(style: ChartRuntimeStyle, accessor: IAccessor): ChartRuntimeStyle;
@@ -1,4 +1,4 @@
1
- import type { IWordCloudRenderConfig } from '@univerjs-pro/engine-chart';
1
+ import type { IChartHostRect } from '@univerjs-pro/engine-chart';
2
2
  export declare const SHEETS_CHART_PLUGIN_CONFIG_KEY = "sheets-chart.config";
3
3
  export declare const configSymbol: unique symbol;
4
4
  export declare enum ChartRenderMode {
@@ -6,7 +6,7 @@ export declare enum ChartRenderMode {
6
6
  Image = "image"
7
7
  }
8
8
  export interface IUniverSheetsChartConfig {
9
- wordCloudRenderConfig?: IWordCloudRenderConfig;
10
9
  chartRenderMode?: ChartRenderMode;
10
+ defaultChartSize?: IChartHostRect;
11
11
  }
12
12
  export declare const defaultPluginConfig: IUniverSheetsChartConfig;
@@ -2,8 +2,35 @@ import { ChartSourceOrientation } from '@univerjs-pro/sheets-chart';
2
2
  import { FEnum } from '@univerjs/core/facade';
3
3
  /** @ignore */
4
4
  export interface IFSheetsChartEnumMixin {
5
+ /**
6
+ * Controls how a Sheet range is interpreted as Chart series.
7
+ *
8
+ * - `Auto` lets Sheet Chart infer the orientation from the selected range.
9
+ * - `Row`, `Rows`, and `RowsAsSeries` are equivalent: each row is treated as a series.
10
+ * - `Column`, `Columns`, and `ColumnsAsSeries` are equivalent: each column is treated as a series.
11
+ *
12
+ * Pass a value through `orientation` when calling a Sheet Chart builder's
13
+ * `setSource()` method or a live Sheet Chart's `setDataSource()` method.
14
+ *
15
+ * @example
16
+ * ```ts
17
+ * const fWorkbook = univerAPI.getActiveWorkbook();
18
+ * const fWorksheet = fWorkbook.getSheetByName('Sheet1');
19
+ *
20
+ * const chartInfo = fWorksheet
21
+ * .newChart(univerAPI.Enum.ChartTypeString.Column)
22
+ * .setSource({
23
+ * range: 'A1:D8',
24
+ * orientation: univerAPI.Enum.ChartSourceOrientation.Columns,
25
+ * })
26
+ * .build();
27
+ *
28
+ * await fWorksheet.insertChart(chartInfo);
29
+ * ```
30
+ */
5
31
  ChartSourceOrientation: typeof ChartSourceOrientation;
6
32
  }
33
+ /** @ignore */
7
34
  export declare class FSheetsChartEnumMixin extends FEnum implements IFSheetsChartEnumMixin {
8
35
  get ChartSourceOrientation(): typeof ChartSourceOrientation;
9
36
  }
@@ -0,0 +1,134 @@
1
+ import type { ChartTypeString } from '@univerjs-pro/engine-chart';
2
+ import type { HostComposedChartBuilder, IChartBuilderTypeMap } from '@univerjs-pro/engine-chart/facade';
3
+ import type { ChartAnchorSpec, ChartSourceSpec, ISheetChartInfo } from '@univerjs-pro/sheets-chart';
4
+ import { FWorksheet } from '@univerjs/sheets/facade';
5
+ import { FSheetChart } from './f-chart';
6
+ /** Sheet-only methods composed onto every Sheet Chart Builder. */
7
+ export interface ISheetChartMethods {
8
+ /**
9
+ * Sets the cell anchor used when inserting the Chart.
10
+ * @param {ChartAnchorSpec} anchor A1 notation or a zero-based row/column anchor with optional offsets.
11
+ * @returns {this} This Builder for chaining.
12
+ * @example
13
+ * ```ts
14
+ * const fWorkbook = univerAPI.getActiveWorkbook();
15
+ * const fWorksheet = fWorkbook.getSheetByName('Sheet1');
16
+ *
17
+ * const chartInfo = fWorksheet
18
+ * .newChart(univerAPI.Enum.ChartTypeString.Column)
19
+ * .setSource({
20
+ * range: 'A1:D8',
21
+ * orientation: univerAPI.Enum.ChartSourceOrientation.Columns,
22
+ * })
23
+ * .setPosition({
24
+ * row: 1,
25
+ * column: 5,
26
+ * rowOffset: 10,
27
+ * columnOffset: 20,
28
+ * })
29
+ * .setSize(640, 360)
30
+ * .setTitle('Quarterly sales')
31
+ * .build();
32
+ * await fWorksheet.insertChart(chartInfo);
33
+ * ```
34
+ */
35
+ setPosition(anchor: ChartAnchorSpec): this;
36
+ }
37
+ /** A type-specific Chart Builder composed with Sheet-only insertion methods. */
38
+ export type FSheetChartBuilderOf<T extends ChartTypeString> = HostComposedChartBuilder<IChartBuilderTypeMap<ChartSourceSpec, ChartSourceSpec, ISheetChartInfo>[T], ISheetChartMethods>;
39
+ /** @ignore */
40
+ export interface IFWorksheetChartMixin {
41
+ /**
42
+ * Creates a detached, type-specific Chart builder for this worksheet.
43
+ *
44
+ * @param {ChartTypeString} type The Chart type to create.
45
+ * @returns {FSheetChartBuilderOf<T>} A detached builder that produces insertable Sheet Chart information.
46
+ * @example
47
+ * ```ts
48
+ * const fWorkbook = univerAPI.getActiveWorkbook();
49
+ * const fWorksheet = fWorkbook.getSheetByName('Sheet1');
50
+ *
51
+ * const chartInfo = fWorksheet
52
+ * .newChart(univerAPI.Enum.ChartTypeString.Column)
53
+ * .setSource({
54
+ * range: 'A1:D8',
55
+ * orientation: univerAPI.Enum.ChartSourceOrientation.Columns,
56
+ * })
57
+ * .setPosition('F2')
58
+ * .setSize(640, 360)
59
+ * .setTitle('Quarterly sales')
60
+ * .build();
61
+ *
62
+ * const fChart = await fWorksheet.insertChart(chartInfo);
63
+ * console.log(fChart.getId());
64
+ * ```
65
+ */
66
+ newChart<T extends ChartTypeString>(type: T): FSheetChartBuilderOf<T>;
67
+ /**
68
+ * Inserts a Chart into this worksheet from detached Chart information.
69
+ *
70
+ * @param {ISheetChartInfo} info The Chart configuration, Sheet data source, and optional placement produced by a Chart builder.
71
+ * @returns {Promise<FSheetChart>} A live facade for the inserted Sheet Chart.
72
+ * @example
73
+ * ```ts
74
+ * const fWorkbook = univerAPI.getActiveWorkbook();
75
+ * const fWorksheet = fWorkbook.getSheetByName('Sheet1');
76
+ *
77
+ * const chartInfo = fWorksheet
78
+ * .newChart(univerAPI.Enum.ChartTypeString.Pie)
79
+ * .setSource('A1:B8')
80
+ * .setPosition('D2')
81
+ * .setSize(480, 320)
82
+ * .setDoughnutHole(0.4)
83
+ * .build();
84
+ *
85
+ * const fChart = await fWorksheet.insertChart(chartInfo);
86
+ * fChart.setPosition('E3');
87
+ * ```
88
+ */
89
+ insertChart(info: ISheetChartInfo): Promise<FSheetChart>;
90
+ /**
91
+ * Returns a Chart on this worksheet by its stable Chart identifier.
92
+ *
93
+ * @param {string} chartId The identifier returned by {@link FSheetChart.getId}.
94
+ * @returns {FSheetChart | null} A live Sheet Chart facade, or `null` if the Chart does not exist on this worksheet.
95
+ * @example
96
+ * ```ts
97
+ * const fWorkbook = univerAPI.getActiveWorkbook();
98
+ * const fWorksheet = fWorkbook.getSheetByName('Sheet1');
99
+ *
100
+ * const firstChart = fWorksheet.getCharts()[0];
101
+ * const fChart = firstChart ? fWorksheet.getChart(firstChart.getId()) : null;
102
+ * console.log(fChart?.getInfo());
103
+ * ```
104
+ */
105
+ getChart(chartId: string): FSheetChart | null;
106
+ /**
107
+ * Returns all Charts on this worksheet.
108
+ *
109
+ * @returns {FSheetChart[]} Live Sheet Chart facades in the worksheet's model order.
110
+ * @example
111
+ * ```ts
112
+ * const fWorkbook = univerAPI.getActiveWorkbook();
113
+ * const fWorksheet = fWorkbook.getSheetByName('Sheet1');
114
+ *
115
+ * const fCharts = fWorksheet.getCharts();
116
+ * fCharts.forEach((fChart) => {
117
+ * console.log(fChart.getId(), fChart.getInfo());
118
+ * });
119
+ * ```
120
+ */
121
+ getCharts(): FSheetChart[];
122
+ }
123
+ /** @ignore */
124
+ export declare class FWorksheetChartMixin extends FWorksheet implements IFWorksheetChartMixin {
125
+ newChart<T extends ChartTypeString>(type: T): FSheetChartBuilderOf<T>;
126
+ insertChart(info: ISheetChartInfo): Promise<FSheetChart>;
127
+ getChart(chartId: string): FSheetChart | null;
128
+ getCharts(): FSheetChart[];
129
+ private _chartSourceContext;
130
+ }
131
+ declare module '@univerjs/sheets/facade' {
132
+ interface FWorksheet extends IFWorksheetChartMixin {
133
+ }
134
+ }
@@ -1,4 +1,4 @@
1
- import './f-worksheet-charts';
1
+ import './f-worksheet';
2
2
  import './f-enum';
3
- export type { FSheetAnyChartBuilder, FSheetChartBuilder, FSheetChartBuilderOf, ISheetChartMethods } from './chart';
4
- export { FSheetCharts } from './chart';
3
+ export { FSheetChart } from './f-chart';
4
+ export type { FSheetChartBuilderOf, ISheetChartMethods } from './f-worksheet';
@@ -1,5 +1,11 @@
1
- export { ChartDiagnosticSeverity, ChartSourceKind, ChartSourceOrientation, resolveInitialChartPosition, resolveSourceSeries, resolveSourceSpec, SheetChartBuilder, SheetChartBuilderAdapter, toSheetChartCreateSpec, } from './chart-builder';
2
- export type { ChartAnchorSpec, ChartSourceSpec, IChartCreateSpec, IChartDiagnostic, ISheetChartBuilderAdapter, ISheetChartDescriptionExtension, ISheetChartHostPatch, ISheetChartSourceContext, } from './chart-builder';
1
+ export { SheetChartConfigAdapter } from './chart-builder/sheet-chart-config-adapter';
2
+ export type { ISheetChartConfigAdapter, ISheetChartHostPatch, } from './chart-builder/sheet-chart-config-adapter';
3
+ export type { ISheetChartDescriptionExtension } from './chart-builder/sheet-chart-description';
4
+ export { resolveInitialChartPosition } from './chart-builder/sheet-chart-layout';
5
+ export { resolveSourceSeries, resolveSourceSpec } from './chart-builder/sheet-chart-source';
6
+ export type { ISheetChartSourceContext, } from './chart-builder/sheet-chart-source';
7
+ export { ChartDiagnosticSeverity, ChartSourceKind, ChartSourceOrientation, } from './chart-builder/types';
8
+ export type { ChartAnchorSpec, ChartSourceSpec, IChartCreateSpec, IChartDiagnostic, ISheetChartInfo, } from './chart-builder/types';
3
9
  export { ChartUpdateConfigCommand, ReplaceSheetChartConfig } from './commands/commands/sheets-chart-update-config.command';
4
10
  export type { IChartUpdateConfigCommandParams } from './commands/commands/sheets-chart-update-config.command';
5
11
  export { ChartUpdateSourceCommand } from './commands/commands/sheets-chart-update-source.command';
@@ -15,7 +21,6 @@ export type { IInsertSheetsChartMutationParams, IRemoveSheetsChartMutationParams
15
21
  export { getAllowedChartTypes, setProperty, } from './common/util';
16
22
  export { ChartRenderMode, SHEETS_CHART_PLUGIN_CONFIG_KEY, } from './config/config';
17
23
  export type { IUniverSheetsChartConfig } from './config/config';
18
- export { SheetChartModel } from './models/chart-model';
19
24
  export type { IChartSourceMultiRangeItem, IChartSourceRangeItem, ISheetChartDataSource, ISheetChartSourceSingleRange, ISheetChartSourceSnapshot, } from './models/types';
20
25
  export { SHEETS_CHART_PLUGIN_NAME, UniverSheetsChartPlugin, } from './plugin';
21
26
  export { ChartModelService } from './services/chart-model.service';
@@ -1,7 +1,5 @@
1
1
  declare const locale: {
2
2
  'sheets-chart': {
3
- category: string;
4
- series: string;
5
3
  seriesDefaultName: string;
6
4
  categoryDefaultName: string;
7
5
  blank: string;
@@ -45,11 +43,48 @@ declare const locale: {
45
43
  histogram: {
46
44
  frequency: string;
47
45
  };
46
+ pie: {
47
+ aggregateOther: string;
48
+ aggregateMembers: string;
49
+ };
48
50
  treemap: {
49
51
  hierarchy: string;
50
52
  value: string;
51
53
  ownValue: string;
52
54
  children: string;
55
+ diagnostic: string;
56
+ };
57
+ sunburst: {
58
+ hierarchy: string;
59
+ value: string;
60
+ ownValue: string;
61
+ children: string;
62
+ diagnostic: string;
63
+ };
64
+ gauge: {
65
+ label: string;
66
+ value: string;
67
+ emptyDiagnostic: string;
68
+ mappingDiagnostic: string;
69
+ configDiagnostic: string;
70
+ };
71
+ chord: {
72
+ emptyDiagnostic: string;
73
+ mappingDiagnostic: string;
74
+ configDiagnostic: string;
75
+ source: string;
76
+ target: string;
77
+ value: string;
78
+ count: string;
79
+ associatedValue: string;
80
+ };
81
+ chartField: {
82
+ missingCategoryFields: string;
83
+ missingSeriesFields: string;
84
+ invalidFieldIndex: string;
85
+ invalidValueFieldType: string;
86
+ invalidDataStructure: string;
87
+ unsupportedChartType: string;
53
88
  };
54
89
  };
55
90
  };
@@ -11,5 +11,4 @@ export declare class UniverSheetsChartPlugin extends Plugin {
11
11
  static version: string;
12
12
  constructor(_config: IUniverSheetsChartConfig | undefined, _injector: Injector, _configService: IConfigService);
13
13
  onStarting(): void;
14
- private _getWatermark;
15
14
  }
@@ -1,30 +1,29 @@
1
- import type { IChartContext } from '@univerjs-pro/engine-chart';
1
+ import type { IChartContext, IChartModelInit } from '@univerjs-pro/engine-chart';
2
2
  import type { Nullable } from '@univerjs/core';
3
- import type { IChartModelInit } from '../models/chart-model';
4
3
  import type { ISheetChartDataSource } from '../models/types';
5
- import { Disposable, Injector, LocaleService } from '@univerjs/core';
6
- import { SheetChartModel } from '../models/chart-model';
4
+ import { ChartModel } from '@univerjs-pro/engine-chart';
5
+ import { Disposable, Injector } from '@univerjs/core';
7
6
  export declare const SHEET_CHART_PLUGIN = "SHEET_CHART_PLUGIN";
8
7
  export declare class ChartModelService extends Disposable {
9
8
  private _injector;
10
- private _localeService;
11
9
  private readonly _activeChartModel$;
12
- readonly activeChartModel$: import("rxjs").Observable<Nullable<SheetChartModel>>;
13
- get activeChartModel(): Nullable<SheetChartModel>;
10
+ readonly activeChartModel$: import("rxjs").Observable<Nullable<ChartModel<ISheetChartDataSource>>>;
11
+ get activeChartModel(): Nullable<ChartModel<ISheetChartDataSource>>;
14
12
  private _models;
15
13
  private _converters;
16
14
  private readonly _chartModelAdded$;
17
- readonly chartModelAdded$: import("rxjs").Observable<SheetChartModel>;
15
+ readonly chartModelAdded$: import("rxjs").Observable<ChartModel<ISheetChartDataSource>>;
18
16
  private readonly _chartModelRemoved$;
19
17
  readonly chartModelRemoved$: import("rxjs").Observable<string>;
20
- constructor(_injector: Injector, _localeService: LocaleService);
21
- setActiveChartModel(chartModel: SheetChartModel | null): void;
22
- getActiveChartModel(): Nullable<SheetChartModel>;
23
- getChartModel(id: string): SheetChartModel | undefined;
18
+ constructor(_injector: Injector);
19
+ setActiveChartModel(chartModel: ChartModel<ISheetChartDataSource> | null): void;
20
+ getActiveChartModel(): Nullable<ChartModel<ISheetChartDataSource>>;
21
+ getChartModel(id: string): ChartModel<ISheetChartDataSource> | undefined;
24
22
  refreshChartModel(): void;
25
- createChartModel(id: string, options: IChartModelInit, isNew?: boolean): SheetChartModel;
23
+ createChartModel(id: string, options: IChartModelInit<ISheetChartDataSource>, isNew?: boolean): ChartModel<ISheetChartDataSource>;
26
24
  removeChartModel(id: string): void;
27
- generateChartModelContext(id: string): IChartContext | undefined;
25
+ generateChartModelContext(id: string, initializeSelection?: boolean): IChartContext | undefined;
26
+ reconcileChartModelContext(id: string): IChartContext | undefined;
28
27
  generateChartModelContextForDataSource(id: string, dataSource: ISheetChartDataSource): IChartContext | undefined;
29
28
  dispose(): void;
30
29
  }
@@ -1,17 +1,17 @@
1
- import type { SheetChartModel } from '../models/chart-model';
2
- import type { ISheetChartSourceRanges } from '../models/types';
1
+ import type { ChartModel } from '@univerjs-pro/engine-chart';
2
+ import type { ISheetChartDataSource, ISheetChartSourceRanges } from '../models/types';
3
3
  import { Disposable, ICommandService } from '@univerjs/core';
4
4
  import { RefRangeService } from '@univerjs/sheets';
5
5
  export interface ISheetChartRangeWatcherCallbacks {
6
- onDataChanged(model: SheetChartModel): void;
7
- onRangeChanged(model: SheetChartModel, rangeInfo: ISheetChartSourceRanges): void;
6
+ onDataChanged(model: ChartModel<ISheetChartDataSource>): void;
7
+ onRangeChanged(model: ChartModel<ISheetChartDataSource>, rangeInfo: ISheetChartSourceRanges): void;
8
8
  }
9
9
  export declare class SheetChartRangeWatcher extends Disposable {
10
10
  private readonly _commandService;
11
11
  private readonly _refRangeService;
12
12
  private readonly _bindings;
13
13
  constructor(_commandService: ICommandService, _refRangeService: RefRangeService);
14
- bind(model: SheetChartModel, callbacks: ISheetChartRangeWatcherCallbacks): void;
14
+ bind(model: ChartModel<ISheetChartDataSource>, callbacks: ISheetChartRangeWatcherCallbacks): void;
15
15
  unbind(chartId: string): void;
16
16
  private _watchRange;
17
17
  private _watchSingleRange;
@@ -1,6 +1,5 @@
1
- import type { IChartSnapshot } from '@univerjs-pro/engine-chart';
1
+ import type { ChartModel, IChartSnapshot } from '@univerjs-pro/engine-chart';
2
2
  import type { Nullable } from '@univerjs/core';
3
- import type { SheetChartModel } from '../models/chart-model';
4
3
  import type { ISheetChartDataSource, ISheetChartSourceRanges } from '../models/types';
5
4
  import { ChartTypeBits, DataOrientation } from '@univerjs-pro/engine-chart';
6
5
  import { Disposable, IResourceManagerService, IUniverInstanceService } from '@univerjs/core';
@@ -28,11 +27,14 @@ export declare class SheetsChartService extends Disposable {
28
27
  constructor(_resourcesManagerService: IResourceManagerService, _univerInstanceService: IUniverInstanceService, _chartModelService: ChartModelService, _rangeWatcher: SheetChartRangeWatcher);
29
28
  setLoaded(): void;
30
29
  getSubUnitId(unitId: string, chartModelId: string): Nullable<string>;
31
- getUnitChartModels(unitId: string, subUnitId: string): (SheetChartModel | undefined)[];
30
+ getUnitChartModels(unitId: string, subUnitId: string): (ChartModel<ISheetChartDataSource> | undefined)[];
32
31
  getChartSuggestion(rangeInfo: ISheetChartSourceRanges): {
33
32
  orient: DataOrientation;
34
33
  chartType: ChartTypeBits;
35
34
  };
35
+ private _getPrimaryChartSuggestion;
36
+ private _hasSeries;
37
+ private _getSuggestionForOrientation;
36
38
  private _normalizeInitialRangeInfo;
37
39
  private _hasNonNumberCellInSingleRow;
38
40
  ensureChartModelCollection(unitId: string, subUnitId: string): Set<string>;
@@ -41,9 +43,9 @@ export declare class SheetsChartService extends Disposable {
41
43
  replaceChartDataSource(id: string, rangeInfo: ISheetChartSourceRanges): boolean;
42
44
  generateChartModelContextForSource(id: string, rangeInfo: ISheetChartSourceRanges): import("@univerjs-pro/engine-chart").IChartContext | undefined;
43
45
  refreshChartSource(): void;
44
- createChartModel(unitId: string, subUnitId: string, options: ISheetChartModelOptions, isNew?: boolean): SheetChartModel;
46
+ createChartModel(unitId: string, subUnitId: string, options: ISheetChartModelOptions, isNew?: boolean): ChartModel<ISheetChartDataSource>;
45
47
  removeChartModel(id: string): void;
46
- getChartModel(id: string): SheetChartModel | undefined;
48
+ getChartModel(id: string): ChartModel<ISheetChartDataSource> | undefined;
47
49
  private _serializeChartForUnit;
48
50
  private _refreshChartDataAndContext;
49
51
  private _bindRangeWatcher;