@univerjs-pro/sheets-chart 0.24.0 → 0.25.0

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 (107) 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 -0
  4. package/lib/cjs/locale/ca-ES.js +1 -1
  5. package/lib/cjs/locale/de-DE.js +1 -0
  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 -0
  11. package/lib/cjs/locale/it-IT.js +1 -0
  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 -0
  15. package/lib/cjs/locale/pt-BR.js +1 -0
  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 -0
  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 -0
  25. package/lib/es/locale/ca-ES.js +1 -1
  26. package/lib/es/locale/de-DE.js +1 -0
  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 -0
  32. package/lib/es/locale/it-IT.js +1 -0
  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 -0
  36. package/lib/es/locale/pt-BR.js +1 -0
  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 -0
  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 -0
  46. package/lib/locale/ca-ES.js +1 -1
  47. package/lib/locale/de-DE.js +1 -0
  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 -0
  53. package/lib/locale/it-IT.js +1 -0
  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 -0
  57. package/lib/locale/pt-BR.js +1 -0
  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 -0
  63. package/lib/locale/zh-TW.js +1 -1
  64. package/lib/types/facade/chart-builder/chart-builder-base.d.ts +40 -20
  65. package/lib/types/facade/chart-builder/line-chart-builder.d.ts +10 -5
  66. package/lib/types/facade/chart-builder/pie-chart-builder.d.ts +14 -7
  67. package/lib/types/facade/chart-builder/radar-chart-builder.d.ts +6 -3
  68. package/lib/types/facade/f-chart.d.ts +10 -5
  69. package/lib/types/facade/f-enum.d.ts +16 -8
  70. package/lib/types/facade/f-worksheet.d.ts +12 -6
  71. package/lib/types/locale/ar-SA.d.ts +3 -0
  72. package/lib/types/locale/ca-ES.d.ts +1 -1
  73. package/lib/types/locale/de-DE.d.ts +3 -0
  74. package/lib/types/locale/en-US.d.ts +33 -1
  75. package/lib/types/locale/es-ES.d.ts +1 -1
  76. package/lib/types/locale/fa-IR.d.ts +1 -1
  77. package/lib/types/locale/fr-FR.d.ts +1 -1
  78. package/lib/types/locale/id-ID.d.ts +3 -0
  79. package/lib/types/locale/it-IT.d.ts +3 -0
  80. package/lib/types/locale/pl-PL.d.ts +3 -0
  81. package/lib/types/locale/pt-BR.d.ts +3 -0
  82. package/lib/types/locale/ru-RU.d.ts +1 -1
  83. package/lib/types/locale/zh-HK.d.ts +3 -0
  84. package/lib/types/models/chart-model.d.ts +4 -1
  85. package/lib/types/services/chart-model.service.d.ts +3 -2
  86. package/lib/umd/facade.js +1 -1
  87. package/lib/umd/index.js +1 -1
  88. package/lib/umd/locale/ar-SA.js +1 -0
  89. package/lib/umd/locale/ca-ES.js +1 -1
  90. package/lib/umd/locale/de-DE.js +1 -0
  91. package/lib/umd/locale/en-US.js +1 -1
  92. package/lib/umd/locale/es-ES.js +1 -1
  93. package/lib/umd/locale/fa-IR.js +1 -1
  94. package/lib/umd/locale/fr-FR.js +1 -1
  95. package/lib/umd/locale/id-ID.js +1 -0
  96. package/lib/umd/locale/it-IT.js +1 -0
  97. package/lib/umd/locale/ja-JP.js +1 -1
  98. package/lib/umd/locale/ko-KR.js +1 -1
  99. package/lib/umd/locale/pl-PL.js +1 -0
  100. package/lib/umd/locale/pt-BR.js +1 -0
  101. package/lib/umd/locale/ru-RU.js +1 -1
  102. package/lib/umd/locale/sk-SK.js +1 -1
  103. package/lib/umd/locale/vi-VN.js +1 -1
  104. package/lib/umd/locale/zh-CN.js +1 -1
  105. package/lib/umd/locale/zh-HK.js +1 -0
  106. package/lib/umd/locale/zh-TW.js +1 -1
  107. package/package.json +9 -9
@@ -311,7 +311,8 @@ export declare class FChartBuilderBase extends FBase {
311
311
  * @example
312
312
  * ```ts
313
313
  * const fWorkbook = univerAPI.getActiveWorkbook();
314
- * const fWorksheet = fWorkbook.getActiveSheet();
314
+ * const fWorksheet = fWorkbook.getSheetByName('Sheet1');
315
+ * if (!fWorksheet) return;
315
316
  *
316
317
  * // Create a column chart with data source A1:D6
317
318
  * // The starting position is upper-left corner of cell B2.
@@ -341,7 +342,8 @@ export declare class FChartBuilderBase extends FBase {
341
342
  * @example
342
343
  * ```ts
343
344
  * const fWorkbook = univerAPI.getActiveWorkbook();
344
- * const fWorksheet = fWorkbook.getActiveSheet();
345
+ * const fWorksheet = fWorkbook.getSheetByName('Sheet1');
346
+ * if (!fWorksheet) return;
345
347
  *
346
348
  * // Create a column chart with data source A1:D6
347
349
  * // The starting position is upper-left corner of cell F3 and offset 20 pixels to the right and down.
@@ -364,7 +366,8 @@ export declare class FChartBuilderBase extends FBase {
364
366
  * @example
365
367
  * ```ts
366
368
  * const fWorkbook = univerAPI.getActiveWorkbook();
367
- * const fWorksheet = fWorkbook.getActiveSheet();
369
+ * const fWorksheet = fWorkbook.getSheetByName('Sheet1');
370
+ * if (!fWorksheet) return;
368
371
  *
369
372
  * // Create a column chart with data source A1:D6
370
373
  * // The starting position is (100, 200) pixels from the top left-hand corner of the sheet.
@@ -386,7 +389,8 @@ export declare class FChartBuilderBase extends FBase {
386
389
  * @example
387
390
  * ```ts
388
391
  * const fWorkbook = univerAPI.getActiveWorkbook();
389
- * const fWorksheet = fWorkbook.getActiveSheet();
392
+ * const fWorksheet = fWorkbook.getSheetByName('Sheet1');
393
+ * if (!fWorksheet) return;
390
394
  *
391
395
  * // Create a column chart with data source A1:D6
392
396
  * // The starting position is upper-left corner of cell B2.
@@ -418,7 +422,8 @@ export declare class FChartBuilderBase extends FBase {
418
422
  * @example
419
423
  * ```ts
420
424
  * const fWorkbook = univerAPI.getActiveWorkbook();
421
- * const fWorksheet = fWorkbook.getActiveSheet();
425
+ * const fWorksheet = fWorkbook.getSheetByName('Sheet1');
426
+ * if (!fWorksheet) return;
422
427
  *
423
428
  * // Create a column chart with data source A1:D6
424
429
  * // The starting position is upper-left corner of cell B2.
@@ -442,7 +447,8 @@ export declare class FChartBuilderBase extends FBase {
442
447
  * @example
443
448
  * ```ts
444
449
  * const fWorkbook = univerAPI.getActiveWorkbook();
445
- * const fWorksheet = fWorkbook.getActiveSheet();
450
+ * const fWorksheet = fWorkbook.getSheetByName('Sheet1');
451
+ * if (!fWorksheet) return;
446
452
  *
447
453
  * // Create a column chart with data source A1:D6
448
454
  * // The starting position is upper-left corner of cell B2.
@@ -467,7 +473,8 @@ export declare class FChartBuilderBase extends FBase {
467
473
  * @example
468
474
  * ```ts
469
475
  * const fWorkbook = univerAPI.getActiveWorkbook();
470
- * const fWorkSheet = fWorkbook.getActiveSheet();
476
+ * const fWorkSheet = fWorkbook.getSheetByName('Sheet1');
477
+ * if (!fWorkSheet) return;
471
478
  * const chartBuilder = fWorkSheet.newChart().asPieChart();
472
479
  * const chartBuilderInfo1 = chartBuilder
473
480
  * .addRange('A1:D6')
@@ -510,7 +517,8 @@ export declare class FChartBuilderBase extends FBase {
510
517
  * @example
511
518
  * ```ts
512
519
  * const fWorkbook = univerAPI.getActiveWorkbook();
513
- * const fWorksheet = fWorkbook.getActiveSheet();
520
+ * const fWorksheet = fWorkbook.getSheetByName('Sheet1');
521
+ * if (!fWorksheet) return;
514
522
  *
515
523
  * // Create a column chart with data source A1:D6
516
524
  * // The starting position is upper-left corner of cell B2.
@@ -534,7 +542,8 @@ export declare class FChartBuilderBase extends FBase {
534
542
  * @example
535
543
  * ```ts
536
544
  * const fWorkbook = univerAPI.getActiveWorkbook();
537
- * const fWorksheet = fWorkbook.getActiveSheet();
545
+ * const fWorksheet = fWorkbook.getSheetByName('Sheet1');
546
+ * if (!fWorksheet) return;
538
547
  *
539
548
  * // register your theme
540
549
  * const theme = { // your theme object
@@ -587,7 +596,8 @@ export declare class FChartBuilderBase extends FBase {
587
596
  * @example
588
597
  * ```ts
589
598
  * const fWorkbook = univerAPI.getActiveWorkbook();
590
- * const fWorksheet = fWorkbook.getActiveSheet();
599
+ * const fWorksheet = fWorkbook.getSheetByName('Sheet1');
600
+ * if (!fWorksheet) return;
591
601
  *
592
602
  * // Create a column chart with data source A1:D6
593
603
  * // The starting position is upper-left corner of cell B2.
@@ -610,7 +620,8 @@ export declare class FChartBuilderBase extends FBase {
610
620
  * @example
611
621
  * ```ts
612
622
  * const fWorkbook = univerAPI.getActiveWorkbook();
613
- * const fWorksheet = fWorkbook.getActiveSheet();
623
+ * const fWorksheet = fWorkbook.getSheetByName('Sheet1');
624
+ * if (!fWorksheet) return;
614
625
  *
615
626
  * // Create a line chart with data source A1:D6
616
627
  * // The starting position is upper-left corner of cell B2.
@@ -633,7 +644,8 @@ export declare class FChartBuilderBase extends FBase {
633
644
  * @example
634
645
  * ```ts
635
646
  * const fWorkbook = univerAPI.getActiveWorkbook();
636
- * const fWorksheet = fWorkbook.getActiveSheet();
647
+ * const fWorksheet = fWorkbook.getSheetByName('Sheet1');
648
+ * if (!fWorksheet) return;
637
649
  *
638
650
  * // Create a line chart with data source A1:D6
639
651
  * // The starting position is upper-left corner of cell B2.
@@ -656,7 +668,8 @@ export declare class FChartBuilderBase extends FBase {
656
668
  * @example
657
669
  * ```ts
658
670
  * const fWorkbook = univerAPI.getActiveWorkbook();
659
- * const fWorksheet = fWorkbook.getActiveSheet();
671
+ * const fWorksheet = fWorkbook.getSheetByName('Sheet1');
672
+ * if (!fWorksheet) return;
660
673
  *
661
674
  * // Create a column chart with data source A1:D6
662
675
  * // The starting position is upper-left corner of cell B2.
@@ -683,7 +696,8 @@ export declare class FChartBuilderBase extends FBase {
683
696
  * @example
684
697
  * ```ts
685
698
  * const fWorkbook = univerAPI.getActiveWorkbook();
686
- * const fWorksheet = fWorkbook.getActiveSheet();
699
+ * const fWorksheet = fWorkbook.getSheetByName('Sheet1');
700
+ * if (!fWorksheet) return;
687
701
  *
688
702
  * // Create a line chart with data source A1:D6
689
703
  * // The starting position is upper-left corner of cell B2.
@@ -710,7 +724,8 @@ export declare class FChartBuilderBase extends FBase {
710
724
  * @example
711
725
  * ```ts
712
726
  * const fWorkbook = univerAPI.getActiveWorkbook();
713
- * const fWorksheet = fWorkbook.getActiveSheet();
727
+ * const fWorksheet = fWorkbook.getSheetByName('Sheet1');
728
+ * if (!fWorksheet) return;
714
729
  *
715
730
  * // Create a line chart with data source A1:D6
716
731
  * // The starting position is upper-left corner of cell B2.
@@ -738,7 +753,8 @@ export declare class FChartBuilderBase extends FBase {
738
753
  * @example
739
754
  * ```ts
740
755
  * const fWorkbook = univerAPI.getActiveWorkbook();
741
- * const fWorksheet = fWorkbook.getActiveSheet();
756
+ * const fWorksheet = fWorkbook.getSheetByName('Sheet1');
757
+ * if (!fWorksheet) return;
742
758
  *
743
759
  * // Create a line chart with data source A1:D6
744
760
  * // The starting position is upper-left corner of cell B2.
@@ -766,7 +782,8 @@ export declare class FChartBuilderBase extends FBase {
766
782
  * @example
767
783
  * ```ts
768
784
  * const fWorkbook = univerAPI.getActiveWorkbook();
769
- * const fWorksheet = fWorkbook.getActiveSheet();
785
+ * const fWorksheet = fWorkbook.getSheetByName('Sheet1');
786
+ * if (!fWorksheet) return;
770
787
  *
771
788
  * // Create a line chart with data source A1:D6
772
789
  * // The starting position is upper-left corner of cell B2.
@@ -814,7 +831,8 @@ export declare class FChartBuilderBase extends FBase {
814
831
  * @example
815
832
  * ```ts
816
833
  * const fWorkbook = univerAPI.getActiveWorkbook();
817
- * const fWorksheet = fWorkbook.getActiveSheet();
834
+ * const fWorksheet = fWorkbook.getSheetByName('Sheet1');
835
+ * if (!fWorksheet) return;
818
836
  *
819
837
  * // Create a line chart with data source A1:D6
820
838
  * // The starting position is upper-left corner of cell B2.
@@ -848,7 +866,8 @@ export declare class FChartBuilderBase extends FBase {
848
866
  * @example
849
867
  * ```ts
850
868
  * const fWorkbook = univerAPI.getActiveWorkbook();
851
- * const fWorksheet = fWorkbook.getActiveSheet();
869
+ * const fWorksheet = fWorkbook.getSheetByName('Sheet1');
870
+ * if (!fWorksheet) return;
852
871
  *
853
872
  * // Create a line chart with data source A1:D6
854
873
  * // The starting position is upper-left corner of cell B2.
@@ -880,7 +899,8 @@ export declare class FChartBuilderBase extends FBase {
880
899
  * @example
881
900
  * ```ts
882
901
  * const fWorkbook = univerAPI.getActiveWorkbook();
883
- * const fWorksheet = fWorkbook.getActiveSheet();
902
+ * const fWorksheet = fWorkbook.getSheetByName('Sheet1');
903
+ * if (!fWorksheet) return;
884
904
  *
885
905
  * // Create a column chart with data source A1:D6
886
906
  * // The starting position is upper-left corner of cell B2.
@@ -32,7 +32,8 @@ export declare class LineChartBuilder extends FChartBuilderBase {
32
32
  * @example
33
33
  * ```ts
34
34
  * const fWorkbook = univerAPI.getActiveWorkbook();
35
- * const fWorksheet = fWorkbook.getActiveSheet();
35
+ * const fWorksheet = fWorkbook.getSheetByName('Sheet1');
36
+ * if (!fWorksheet) return;
36
37
  *
37
38
  * // Create a line chart builder with data source A1:D6.
38
39
  * // The starting position is upper-left corner of cell B2.
@@ -55,7 +56,8 @@ export declare class LineChartBuilder extends FChartBuilderBase {
55
56
  * @example
56
57
  * ```ts
57
58
  * const fWorkbook = univerAPI.getActiveWorkbook();
58
- * const fWorksheet = fWorkbook.getActiveSheet();
59
+ * const fWorksheet = fWorkbook.getSheetByName('Sheet1');
60
+ * if (!fWorksheet) return;
59
61
  *
60
62
  * // Create a line chart with data source A1:D6.
61
63
  * // The starting position is upper-left corner of cell B2.
@@ -80,7 +82,8 @@ export declare class LineChartBuilder extends FChartBuilderBase {
80
82
  * @example
81
83
  * ```ts
82
84
  * const fWorkbook = univerAPI.getActiveWorkbook();
83
- * const fWorksheet = fWorkbook.getActiveSheet();
85
+ * const fWorksheet = fWorkbook.getSheetByName('Sheet1');
86
+ * if (!fWorksheet) return;
84
87
  *
85
88
  * // Create a line chart with data source A1:D6.
86
89
  * // The starting position is upper-left corner of cell B2.
@@ -105,7 +108,8 @@ export declare class LineChartBuilder extends FChartBuilderBase {
105
108
  * @example
106
109
  * ```ts
107
110
  * const fWorkbook = univerAPI.getActiveWorkbook();
108
- * const fWorksheet = fWorkbook.getActiveSheet();
111
+ * const fWorksheet = fWorkbook.getSheetByName('Sheet1');
112
+ * if (!fWorksheet) return;
109
113
  *
110
114
  * // Create a line chart with data source A1:D6.
111
115
  * // The starting position is upper-left corner of cell B2.
@@ -132,7 +136,8 @@ export declare class LineChartBuilder extends FChartBuilderBase {
132
136
  * @example
133
137
  * ```ts
134
138
  * const fWorkbook = univerAPI.getActiveWorkbook();
135
- * const fWorksheet = fWorkbook.getActiveSheet();
139
+ * const fWorksheet = fWorkbook.getSheetByName('Sheet1');
140
+ * if (!fWorksheet) return;
136
141
  *
137
142
  * // Create a line chart with data source A1:D6.
138
143
  * // The starting position is upper-left corner of cell B2.
@@ -21,7 +21,8 @@ export declare class PieChartBuilder extends FChartBuilderBase {
21
21
  * @example
22
22
  * ```ts
23
23
  * const fWorkbook = univerAPI.getActiveWorkbook();
24
- * const fWorksheet = fWorkbook.getActiveSheet();
24
+ * const fWorksheet = fWorkbook.getSheetByName('Sheet1');
25
+ * if (!fWorksheet) return;
25
26
  *
26
27
  * // Create a pie chart with data source A1:D6.
27
28
  * // The starting position is upper-left corner of cell B2.
@@ -44,7 +45,8 @@ export declare class PieChartBuilder extends FChartBuilderBase {
44
45
  * @example
45
46
  * ```ts
46
47
  * const fWorkbook = univerAPI.getActiveWorkbook();
47
- * const fWorksheet = fWorkbook.getActiveSheet();
48
+ * const fWorksheet = fWorkbook.getSheetByName('Sheet1');
49
+ * if (!fWorksheet) return;
48
50
  *
49
51
  * // Create a pie chart with data source A1:D6.
50
52
  * // The starting position is upper-left corner of cell B2.
@@ -67,7 +69,8 @@ export declare class PieChartBuilder extends FChartBuilderBase {
67
69
  * @example
68
70
  * ```ts
69
71
  * const fWorkbook = univerAPI.getActiveWorkbook();
70
- * const fWorksheet = fWorkbook.getActiveSheet();
72
+ * const fWorksheet = fWorkbook.getSheetByName('Sheet1');
73
+ * if (!fWorksheet) return;
71
74
  *
72
75
  * // Create a pie chart with data source A1:D6.
73
76
  * // The starting position is upper-left corner of cell B2.
@@ -90,7 +93,8 @@ export declare class PieChartBuilder extends FChartBuilderBase {
90
93
  * @example
91
94
  * ```ts
92
95
  * const fWorkbook = univerAPI.getActiveWorkbook();
93
- * const fWorksheet = fWorkbook.getActiveSheet();
96
+ * const fWorksheet = fWorkbook.getSheetByName('Sheet1');
97
+ * if (!fWorksheet) return;
94
98
  *
95
99
  * // Create a pie chart with data source A1:D6.
96
100
  * // The starting position is upper-left corner of cell B2.
@@ -113,7 +117,8 @@ export declare class PieChartBuilder extends FChartBuilderBase {
113
117
  * @example
114
118
  * ```ts
115
119
  * const fWorkbook = univerAPI.getActiveWorkbook();
116
- * const fWorksheet = fWorkbook.getActiveSheet();
120
+ * const fWorksheet = fWorkbook.getSheetByName('Sheet1');
121
+ * if (!fWorksheet) return;
117
122
  *
118
123
  * // Create a pie chart with data source A1:D6.
119
124
  * // The starting position is upper-left corner of cell B2.
@@ -136,7 +141,8 @@ export declare class PieChartBuilder extends FChartBuilderBase {
136
141
  * @example
137
142
  * ```ts
138
143
  * const fWorkbook = univerAPI.getActiveWorkbook();
139
- * const fWorksheet = fWorkbook.getActiveSheet();
144
+ * const fWorksheet = fWorkbook.getSheetByName('Sheet1');
145
+ * if (!fWorksheet) return;
140
146
  *
141
147
  * // Create a pie chart with data source A1:D6.
142
148
  * // The starting position is upper-left corner of cell B2.
@@ -159,7 +165,8 @@ export declare class PieChartBuilder extends FChartBuilderBase {
159
165
  * @example
160
166
  * ```ts
161
167
  * const fWorkbook = univerAPI.getActiveWorkbook();
162
- * const fWorksheet = fWorkbook.getActiveSheet();
168
+ * const fWorksheet = fWorkbook.getSheetByName('Sheet1');
169
+ * if (!fWorksheet) return;
163
170
  *
164
171
  * // Create a pie chart with data source A1:D6.
165
172
  * // The starting position is upper-left corner of cell B2.
@@ -24,7 +24,8 @@ export declare class RadarChartBuilder extends FChartBuilderBase {
24
24
  * @example
25
25
  * ```ts
26
26
  * const fWorkbook = univerAPI.getActiveWorkbook();
27
- * const fWorksheet = fWorkbook.getActiveSheet();
27
+ * const fWorksheet = fWorkbook.getSheetByName('Sheet1');
28
+ * if (!fWorksheet) return;
28
29
  *
29
30
  * // Create a radar chart with data source A1:D6.
30
31
  * // The starting position is upper-left corner of cell B2.
@@ -48,7 +49,8 @@ export declare class RadarChartBuilder extends FChartBuilderBase {
48
49
  * @example
49
50
  * ```ts
50
51
  * const fWorkbook = univerAPI.getActiveWorkbook();
51
- * const fWorksheet = fWorkbook.getActiveSheet();
52
+ * const fWorksheet = fWorkbook.getSheetByName('Sheet1');
53
+ * if (!fWorksheet) return;
52
54
  *
53
55
  * // Create a radar chart with data source A1:D6.
54
56
  * // The starting position is upper-left corner of cell B2.
@@ -72,7 +74,8 @@ export declare class RadarChartBuilder extends FChartBuilderBase {
72
74
  * @example
73
75
  * ```ts
74
76
  * const fWorkbook = univerAPI.getActiveWorkbook();
75
- * const fWorksheet = fWorkbook.getActiveSheet();
77
+ * const fWorksheet = fWorkbook.getSheetByName('Sheet1');
78
+ * if (!fWorksheet) return;
76
79
  *
77
80
  * // Create a radar chart with data source A1:D6.
78
81
  * // The starting position is upper-left corner of cell B2.
@@ -28,7 +28,8 @@ export declare class FChart {
28
28
  * @example
29
29
  * ```ts
30
30
  * const fWorkbook = univerAPI.getActiveWorkbook();
31
- * const fWorksheet = fWorkbook.getActiveSheet();
31
+ * const fWorksheet = fWorkbook.getSheetByName('Sheet1');
32
+ * if (!fWorksheet) return;
32
33
  * const charts = fWorksheet.getCharts();
33
34
  * console.log(charts[0]?.getChartId());
34
35
  * ```
@@ -41,7 +42,8 @@ export declare class FChart {
41
42
  * @example
42
43
  * ```ts
43
44
  * const fWorkbook = univerAPI.getActiveWorkbook();
44
- * const fWorksheet = fWorkbook.getActiveSheet();
45
+ * const fWorksheet = fWorkbook.getSheetByName('Sheet1');
46
+ * if (!fWorksheet) return;
45
47
  * const charts = fWorksheet.getCharts();
46
48
  * console.log(charts[0]?.getRange());
47
49
  * ```
@@ -59,7 +61,8 @@ export declare class FChart {
59
61
  * @example
60
62
  * ```ts
61
63
  * const fWorkbook = univerAPI.getActiveWorkbook();
62
- * const fWorksheet = fWorkbook.getActiveSheet();
64
+ * const fWorksheet = fWorkbook.getSheetByName('Sheet1');
65
+ * if (!fWorksheet) return;
63
66
  *
64
67
  * // Get all charts on the active sheet.
65
68
  * const charts = fWorksheet.getCharts();
@@ -86,7 +89,8 @@ export declare class FChart {
86
89
  * @example
87
90
  * ```ts
88
91
  * const fWorkbook = univerAPI.getActiveWorkbook();
89
- * const fWorksheet = fWorkbook.getActiveSheet();
92
+ * const fWorksheet = fWorkbook.getSheetByName('Sheet1');
93
+ * if (!fWorksheet) return;
90
94
  * const charts = fWorksheet.getCharts();
91
95
  * if (charts.length > 0){
92
96
  * const seriesData = charts[0].getSeriesData();
@@ -110,7 +114,8 @@ export declare class FChart {
110
114
  * @example
111
115
  * ```ts
112
116
  * const fWorkbook = univerAPI.getActiveWorkbook();
113
- * const fWorksheet = fWorkbook.getActiveSheet();
117
+ * const fWorksheet = fWorkbook.getSheetByName('Sheet1');
118
+ * if (!fWorksheet) return;
114
119
  * const charts = fWorksheet.getCharts();
115
120
  * if (charts.length > 0){
116
121
  * const categoryData = charts[0].getCategoryData();
@@ -10,7 +10,8 @@ export interface IFSheetsChartEnumMixin {
10
10
  * @example
11
11
  * ```ts
12
12
  * const fWorkbook = univerAPI.getActiveWorkbook();
13
- * const fWorksheet = fWorkbook.getActiveSheet();
13
+ * const fWorksheet = fWorkbook.getSheetByName('Sheet1');
14
+ * if (!fWorksheet) return;
14
15
  *
15
16
  * // Create a column chart with data source A1:D6.
16
17
  * // The starting position is upper-left corner of cell B2.
@@ -30,7 +31,8 @@ export interface IFSheetsChartEnumMixin {
30
31
  * @example
31
32
  * ```ts
32
33
  * const fWorkbook = univerAPI.getActiveWorkbook();
33
- * const fWorksheet = fWorkbook.getActiveSheet();
34
+ * const fWorksheet = fWorkbook.getSheetByName('Sheet1');
35
+ * if (!fWorksheet) return;
34
36
  *
35
37
  * // Create a line chart with data source A1:D6.
36
38
  * // The starting position is upper-left corner of cell B2.
@@ -52,7 +54,8 @@ export interface IFSheetsChartEnumMixin {
52
54
  * @example
53
55
  * ```ts
54
56
  * const fWorkbook = univerAPI.getActiveWorkbook();
55
- * const fWorksheet = fWorkbook.getActiveSheet();
57
+ * const fWorksheet = fWorkbook.getSheetByName('Sheet1');
58
+ * if (!fWorksheet) return;
56
59
  *
57
60
  * // Create a line chart with data source A1:D6.
58
61
  * // The starting position is upper-left corner of cell B2.
@@ -74,7 +77,8 @@ export interface IFSheetsChartEnumMixin {
74
77
  * @example
75
78
  * ```ts
76
79
  * const fWorkbook = univerAPI.getActiveWorkbook();
77
- * const fWorksheet = fWorkbook.getActiveSheet();
80
+ * const fWorksheet = fWorkbook.getSheetByName('Sheet1');
81
+ * if (!fWorksheet) return;
78
82
  *
79
83
  * // Create a line chart with data source A1:D6.
80
84
  * // The starting position is upper-left corner of cell B2.
@@ -102,7 +106,8 @@ export interface IFSheetsChartEnumMixin {
102
106
  * @example
103
107
  * ```ts
104
108
  * const fWorkbook = univerAPI.getActiveWorkbook();
105
- * const fWorksheet = fWorkbook.getActiveSheet();
109
+ * const fWorksheet = fWorkbook.getSheetByName('Sheet1');
110
+ * if (!fWorksheet) return;
106
111
  *
107
112
  * // Create a line chart with data source A1:D6.
108
113
  * // The starting position is upper-left corner of cell B2.
@@ -128,7 +133,8 @@ export interface IFSheetsChartEnumMixin {
128
133
  * @example
129
134
  * ```ts
130
135
  * const fWorkbook = univerAPI.getActiveWorkbook();
131
- * const fWorksheet = fWorkbook.getActiveSheet();
136
+ * const fWorksheet = fWorkbook.getSheetByName('Sheet1');
137
+ * if (!fWorksheet) return;
132
138
  *
133
139
  * // Create a line chart with data source A1:D6.
134
140
  * // The starting position is upper-left corner of cell B2.
@@ -151,7 +157,8 @@ export interface IFSheetsChartEnumMixin {
151
157
  * @example
152
158
  * ```ts
153
159
  * const fWorkbook = univerAPI.getActiveWorkbook();
154
- * const fWorksheet = fWorkbook.getActiveSheet();
160
+ * const fWorksheet = fWorkbook.getSheetByName('Sheet1');
161
+ * if (!fWorksheet) return;
155
162
  *
156
163
  * // Create a line chart with data source A1:D6.
157
164
  * // The starting position is upper-left corner of cell B2.
@@ -177,7 +184,8 @@ export interface IFSheetsChartEnumMixin {
177
184
  * @example
178
185
  * ```ts
179
186
  * const fWorkbook = univerAPI.getActiveWorkbook();
180
- * const fWorksheet = fWorkbook.getActiveSheet();
187
+ * const fWorksheet = fWorkbook.getSheetByName('Sheet1');
188
+ * if (!fWorksheet) return;
181
189
  *
182
190
  * // Create a radar chart with data source A1:D6.
183
191
  * // The starting position is upper-left corner of cell B2.
@@ -15,7 +15,8 @@ export interface IFWorksheetChartMixin {
15
15
  * @example
16
16
  * ```ts
17
17
  * const fWorkbook = univerAPI.getActiveWorkbook();
18
- * const fWorksheet = fWorkbook.getActiveSheet();
18
+ * const fWorksheet = fWorkbook.getSheetByName('Sheet1');
19
+ * if (!fWorksheet) return;
19
20
  *
20
21
  * // Create a column chart with data source A1:D6.
21
22
  * // The starting position is upper-left corner of cell B2.
@@ -35,7 +36,8 @@ export interface IFWorksheetChartMixin {
35
36
  * @example
36
37
  * ```ts
37
38
  * const fWorkbook = univerAPI.getActiveWorkbook();
38
- * const fWorksheet = fWorkbook.getActiveSheet();
39
+ * const fWorksheet = fWorkbook.getSheetByName('Sheet1');
40
+ * if (!fWorksheet) return;
39
41
  *
40
42
  * // Create a column chart with data source A1:D6.
41
43
  * // The starting position is upper-left corner of cell B2.
@@ -69,7 +71,8 @@ export interface IFWorksheetChartMixin {
69
71
  * @example
70
72
  * ```ts
71
73
  * const fWorkbook = univerAPI.getActiveWorkbook();
72
- * const fWorksheet = fWorkbook.getActiveSheet();
74
+ * const fWorksheet = fWorkbook.getSheetByName('Sheet1');
75
+ * if (!fWorksheet) return;
73
76
  *
74
77
  * // Create a column chart with data source A1:D6.
75
78
  * // The starting position is upper-left corner of cell B2.
@@ -92,7 +95,8 @@ export interface IFWorksheetChartMixin {
92
95
  * @example
93
96
  * ```ts
94
97
  * const fWorkbook = univerAPI.getActiveWorkbook();
95
- * const fWorksheet = fWorkbook.getActiveSheet();
98
+ * const fWorksheet = fWorkbook.getSheetByName('Sheet1');
99
+ * if (!fWorksheet) return;
96
100
  *
97
101
  * // Get all charts on the active sheet.
98
102
  * const charts = fWorksheet.getCharts();
@@ -107,7 +111,8 @@ export interface IFWorksheetChartMixin {
107
111
  * @example
108
112
  * ```ts
109
113
  * const fWorkbook = univerAPI.getActiveWorkbook();
110
- * const fWorksheet = fWorkbook.getActiveSheet();
114
+ * const fWorksheet = fWorkbook.getSheetByName('Sheet1');
115
+ * if (!fWorksheet) return;
111
116
  *
112
117
  * // Create a column chart with data source A1:D6.
113
118
  * // The starting position is upper-left corner of cell B2.
@@ -138,7 +143,8 @@ export interface IFWorksheetChartMixin {
138
143
  * @example
139
144
  * ```ts
140
145
  * const fWorkbook = univerAPI.getActiveWorkbook();
141
- * const fWorksheet = fWorkbook.getActiveSheet();
146
+ * const fWorksheet = fWorkbook.getSheetByName('Sheet1');
147
+ * if (!fWorksheet) return;
142
148
  *
143
149
  * // register your theme
144
150
  * const theme = { // your theme object
@@ -0,0 +1,3 @@
1
+ import type enUS from './en-US';
2
+ declare const locale: typeof enUS;
3
+ export default locale;
@@ -1,3 +1,3 @@
1
- import enUS from './en-US';
1
+ import type enUS from './en-US';
2
2
  declare const locale: typeof enUS;
3
3
  export default locale;
@@ -0,0 +1,3 @@
1
+ import type enUS from './en-US';
2
+ declare const locale: typeof enUS;
3
+ export default locale;
@@ -1,7 +1,39 @@
1
1
  declare const locale: {
2
- chart: {
2
+ 'sheets-chart': {
3
3
  category: string;
4
4
  series: string;
5
+ seriesDefaultName: string;
6
+ categoryDefaultName: string;
7
+ blank: string;
8
+ msg: {
9
+ emptyTips: string;
10
+ sankeyCircularTips: string;
11
+ };
12
+ bubble: {
13
+ emptyTips: string;
14
+ };
15
+ relation: {
16
+ emptyTips: string;
17
+ };
18
+ cloud: {
19
+ word: string;
20
+ frequency: string;
21
+ };
22
+ waterfall: {
23
+ positive: string;
24
+ negative: string;
25
+ subtotal: string;
26
+ };
27
+ pareto: {
28
+ lineName: string;
29
+ };
30
+ boxplot: {
31
+ min: string;
32
+ q1: string;
33
+ median: string;
34
+ q3: string;
35
+ max: string;
36
+ };
5
37
  };
6
38
  };
7
39
  export default locale;
@@ -1,3 +1,3 @@
1
- import enUS from './en-US';
1
+ import type enUS from './en-US';
2
2
  declare const locale: typeof enUS;
3
3
  export default locale;
@@ -1,3 +1,3 @@
1
- import enUS from './en-US';
1
+ import type enUS from './en-US';
2
2
  declare const locale: typeof enUS;
3
3
  export default locale;
@@ -1,3 +1,3 @@
1
- import enUS from './en-US';
1
+ import type enUS from './en-US';
2
2
  declare const locale: typeof enUS;
3
3
  export default locale;
@@ -0,0 +1,3 @@
1
+ import type enUS from './en-US';
2
+ declare const locale: typeof enUS;
3
+ export default locale;
@@ -0,0 +1,3 @@
1
+ import type enUS from './en-US';
2
+ declare const locale: typeof enUS;
3
+ export default locale;
@@ -0,0 +1,3 @@
1
+ import type enUS from './en-US';
2
+ declare const locale: typeof enUS;
3
+ export default locale;
@@ -0,0 +1,3 @@
1
+ import type enUS from './en-US';
2
+ declare const locale: typeof enUS;
3
+ export default locale;
@@ -1,3 +1,3 @@
1
- import enUS from './en-US';
1
+ import type enUS from './en-US';
2
2
  declare const locale: typeof enUS;
3
3
  export default locale;
@@ -0,0 +1,3 @@
1
+ import type enUS from './en-US';
2
+ declare const locale: typeof enUS;
3
+ export default locale;
@@ -1,15 +1,18 @@
1
- import type { ChartStyle, ChartTypeBits, IChartContext, IChartDataAggregation } from '@univerjs-pro/engine-chart';
1
+ import type { ChartStyle, ChartTypeBits, IChartContext, IChartDataAggregation, IChartLocaleTexts } from '@univerjs-pro/engine-chart';
2
2
  import type { Injector } from '@univerjs/core';
3
3
  import type { ChartDataSourceSingle } from '../chart-source/chart-source';
4
4
  import type { ISheetChartDataSource } from './types';
5
5
  import { ChartModel } from '@univerjs-pro/engine-chart';
6
+ import { LocaleService } from '@univerjs/core';
6
7
  export interface IChartModelInit {
7
8
  chartType?: ChartTypeBits;
8
9
  dataSource: ISheetChartDataSource;
9
10
  dataAggregation?: IChartDataAggregation;
10
11
  context?: Pick<IChartContext, 'categoryIndex' | 'seriesIndexes' | 'transform'>;
11
12
  style?: ChartStyle;
13
+ localeTexts?: IChartLocaleTexts;
12
14
  }
15
+ export declare function buildLocaleTexts(localeService: LocaleService): IChartLocaleTexts;
13
16
  export declare class SheetChartModel extends ChartModel {
14
17
  _dataSource: ChartDataSourceSingle;
15
18
  get dataSource(): ChartDataSourceSingle;