@univerjs-pro/sheets-chart 0.6.4 → 0.6.5

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 (63) hide show
  1. package/lib/cjs/index.js +1 -1
  2. package/lib/cjs/locale/en-US.js +1 -1
  3. package/lib/cjs/locale/fa-IR.js +1 -1
  4. package/lib/cjs/locale/fr-FR.js +1 -1
  5. package/lib/cjs/locale/ru-RU.js +1 -1
  6. package/lib/cjs/locale/vi-VN.js +1 -1
  7. package/lib/cjs/locale/zh-CN.js +1 -1
  8. package/lib/cjs/locale/zh-TW.js +1 -1
  9. package/lib/es/index.js +1 -1
  10. package/lib/es/locale/en-US.js +1 -1
  11. package/lib/es/locale/fa-IR.js +1 -1
  12. package/lib/es/locale/fr-FR.js +1 -1
  13. package/lib/es/locale/ru-RU.js +1 -1
  14. package/lib/es/locale/vi-VN.js +1 -1
  15. package/lib/es/locale/zh-CN.js +1 -1
  16. package/lib/es/locale/zh-TW.js +1 -1
  17. package/lib/types/chart-source/chart-source.d.ts +5 -21
  18. package/lib/types/commands/commands/sheets-chart-update-config.command.d.ts +1 -3
  19. package/lib/types/commands/mutations/sheets-chart-update-config.mutation.d.ts +1 -3
  20. package/lib/types/commands/mutations/sheets-chart.mutation.d.ts +1 -1
  21. package/lib/types/extra/func.d.ts +1 -1
  22. package/lib/types/extra/reverse.d.ts +37 -37
  23. package/lib/types/index.d.ts +2 -11
  24. package/lib/types/models/chart-model.d.ts +18 -0
  25. package/lib/types/models/types.d.ts +3 -62
  26. package/lib/types/services/chart-model.service.d.ts +9 -9
  27. package/lib/types/services/sheets-chart.service.d.ts +9 -9
  28. package/lib/umd/index.js +1 -1
  29. package/lib/umd/locale/en-US.js +1 -1
  30. package/lib/umd/locale/fa-IR.js +1 -1
  31. package/lib/umd/locale/fr-FR.js +1 -1
  32. package/lib/umd/locale/ru-RU.js +1 -1
  33. package/lib/umd/locale/vi-VN.js +1 -1
  34. package/lib/umd/locale/zh-CN.js +1 -1
  35. package/lib/umd/locale/zh-TW.js +1 -1
  36. package/package.json +7 -6
  37. package/lib/types/models/chart-data-operators/build-chart-data.d.ts +0 -3
  38. package/lib/types/models/chart-data-operators/index.d.ts +0 -2
  39. package/lib/types/models/chart-data-operators/operators.d.ts +0 -26
  40. package/lib/types/models/constants/build-in-theme/default.d.ts +0 -2
  41. package/lib/types/models/constants/build-in-theme/index.d.ts +0 -15
  42. package/lib/types/models/constants/build-in-theme/types.d.ts +0 -77
  43. package/lib/types/models/constants/build-in-theme/univer-gradient1.d.ts +0 -2
  44. package/lib/types/models/constants/build-in-theme/univer-gradient2.d.ts +0 -2
  45. package/lib/types/models/constants/build-in-theme/univer-gradient3.d.ts +0 -2
  46. package/lib/types/models/constants/build-in-theme/univer-gradient4.d.ts +0 -2
  47. package/lib/types/models/constants/build-in-theme/univer-gradient5.d.ts +0 -2
  48. package/lib/types/models/constants/build-in-theme/univer-gradient6.d.ts +0 -2
  49. package/lib/types/models/constants/build-in-theme/univer1.d.ts +0 -2
  50. package/lib/types/models/constants/build-in-theme/univer2.d.ts +0 -2
  51. package/lib/types/models/constants/build-in-theme/univer3.d.ts +0 -2
  52. package/lib/types/models/constants/build-in-theme/univer4.d.ts +0 -2
  53. package/lib/types/models/constants/build-in-theme/univer5.d.ts +0 -2
  54. package/lib/types/models/constants/build-in-theme/univer6.d.ts +0 -2
  55. package/lib/types/models/constants/default-chart-style.d.ts +0 -70
  56. package/lib/types/models/constants.d.ts +0 -78
  57. package/lib/types/models/data-context-transformers/bar-data-context-transformer.d.ts +0 -3
  58. package/lib/types/models/data-context-transformers/line-like-context-transformer.d.ts +0 -3
  59. package/lib/types/models/data-context-transformers/percent-data-context-transformer.d.ts +0 -3
  60. package/lib/types/models/data-context-transformers/pie-data-context-transformer.d.ts +0 -3
  61. package/lib/types/models/runtime-context.types.d.ts +0 -29
  62. package/lib/types/models/style.types.d.ts +0 -354
  63. package/lib/types/services/chart-theme.service.d.ts +0 -17
@@ -1,354 +0,0 @@
1
- import { Nullable } from '@univerjs/core';
2
- import { ChartTypeBits } from './constants';
3
- import { IChartRuntimeContext } from './runtime-context.types';
4
- export type DeepPartial<T> = T extends Record<string, any> ? T extends any[] ? T : {
5
- [key in keyof T]+?: DeepPartial<T[key]>;
6
- } : T;
7
- export declare enum SeriesLabelPosition {
8
- Auto = "auto",
9
- Top = "top",
10
- Bottom = "bottom",
11
- Left = "left",
12
- Right = "right",
13
- Inside = "inside",
14
- Outside = "outside"
15
- }
16
- export declare enum PieLabelPosition {
17
- Inside = "inside",
18
- Outside = "outside"
19
- }
20
- export declare enum RadarShape {
21
- Polygon = "polygon",
22
- Circle = "circle"
23
- }
24
- export declare enum LabelContentType {
25
- Empty = 0,
26
- CategoryName = 2,
27
- SeriesName = 4,
28
- Value = 8,
29
- Percentage = 16
30
- }
31
- export declare enum LabelAlignEnum {
32
- Left = "left",
33
- Right = "right",
34
- Center = "center"
35
- }
36
- export interface ILabelStyle {
37
- visible: boolean;
38
- content: string;
39
- fontSize: number;
40
- color: string;
41
- align: LabelAlignEnum;
42
- bold: boolean;
43
- family: string;
44
- strikethrough: boolean;
45
- italic: boolean;
46
- underline: boolean;
47
- padAngle: boolean;
48
- axisTitleAlign?: AxisAlignEnum | undefined;
49
- showMaxLabel?: boolean;
50
- showMinLabel?: boolean;
51
- }
52
- export interface ISeriesLabelStyle extends ILabelStyle {
53
- contentType: number;
54
- position: SeriesLabelPosition;
55
- }
56
- export interface IPieLabelStyle extends Omit<ILabelStyle, 'align' | 'content'> {
57
- contentType: number;
58
- position: PieLabelPosition;
59
- }
60
- /**
61
- * Enum representing different shapes for line chart data points or radar chart points.
62
- */
63
- export declare enum LinePointShape {
64
- /**
65
- * The circle shape.
66
- */
67
- Circle = "circle",
68
- /**
69
- * The square shape.
70
- */
71
- Square = "square",
72
- /**
73
- * The triangle shape.
74
- */
75
- Triangle = "triangle",
76
- /**
77
- * The diamond shape.
78
- */
79
- Diamond = "diamond",
80
- /**
81
- * The rectangle shape.
82
- */
83
- Rect = "rect",
84
- /**
85
- * The rounded rectangle shape.
86
- */
87
- RoundRect = "roundRect",
88
- /**
89
- * The pin shape.
90
- */
91
- Pin = "pin",
92
- /**
93
- * The arrow shape.
94
- */
95
- Arrow = "arrow",
96
- /**
97
- * No shape.
98
- */
99
- None = "none",
100
- /**
101
- * The empty circle shape.
102
- */
103
- EmptyCircle = "emptyCircle",
104
- /**
105
- * The empty square shape.
106
- */
107
- EmptySquare = "emptySquare",
108
- /**
109
- * The empty triangle shape.
110
- */
111
- EmptyTriangle = "emptyTriangle",
112
- /**
113
- * The empty diamond shape.
114
- */
115
- EmptyDiamond = "emptyDiamond",
116
- /**
117
- * The empty rectangle shape.
118
- */
119
- EmptyRect = "emptyRect",
120
- /**
121
- * The empty rounded rectangle shape.
122
- */
123
- EmptyRoundRect = "emptyRoundRect",
124
- /**
125
- * The empty pin shape.
126
- */
127
- EmptyPin = "emptyPin",
128
- /**
129
- * The empty arrow shape.
130
- */
131
- EmptyArrow = "emptyArrow"
132
- }
133
- export interface IPointStyle {
134
- shape: LinePointShape;
135
- size: number;
136
- color: Nullable<string>;
137
- }
138
- export interface IDataPointStyle extends IPointStyle {
139
- }
140
- /**
141
- * The border type of the chart series.
142
- */
143
- export declare enum ChartBorderDashType {
144
- /**
145
- * The solid line.
146
- */
147
- Solid = "solid",
148
- /**
149
- * The dashed line.
150
- */
151
- Dashed = "dashed",
152
- /**
153
- * The dotted line.
154
- */
155
- Dotted = "dotted"
156
- }
157
- export declare enum ChartCartesianAxisPosition {
158
- Left = "left",
159
- Right = "right"
160
- }
161
- export interface ISeriesStyle {
162
- chartType?: ChartTypeBits.Line | ChartTypeBits.Column | ChartTypeBits.Area;
163
- rightYAxis?: boolean;
164
- color: Nullable<string>;
165
- fillOpacity: number;
166
- border: {
167
- opacity: number;
168
- color: Nullable<string>;
169
- width: number;
170
- dashType: ChartBorderDashType;
171
- };
172
- label: ISeriesLabelStyle;
173
- point: IPointStyle;
174
- dataPoints: {
175
- [index: number]: IDataPointStyle;
176
- };
177
- }
178
- export interface IAllSeriesStyle extends Pick<ISeriesStyle, 'border' | 'label' | 'rightYAxis' | 'point' | 'color'> {
179
- }
180
- export declare enum StackType {
181
- Stacked = "0",
182
- Percent = "1"
183
- }
184
- export declare enum TextVerticalAlign {
185
- Top = "top",
186
- Middle = "middle",
187
- Bottom = "bottom"
188
- }
189
- export declare enum TextAlign {
190
- Left = "left",
191
- Center = "center",
192
- Right = "right"
193
- }
194
- /**
195
- * The position of the legend.
196
- */
197
- export declare enum LegendPositionEnum {
198
- /**
199
- * The legend is displayed at the top of the chart.
200
- */
201
- Top = "top",
202
- /**
203
- * The legend is displayed at the left of the chart.
204
- */
205
- Left = "left",
206
- /**
207
- * The legend is displayed at the right of the chart.
208
- */
209
- Right = "right",
210
- /**
211
- * The legend is displayed at the bottom of the chart.
212
- */
213
- Bottom = "bottom",
214
- /**
215
- * The legend is hidden.
216
- */
217
- Hide = "hide"
218
- }
219
- /**
220
- * The position of the title.
221
- */
222
- export declare enum TitlePositionEnum {
223
- /**
224
- * The chart title is displayed at the top of the chart.
225
- */
226
- Top = "top",
227
- /**
228
- * The chart title is displayed at the left of the chart
229
- */
230
- Left = "left",
231
- /**
232
- * The chart title is displayed at the right of the
233
- */
234
- Right = "right",
235
- /**
236
- * The chart title is displayed at the bottom of the
237
- */
238
- Bottom = "bottom",
239
- /**
240
- * The chart title is hidden.
241
- */
242
- Hide = "hide"
243
- }
244
- export declare enum AxisAlignEnum {
245
- Start = "start",
246
- Center = "center",
247
- End = "end"
248
- }
249
- /**
250
- * The selection mode of the legend.
251
- */
252
- export declare enum SelectModeEnum {
253
- /**
254
- * The single selection mode.
255
- */
256
- Single = "single",
257
- /**
258
- * The multiple selection
259
- */
260
- Multiple = "multiple",
261
- /**
262
- * The close selection mode.It means the legend can not be selected.
263
- */
264
- Close = "close"
265
- }
266
- export interface ILegendStyle {
267
- position?: LegendPositionEnum;
268
- label?: Omit<ILabelStyle, 'visible' | 'align' | 'content'>;
269
- selectMode?: SelectModeEnum;
270
- }
271
- export interface IGridLineStyle {
272
- visible: boolean;
273
- color: string;
274
- width: number;
275
- }
276
- export interface IAxisOptions {
277
- lineVisible: boolean;
278
- label: Omit<ILabelStyle, 'align' | 'content'>;
279
- lineStyle: IGridLineStyle;
280
- gridLine: IGridLineStyle;
281
- tick: {
282
- visible: boolean;
283
- lineWidth: number;
284
- lineColor: string;
285
- length: number;
286
- position: PieLabelPosition;
287
- };
288
- reverse?: boolean;
289
- min?: number | null;
290
- max?: number | null;
291
- }
292
- export type RightYAxisOptions = Omit<IAxisOptions, 'reverse'>;
293
- export declare enum AreaLineStyle {
294
- Line = "line",
295
- Smooth = "smooth",
296
- Step = "step"
297
- }
298
- export declare enum InvalidValueType {
299
- Zero = "zero",
300
- Break = "break",
301
- Link = "link"
302
- }
303
- export interface IChartStyle {
304
- runtime: IChartRuntimeContext;
305
- width: number;
306
- height: number;
307
- theme: string;
308
- invalidValueType: InvalidValueType;
309
- gradientFill: boolean;
310
- backgroundColor: Nullable<string>;
311
- titleFontSize: number;
312
- fontSize: number;
313
- fontColor: string;
314
- borderColor: Nullable<string>;
315
- titles: {
316
- title: Omit<ILabelStyle, 'visible'>;
317
- subtitle: Omit<ILabelStyle, 'visible'>;
318
- xAxisTitle: Omit<ILabelStyle, 'visible'>;
319
- yAxisTitle: Omit<ILabelStyle, 'visible'>;
320
- rightYAxisTitle: Omit<ILabelStyle, 'visible'>;
321
- titlePosition: TitlePositionEnum;
322
- };
323
- legend: ILegendStyle;
324
- xAxis: IAxisOptions;
325
- yAxis: IAxisOptions;
326
- rightYAxis: RightYAxisOptions;
327
- allSeriesStyle: IAllSeriesStyle;
328
- seriesStyleMap: {
329
- [id: string]: ISeriesStyle;
330
- };
331
- pie: {
332
- doughnutHole: Nullable<number>;
333
- labelStyle: IPieLabelStyle;
334
- borderColor: string;
335
- hasPaddingAngle: boolean;
336
- isHalfPie: boolean;
337
- rosePie: boolean;
338
- showLabelLine: boolean;
339
- };
340
- area: {
341
- lineStyle: AreaLineStyle;
342
- };
343
- radar: {
344
- shape: RadarShape;
345
- fill: boolean;
346
- };
347
- tooltip: {
348
- indicatorLabelColor: string;
349
- indicatorLineType: ChartBorderDashType;
350
- indicatorLineColor: string;
351
- indicatorLabelTextColor: string;
352
- };
353
- }
354
- export type ChartStyle = DeepPartial<IChartStyle>;
@@ -1,17 +0,0 @@
1
- import { IEchartTheme } from '../models/constants/build-in-theme';
2
- import { Disposable } from '@univerjs/core';
3
- export interface IChartTheme {
4
- colors: string[];
5
- }
6
- export declare class ChartThemeService extends Disposable {
7
- private _themeMap;
8
- private _hasRegistered;
9
- constructor();
10
- getColors(name: string | undefined): string[];
11
- initBuildInThemes(): void;
12
- getRegisteredThemes(): string[];
13
- registerTheme(name: string, theme: IEchartTheme): void;
14
- getTheme(name: string | undefined): IEchartTheme;
15
- getDefaultTheme(): IEchartTheme;
16
- dispose(): void;
17
- }