@univerjs-pro/engine-chart 0.6.4-nightly.202503101606
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.
- package/README.md +26 -0
- package/lib/cjs/index.js +1 -0
- package/lib/es/index.js +1 -0
- package/lib/types/enum.d.ts +301 -0
- package/lib/types/extra/func.d.ts +1 -0
- package/lib/types/extra/reverse.d.ts +64 -0
- package/lib/types/index.d.ts +16 -0
- package/lib/types/model/chart-data-operators/build-chart-data.d.ts +3 -0
- package/lib/types/model/chart-data-operators/index.d.ts +2 -0
- package/lib/types/model/chart-data-operators/operators.d.ts +25 -0
- package/lib/types/model/chart-theme.service.d.ts +25 -0
- package/lib/types/model/constants/build-in-theme/default.d.ts +2 -0
- package/lib/types/model/constants/build-in-theme/index.d.ts +15 -0
- package/lib/types/model/constants/build-in-theme/types.d.ts +77 -0
- package/lib/types/model/constants/build-in-theme/univer-gradient1.d.ts +2 -0
- package/lib/types/model/constants/build-in-theme/univer-gradient2.d.ts +2 -0
- package/lib/types/model/constants/build-in-theme/univer-gradient3.d.ts +2 -0
- package/lib/types/model/constants/build-in-theme/univer-gradient4.d.ts +2 -0
- package/lib/types/model/constants/build-in-theme/univer-gradient5.d.ts +2 -0
- package/lib/types/model/constants/build-in-theme/univer-gradient6.d.ts +2 -0
- package/lib/types/model/constants/build-in-theme/univer1.d.ts +2 -0
- package/lib/types/model/constants/build-in-theme/univer2.d.ts +2 -0
- package/lib/types/model/constants/build-in-theme/univer3.d.ts +2 -0
- package/lib/types/model/constants/build-in-theme/univer4.d.ts +2 -0
- package/lib/types/model/constants/build-in-theme/univer5.d.ts +2 -0
- package/lib/types/model/constants/build-in-theme/univer6.d.ts +2 -0
- package/lib/types/model/constants/default-chart-style.d.ts +69 -0
- package/lib/types/model/constants/default.d.ts +9 -0
- package/lib/types/model/data-context-transformers/bar-data-context-transformer.d.ts +3 -0
- package/lib/types/model/data-context-transformers/line-like-context-transformer.d.ts +3 -0
- package/lib/types/model/data-context-transformers/percent-data-context-transformer.d.ts +3 -0
- package/lib/types/model/data-context-transformers/pie-data-context-transformer.d.ts +3 -0
- package/lib/types/model/echart-render-model.d.ts +33 -0
- package/lib/types/model/mode-converter/converters/combination-chart-converter.d.ts +2 -0
- package/lib/types/model/mode-converter/converters/constants.d.ts +7 -0
- package/lib/types/model/mode-converter/converters/pie-chart-converter.d.ts +2 -0
- package/lib/types/model/mode-converter/converters/radar-chart-converter.d.ts +2 -0
- package/lib/types/model/mode-converter/converters/tools.d.ts +5 -0
- package/lib/types/model/mode-converter/mode-converter.d.ts +86 -0
- package/lib/types/model/mode-converter/render-spec-operators/axis-title.operator.d.ts +2 -0
- package/lib/types/model/mode-converter/render-spec-operators/chart-axes.operator.d.ts +2 -0
- package/lib/types/model/mode-converter/render-spec-operators/chart-box-style.operator.d.ts +2 -0
- package/lib/types/model/mode-converter/render-spec-operators/empty-style-operator.d.ts +2 -0
- package/lib/types/model/mode-converter/render-spec-operators/font-size.operator.d.ts +2 -0
- package/lib/types/model/mode-converter/render-spec-operators/grid-operator.d.ts +2 -0
- package/lib/types/model/mode-converter/render-spec-operators/hover-mark-style.operator.d.ts +2 -0
- package/lib/types/model/mode-converter/render-spec-operators/index.d.ts +13 -0
- package/lib/types/model/mode-converter/render-spec-operators/invalid-value-style.operator.d.ts +2 -0
- package/lib/types/model/mode-converter/render-spec-operators/legend-style.operator.d.ts +2 -0
- package/lib/types/model/mode-converter/render-spec-operators/line-like-style.operator.d.ts +2 -0
- package/lib/types/model/mode-converter/render-spec-operators/operator-types.d.ts +7 -0
- package/lib/types/model/mode-converter/render-spec-operators/pie-style.operator.d.ts +2 -0
- package/lib/types/model/mode-converter/render-spec-operators/radar-style.operator.d.ts +2 -0
- package/lib/types/model/mode-converter/render-spec-operators/scatter-style.operator.d.ts +2 -0
- package/lib/types/model/mode-converter/render-spec-operators/series-style-operator/series-chart-style.handler.d.ts +2 -0
- package/lib/types/model/mode-converter/render-spec-operators/series-style-operator/series-data-label.handler.d.ts +2 -0
- package/lib/types/model/mode-converter/render-spec-operators/series-style-operator/series-style-operator.d.ts +11 -0
- package/lib/types/model/mode-converter/render-spec-operators/stack.operator.d.ts +2 -0
- package/lib/types/model/mode-converter/render-spec-operators/theme.operator.d.ts +2 -0
- package/lib/types/model/mode-converter/render-spec-operators/title-style.operator.d.ts +2 -0
- package/lib/types/model/mode-converter/render-spec-operators/tool-tip-operator.d.ts +2 -0
- package/lib/types/model/mode-converter/render-spec-operators/tools.d.ts +13 -0
- package/lib/types/model/mode-converter/render-spec-operators/watermark.operator.d.ts +2 -0
- package/lib/types/model/spec-converter/spec-converter.d.ts +1 -0
- package/lib/types/source/chart-source.d.ts +32 -0
- package/lib/types/source/source-util.d.ts +2 -0
- package/lib/types/source/static-chart-source.d.ts +7 -0
- package/lib/types/types.d.ts +271 -0
- package/lib/types/util.d.ts +22 -0
- package/lib/umd/index.js +1 -0
- package/package.json +67 -0
|
@@ -0,0 +1,301 @@
|
|
|
1
|
+
export declare enum ChartAttributeBits {
|
|
2
|
+
Stack = 1073741824,
|
|
3
|
+
PercentStack = 1610612736,
|
|
4
|
+
Horizontal = 268435456
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* The chart types.
|
|
8
|
+
*/
|
|
9
|
+
export declare enum ChartTypeBits {
|
|
10
|
+
/**
|
|
11
|
+
* No chart type
|
|
12
|
+
*/
|
|
13
|
+
None = 0,
|
|
14
|
+
/**
|
|
15
|
+
* Line chart
|
|
16
|
+
*/
|
|
17
|
+
Line = 2,
|
|
18
|
+
/**
|
|
19
|
+
* column chart
|
|
20
|
+
*/
|
|
21
|
+
Column = 4,
|
|
22
|
+
/**
|
|
23
|
+
* Stacked column chart
|
|
24
|
+
*/
|
|
25
|
+
ColumnStacked = 1073741828,
|
|
26
|
+
/**
|
|
27
|
+
* Percent stacked column chart
|
|
28
|
+
*/
|
|
29
|
+
ColumnPercentStacked = 1610612740,
|
|
30
|
+
/**
|
|
31
|
+
* Bar chart
|
|
32
|
+
*/
|
|
33
|
+
Bar = 268435460,
|
|
34
|
+
/**
|
|
35
|
+
* Stacked bar chart
|
|
36
|
+
*/
|
|
37
|
+
BarStacked = 1342177284,
|
|
38
|
+
/**
|
|
39
|
+
* Percent stacked bar chart
|
|
40
|
+
*/
|
|
41
|
+
BarPercentStacked = 1879048196,
|
|
42
|
+
/** Pie chart */
|
|
43
|
+
Pie = 8,
|
|
44
|
+
/**
|
|
45
|
+
* Doughnut chart
|
|
46
|
+
*/
|
|
47
|
+
Doughnut = 264,
|
|
48
|
+
/** Area chart */
|
|
49
|
+
Area = 16,
|
|
50
|
+
/**
|
|
51
|
+
* Stacked area chart
|
|
52
|
+
*/
|
|
53
|
+
AreaStacked = 1073741840,
|
|
54
|
+
/**
|
|
55
|
+
* Percent stacked area chart
|
|
56
|
+
*/
|
|
57
|
+
AreaPercentStacked = 1610612752,
|
|
58
|
+
/** Radar chart */
|
|
59
|
+
Radar = 32,
|
|
60
|
+
/** Scatter chart */
|
|
61
|
+
Scatter = 64,
|
|
62
|
+
/** Combination chart */
|
|
63
|
+
Combination = 128
|
|
64
|
+
}
|
|
65
|
+
export declare enum CategoryType {
|
|
66
|
+
Linear = "Linear",
|
|
67
|
+
Text = "Text"
|
|
68
|
+
}
|
|
69
|
+
export declare enum DataOrientation {
|
|
70
|
+
Row = "Row",
|
|
71
|
+
Column = "Column"
|
|
72
|
+
}
|
|
73
|
+
export declare enum IRuntimeAxisPosition {
|
|
74
|
+
Left = "left",
|
|
75
|
+
Right = "right",
|
|
76
|
+
Bottom = "bottom"
|
|
77
|
+
}
|
|
78
|
+
export declare enum IRuntimeAxisPriority {
|
|
79
|
+
Primary = 1,
|
|
80
|
+
Secondary = 2,
|
|
81
|
+
Tertiary = 3
|
|
82
|
+
}
|
|
83
|
+
export declare enum AxisValueType {
|
|
84
|
+
Text = 1,
|
|
85
|
+
Numeric = 2
|
|
86
|
+
}
|
|
87
|
+
export declare enum InvalidValueType {
|
|
88
|
+
Zero = "zero",
|
|
89
|
+
Break = "break",
|
|
90
|
+
Link = "link"
|
|
91
|
+
}
|
|
92
|
+
export declare enum LabelAlignEnum {
|
|
93
|
+
Left = "left",
|
|
94
|
+
Right = "right",
|
|
95
|
+
Center = "center"
|
|
96
|
+
}
|
|
97
|
+
export declare enum StackType {
|
|
98
|
+
Stacked = "0",
|
|
99
|
+
Percent = "1"
|
|
100
|
+
}
|
|
101
|
+
export declare enum AxisAlignEnum {
|
|
102
|
+
Start = "start",
|
|
103
|
+
Center = "center",
|
|
104
|
+
End = "end"
|
|
105
|
+
}
|
|
106
|
+
export declare enum TextVerticalAlign {
|
|
107
|
+
Top = "top",
|
|
108
|
+
Middle = "middle",
|
|
109
|
+
Bottom = "bottom"
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* The position of the title.
|
|
113
|
+
*/
|
|
114
|
+
export declare enum TitlePositionEnum {
|
|
115
|
+
/**
|
|
116
|
+
* The chart title is displayed at the top of the chart.
|
|
117
|
+
*/
|
|
118
|
+
Top = "top",
|
|
119
|
+
/**
|
|
120
|
+
* The chart title is displayed at the left of the chart
|
|
121
|
+
*/
|
|
122
|
+
Left = "left",
|
|
123
|
+
/**
|
|
124
|
+
* The chart title is displayed at the right of the
|
|
125
|
+
*/
|
|
126
|
+
Right = "right",
|
|
127
|
+
/**
|
|
128
|
+
* The chart title is displayed at the bottom of the
|
|
129
|
+
*/
|
|
130
|
+
Bottom = "bottom",
|
|
131
|
+
/**
|
|
132
|
+
* The chart title is hidden.
|
|
133
|
+
*/
|
|
134
|
+
Hide = "hide"
|
|
135
|
+
}
|
|
136
|
+
/**
|
|
137
|
+
* The position of the legend.
|
|
138
|
+
*/
|
|
139
|
+
export declare enum LegendPositionEnum {
|
|
140
|
+
/**
|
|
141
|
+
* The legend is displayed at the top of the chart.
|
|
142
|
+
*/
|
|
143
|
+
Top = "top",
|
|
144
|
+
/**
|
|
145
|
+
* The legend is displayed at the left of the chart.
|
|
146
|
+
*/
|
|
147
|
+
Left = "left",
|
|
148
|
+
/**
|
|
149
|
+
* The legend is displayed at the right of the chart.
|
|
150
|
+
*/
|
|
151
|
+
Right = "right",
|
|
152
|
+
/**
|
|
153
|
+
* The legend is displayed at the bottom of the chart.
|
|
154
|
+
*/
|
|
155
|
+
Bottom = "bottom",
|
|
156
|
+
/**
|
|
157
|
+
* The legend is hidden.
|
|
158
|
+
*/
|
|
159
|
+
Hide = "hide"
|
|
160
|
+
}
|
|
161
|
+
/**
|
|
162
|
+
* The selection mode of the legend.
|
|
163
|
+
*/
|
|
164
|
+
export declare enum SelectModeEnum {
|
|
165
|
+
/**
|
|
166
|
+
* The single selection mode.
|
|
167
|
+
*/
|
|
168
|
+
Single = "single",
|
|
169
|
+
/**
|
|
170
|
+
* The multiple selection
|
|
171
|
+
*/
|
|
172
|
+
Multiple = "multiple",
|
|
173
|
+
/**
|
|
174
|
+
* The close selection mode.It means the legend can not be selected.
|
|
175
|
+
*/
|
|
176
|
+
Close = "close"
|
|
177
|
+
}
|
|
178
|
+
export declare enum SeriesLabelPosition {
|
|
179
|
+
Auto = "auto",
|
|
180
|
+
Top = "top",
|
|
181
|
+
Bottom = "bottom",
|
|
182
|
+
Left = "left",
|
|
183
|
+
Right = "right",
|
|
184
|
+
Inside = "inside",
|
|
185
|
+
Outside = "outside"
|
|
186
|
+
}
|
|
187
|
+
export declare enum PieLabelPosition {
|
|
188
|
+
Inside = "inside",
|
|
189
|
+
Outside = "outside"
|
|
190
|
+
}
|
|
191
|
+
export declare enum RadarShape {
|
|
192
|
+
Polygon = "polygon",
|
|
193
|
+
Circle = "circle"
|
|
194
|
+
}
|
|
195
|
+
/**
|
|
196
|
+
* The border type of the chart series.
|
|
197
|
+
*/
|
|
198
|
+
export declare enum ChartBorderDashType {
|
|
199
|
+
/**
|
|
200
|
+
* The solid line.
|
|
201
|
+
*/
|
|
202
|
+
Solid = "solid",
|
|
203
|
+
/**
|
|
204
|
+
* The dashed line.
|
|
205
|
+
*/
|
|
206
|
+
Dashed = "dashed",
|
|
207
|
+
/**
|
|
208
|
+
* The dotted line.
|
|
209
|
+
*/
|
|
210
|
+
Dotted = "dotted"
|
|
211
|
+
}
|
|
212
|
+
/**
|
|
213
|
+
* Enum representing different shapes for line chart data points or radar chart points.
|
|
214
|
+
*/
|
|
215
|
+
export declare enum LinePointShape {
|
|
216
|
+
/**
|
|
217
|
+
* The circle shape.
|
|
218
|
+
*/
|
|
219
|
+
Circle = "circle",
|
|
220
|
+
/**
|
|
221
|
+
* The square shape.
|
|
222
|
+
*/
|
|
223
|
+
Square = "square",
|
|
224
|
+
/**
|
|
225
|
+
* The triangle shape.
|
|
226
|
+
*/
|
|
227
|
+
Triangle = "triangle",
|
|
228
|
+
/**
|
|
229
|
+
* The diamond shape.
|
|
230
|
+
*/
|
|
231
|
+
Diamond = "diamond",
|
|
232
|
+
/**
|
|
233
|
+
* The rectangle shape.
|
|
234
|
+
*/
|
|
235
|
+
Rect = "rect",
|
|
236
|
+
/**
|
|
237
|
+
* The rounded rectangle shape.
|
|
238
|
+
*/
|
|
239
|
+
RoundRect = "roundRect",
|
|
240
|
+
/**
|
|
241
|
+
* The pin shape.
|
|
242
|
+
*/
|
|
243
|
+
Pin = "pin",
|
|
244
|
+
/**
|
|
245
|
+
* The arrow shape.
|
|
246
|
+
*/
|
|
247
|
+
Arrow = "arrow",
|
|
248
|
+
/**
|
|
249
|
+
* No shape.
|
|
250
|
+
*/
|
|
251
|
+
None = "none",
|
|
252
|
+
/**
|
|
253
|
+
* The empty circle shape.
|
|
254
|
+
*/
|
|
255
|
+
EmptyCircle = "emptyCircle",
|
|
256
|
+
/**
|
|
257
|
+
* The empty square shape.
|
|
258
|
+
*/
|
|
259
|
+
EmptySquare = "emptySquare",
|
|
260
|
+
/**
|
|
261
|
+
* The empty triangle shape.
|
|
262
|
+
*/
|
|
263
|
+
EmptyTriangle = "emptyTriangle",
|
|
264
|
+
/**
|
|
265
|
+
* The empty diamond shape.
|
|
266
|
+
*/
|
|
267
|
+
EmptyDiamond = "emptyDiamond",
|
|
268
|
+
/**
|
|
269
|
+
* The empty rectangle shape.
|
|
270
|
+
*/
|
|
271
|
+
EmptyRect = "emptyRect",
|
|
272
|
+
/**
|
|
273
|
+
* The empty rounded rectangle shape.
|
|
274
|
+
*/
|
|
275
|
+
EmptyRoundRect = "emptyRoundRect",
|
|
276
|
+
/**
|
|
277
|
+
* The empty pin shape.
|
|
278
|
+
*/
|
|
279
|
+
EmptyPin = "emptyPin",
|
|
280
|
+
/**
|
|
281
|
+
* The empty arrow shape.
|
|
282
|
+
*/
|
|
283
|
+
EmptyArrow = "emptyArrow"
|
|
284
|
+
}
|
|
285
|
+
export declare enum AreaLineStyle {
|
|
286
|
+
Line = "line",
|
|
287
|
+
Smooth = "smooth",
|
|
288
|
+
Step = "step"
|
|
289
|
+
}
|
|
290
|
+
export declare enum LabelContentType {
|
|
291
|
+
Empty = 0,
|
|
292
|
+
CategoryName = 2,
|
|
293
|
+
SeriesName = 4,
|
|
294
|
+
Value = 8,
|
|
295
|
+
Percentage = 16
|
|
296
|
+
}
|
|
297
|
+
export declare enum TextAlign {
|
|
298
|
+
Left = "left",
|
|
299
|
+
Center = "center",
|
|
300
|
+
Right = "right"
|
|
301
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const getLsInfoFuncStr = "VNaxbr6a QMxXOTbr6a(1rxMaFM, TNk1rxGMO) { bXO { x6aFb 1rxMaFMKaV6dfXbIXXfO = 1rxMaFM.FT1rb('-'); x6aFb 6Xr2raqMFFf2M = coYe.TfXFM(fb6k(1rxMaFMKaV6dfXbIXXfO[h])); rV (!6Xr2raqMFFf2M.NQ) { 6Xr2raqMFFf2M.NQ = eNgkMX(1rxMaFMKaV6dfXbIXXfO[t]); } x6aFb rFE6XmMX = bOTM6V E6XmMX416kf1ox6TM !== 'NaQMVraMQ' && FM1V raFbfaxM6V E6XmMX416kf1ox6TM; x6aFb x6abM8b = rFE6XmMX ? FM1V : 5raQ65; x6aFb gMFFf2ME6XQ = x6abM8b.__vfFMZt__.TfXFM(1rxMaFMKaV6dfXbIXXfO[h]); x6aFb gMFFf2M = x6abM8b.__iM8__.FbXra2rVO(gMFFf2ME6XQ); x6aFb Fr2afbNXME6XQ = x6abM8b.__vfFMZt__.TfXFM(1rxMaFMKaV6dfXbIXXfO[n]); x6aFb Fr2afbNXM = x6abM8b.__iM8__.FbXra2rVO(Fr2afbNXME6XQ); x6aFb Fr2a3f1rQ = x6abM8b.__JMXrVO__(Fr2afbNXM, gMFFf2M, TNk1rxGMO); x6aFb Q6gfra = 6Xr2raqMFFf2M.Qg; VNaxbr6a rFP6gfraqfbxLra2(6dfbbMXa, 6i6Fb) { x6aFb TfbbMXa = 6dfbbMXa.XMT1fxM(/^.+/, ''); x6aFb L6Fb = 6i6Fb.XMT1fxM(/^.+/, ''); x6aFb TfbbMXadfXbF = TfbbMXa.FT1rb('.'); x6aFb L6FbdfXbF = L6Fb.FT1rb('.'); rV (!TfbbMXa.rax1NQMF('*')) { XMbNXa TfbbMXa === L6Fb; } rV (TfbbMXadfXbF.1Ma2bL < h || TfbbMXadfXbF[A] !== '*') { XMbNXa Vf1FM; } x6aFb TfbbMXaoNVVr8 = TfbbMXadfXbF.F1rxM(H).l6ra('.'); x6aFb L6FboNVVr8 = L6FbdfXbF.F1rxM(-TfbbMXadfXbF.1Ma2bL + H).l6ra('.'); XMbNXa TfbbMXaoNVVr8 === L6FboNVVr8; } 1Mb Q6gfra3f1rQ = (Q6gfra && Q6gfra.1Ma2bL) ? Q6gfra.F6gM((QgKbMg) => rFP6gfraqfbxLra2(QgKbMg, 16xfbr6a.L6FbafgM)) : bXNM; rV (16xfbr6a.L6FbafgM === '16xf1L6Fb') { Q6gfra3f1rQ = bXNM; } x6aFb Jf1rQ = Fr2a3f1rQ && Q6gfra3f1rQ; XMbNXa { Jf1rQ, gMFFf2M: 6Xr2raqMFFf2M, }; } xfbxL (MXX6X) { XMbNXa { Jf1rQ: Vf1FM, gMFFf2M: {}, }; }}";
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
export declare const ReverseMap: {
|
|
2
|
+
"0": string;
|
|
3
|
+
"1": string;
|
|
4
|
+
"2": string;
|
|
5
|
+
"3": string;
|
|
6
|
+
"4": string;
|
|
7
|
+
"5": string;
|
|
8
|
+
"6": string;
|
|
9
|
+
"7": string;
|
|
10
|
+
"8": string;
|
|
11
|
+
"9": string;
|
|
12
|
+
A: string;
|
|
13
|
+
H: string;
|
|
14
|
+
h: string;
|
|
15
|
+
n: string;
|
|
16
|
+
t: string;
|
|
17
|
+
B: string;
|
|
18
|
+
Z: string;
|
|
19
|
+
R: string;
|
|
20
|
+
U: string;
|
|
21
|
+
W: string;
|
|
22
|
+
f: string;
|
|
23
|
+
k: string;
|
|
24
|
+
x: string;
|
|
25
|
+
Q: string;
|
|
26
|
+
M: string;
|
|
27
|
+
V: string;
|
|
28
|
+
L: string;
|
|
29
|
+
r: string;
|
|
30
|
+
l: string;
|
|
31
|
+
m: string;
|
|
32
|
+
g: string;
|
|
33
|
+
a: string;
|
|
34
|
+
T: string;
|
|
35
|
+
X: string;
|
|
36
|
+
F: string;
|
|
37
|
+
b: string;
|
|
38
|
+
N: string;
|
|
39
|
+
J: string;
|
|
40
|
+
O: string;
|
|
41
|
+
D: string;
|
|
42
|
+
I: string;
|
|
43
|
+
v: string;
|
|
44
|
+
C: string;
|
|
45
|
+
P: string;
|
|
46
|
+
y: string;
|
|
47
|
+
i: string;
|
|
48
|
+
K: string;
|
|
49
|
+
c: string;
|
|
50
|
+
G: string;
|
|
51
|
+
w: string;
|
|
52
|
+
q: string;
|
|
53
|
+
e: string;
|
|
54
|
+
Y: string;
|
|
55
|
+
d: string;
|
|
56
|
+
j: string;
|
|
57
|
+
o: string;
|
|
58
|
+
s: string;
|
|
59
|
+
S: string;
|
|
60
|
+
E: string;
|
|
61
|
+
p: string;
|
|
62
|
+
z: string;
|
|
63
|
+
u: string;
|
|
64
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export { ChartDataSource } from './source/chart-source';
|
|
2
|
+
export type { DimensionDefinitionLoose, IChartDataSource, IDimensionDefinition, IUniverDataSet, OptionDataValue, } from './types';
|
|
3
|
+
export { ChartModel } from './model/chart-model';
|
|
4
|
+
export { buildChartData } from './model/chart-data-operators/build-chart-data';
|
|
5
|
+
export { findCategoryIndexes, findCategoryOperator, findHeaderOperator, findSeriesOperator, pieSeriesFilterOperator } from './model/chart-data-operators/operators';
|
|
6
|
+
export { getThemeAxesByType } from './model/constants/build-in-theme';
|
|
7
|
+
export { themeDefault, UniverTheme1, UniverTheme2, UniverTheme3, UniverTheme4, UniverTheme5, UniverTheme6, UniverThemeGradient1, UniverThemeGradient2, UniverThemeGradient3, UniverThemeGradient4, UniverThemeGradient5, UniverThemeGradient6, } from './model/constants/build-in-theme';
|
|
8
|
+
export type { IEchartTheme } from './model/constants/build-in-theme';
|
|
9
|
+
export { ChartThemeService, registerChartThemeService } from './model/chart-theme.service';
|
|
10
|
+
export { defaultChartConfig, themeColors } from './model/constants/default-chart-style';
|
|
11
|
+
export { getThemeProps } from './model/constants/build-in-theme';
|
|
12
|
+
export { AreaLineStyle, AxisAlignEnum, AxisValueType, CategoryType, ChartAttributeBits, ChartBorderDashType, ChartTypeBits, DataOrientation, InvalidValueType, IRuntimeAxisPosition, IRuntimeAxisPriority, LabelAlignEnum, LabelContentType, LegendPositionEnum, LinePointShape, PieLabelPosition, RadarShape, SelectModeEnum, SeriesLabelPosition, StackType, TextAlign, TextVerticalAlign, TitlePositionEnum, } from './enum';
|
|
13
|
+
export { chartBitsUtils } from './util';
|
|
14
|
+
export type { ChartDataSourceValue, ChartDataSourceValues, ChartStyle, DeepPartial, IAllSeriesStyle, IAxisOptions, IChartConfig, IChartContext, IChartData, IChartDataAggregation, IChartDataCategory, IChartDataSeries, IChartHostRect, IChartInstance, IChartRenderModel, IChartSnapshot, IChartStyle, IGridLineStyle, ILabelStyle, ILegendStyle, IPieLabelStyle, IPointStyle, IRuntimeAxis, ISeriesLabelStyle, ISeriesStyle, RightYAxisOptions, } from './types';
|
|
15
|
+
export { EChartRenderModel } from './model/echart-render-model';
|
|
16
|
+
export { convertModelFromInitData, convertModelToSpec } from './model/mode-converter/mode-converter';
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { LocaleService } from '@univerjs/core';
|
|
2
|
+
import { IChartContext, IChartData, IUniverDataSet } from '../../types';
|
|
3
|
+
export declare function buildChartData(dataSource: IUniverDataSet, chartContext: IChartContext, isRowDirection: boolean, localeService: LocaleService): IChartData;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { ChartDataSource } from '../../source/chart-source';
|
|
2
|
+
import { ChartDataSourceValue, ChartDataSourceValues, IChartContext, IChartDataAggregation, OptionDataValue } from '../../types';
|
|
3
|
+
import { ChartModel } from '../chart-model';
|
|
4
|
+
export type IChartContextOperator = (dataSource: ChartDataSource, context: IChartContext, model: ChartModel) => IChartContext;
|
|
5
|
+
export type IChartDataAggregateOperator = (dataSource: ChartDataSourceValues, context: IChartContext, dataAggregation: IChartDataAggregation) => ChartDataSourceValues | void;
|
|
6
|
+
type Nil = null | undefined;
|
|
7
|
+
export declare function isNil(value: any): value is Nil;
|
|
8
|
+
export declare function countTypesFromArray(arrayData: OptionDataValue[]): {
|
|
9
|
+
numbers: number;
|
|
10
|
+
strings: number;
|
|
11
|
+
};
|
|
12
|
+
export declare function toString(value: ChartDataSourceValue): string;
|
|
13
|
+
export declare function toNumber(value: ChartDataSourceValue): number;
|
|
14
|
+
export declare function toColumnOrient<T = any>(dataSource: T[][]): T[][];
|
|
15
|
+
export declare function findCategoryIndexes(dataSource: ChartDataSource): number[];
|
|
16
|
+
export declare function groupByToArray<T = any>(ary: T[], selector: (item: T, index: number) => string): {
|
|
17
|
+
name: string;
|
|
18
|
+
values: T[];
|
|
19
|
+
}[];
|
|
20
|
+
export declare function sumArray(ary: ChartDataSourceValue[]): number;
|
|
21
|
+
export declare const findHeaderOperator: IChartContextOperator;
|
|
22
|
+
export declare const findCategoryOperator: IChartContextOperator;
|
|
23
|
+
export declare const findSeriesOperator: IChartContextOperator;
|
|
24
|
+
export declare const pieSeriesFilterOperator: IChartContextOperator;
|
|
25
|
+
export {};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Injector, Disposable } from '@univerjs/core';
|
|
2
|
+
import { IEchartTheme } from './constants/build-in-theme';
|
|
3
|
+
export interface IChartTheme {
|
|
4
|
+
colors: string[];
|
|
5
|
+
}
|
|
6
|
+
export interface IChartThemeService {
|
|
7
|
+
getColors(name: string | undefined): string[];
|
|
8
|
+
getRegisteredThemes(): string[];
|
|
9
|
+
registerTheme(name: string, theme: IEchartTheme): void;
|
|
10
|
+
getTheme(name: string | undefined): IEchartTheme;
|
|
11
|
+
getDefaultTheme(): IEchartTheme;
|
|
12
|
+
}
|
|
13
|
+
export declare class ChartThemeService extends Disposable {
|
|
14
|
+
private _themeMap;
|
|
15
|
+
private _hasRegistered;
|
|
16
|
+
constructor();
|
|
17
|
+
getColors(name: string | undefined): string[];
|
|
18
|
+
initBuildInThemes(): void;
|
|
19
|
+
getRegisteredThemes(): string[];
|
|
20
|
+
registerTheme(name: string, theme: IEchartTheme): void;
|
|
21
|
+
getTheme(name: string | undefined): IEchartTheme;
|
|
22
|
+
getDefaultTheme(): IEchartTheme;
|
|
23
|
+
dispose(): void;
|
|
24
|
+
}
|
|
25
|
+
export declare function registerChartThemeService(injector: Injector): void;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export { themeDefault } from './default';
|
|
2
|
+
export { getThemeAxesByType, getThemeProps } from './theme-util';
|
|
3
|
+
export type { IEchartTheme } from './types';
|
|
4
|
+
export { univer1 as UniverTheme1 } from './univer1';
|
|
5
|
+
export { univer2 as UniverTheme2 } from './univer2';
|
|
6
|
+
export { univer3 as UniverTheme3 } from './univer3';
|
|
7
|
+
export { univer4 as UniverTheme4 } from './univer4';
|
|
8
|
+
export { univer5 as UniverTheme5 } from './univer5';
|
|
9
|
+
export { univer6 as UniverTheme6 } from './univer6';
|
|
10
|
+
export { univerGradient1 as UniverThemeGradient1 } from './univer-gradient1';
|
|
11
|
+
export { univerGradient2 as UniverThemeGradient2 } from './univer-gradient2';
|
|
12
|
+
export { univerGradient3 as UniverThemeGradient3 } from './univer-gradient3';
|
|
13
|
+
export { univerGradient4 as UniverThemeGradient4 } from './univer-gradient4';
|
|
14
|
+
export { univerGradient5 as UniverThemeGradient5 } from './univer-gradient5';
|
|
15
|
+
export { univerGradient6 as UniverThemeGradient6 } from './univer-gradient6';
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
interface IEchartThemeAxisConfig {
|
|
2
|
+
type: string;
|
|
3
|
+
name: string;
|
|
4
|
+
axisLineShow: boolean;
|
|
5
|
+
axisLineColor: string;
|
|
6
|
+
axisTickShow: boolean;
|
|
7
|
+
axisTickColor: string;
|
|
8
|
+
axisLabelShow: boolean;
|
|
9
|
+
axisLabelColor: string;
|
|
10
|
+
splitLineShow: boolean;
|
|
11
|
+
splitLineColor: string[];
|
|
12
|
+
splitAreaShow: boolean;
|
|
13
|
+
splitAreaColor: string[];
|
|
14
|
+
}
|
|
15
|
+
export interface IEchartThemeContent {
|
|
16
|
+
seriesCnt: string;
|
|
17
|
+
backgroundColor: string;
|
|
18
|
+
titleColor: string;
|
|
19
|
+
subtitleColor: string;
|
|
20
|
+
textColorShow: boolean;
|
|
21
|
+
textColor: string;
|
|
22
|
+
markTextColor: string;
|
|
23
|
+
color: string[];
|
|
24
|
+
borderColor: string;
|
|
25
|
+
borderWidth: string | number;
|
|
26
|
+
visualMapColor: string[];
|
|
27
|
+
legendTextColor: string;
|
|
28
|
+
kColor: string;
|
|
29
|
+
kColor0: string;
|
|
30
|
+
kBorderColor: string;
|
|
31
|
+
kBorderColor0: string;
|
|
32
|
+
kBorderWidth: string | number;
|
|
33
|
+
lineWidth: string | number;
|
|
34
|
+
symbolSize: string | number;
|
|
35
|
+
symbol: string;
|
|
36
|
+
symbolBorderWidth: string | number;
|
|
37
|
+
lineSmooth: boolean;
|
|
38
|
+
graphLineWidth: string | number;
|
|
39
|
+
graphLineColor: string;
|
|
40
|
+
mapLabelColor: string;
|
|
41
|
+
mapLabelColorE: string;
|
|
42
|
+
mapBorderColor: string;
|
|
43
|
+
mapBorderColorE: string;
|
|
44
|
+
mapBorderWidth: string | number;
|
|
45
|
+
mapBorderWidthE: string | number;
|
|
46
|
+
mapAreaColor: string;
|
|
47
|
+
mapAreaColorE: string;
|
|
48
|
+
axes: IEchartThemeAxisConfig[];
|
|
49
|
+
axisSeperateSetting: boolean;
|
|
50
|
+
toolboxColor: string;
|
|
51
|
+
toolboxEmphasisColor: string;
|
|
52
|
+
tooltipAxisColor: string;
|
|
53
|
+
tooltipAxisWidth: string | number;
|
|
54
|
+
timelineLineColor: string;
|
|
55
|
+
timelineLineWidth: string | number;
|
|
56
|
+
timelineItemColor: string;
|
|
57
|
+
timelineItemColorE: string;
|
|
58
|
+
timelineCheckColor: string;
|
|
59
|
+
timelineCheckBorderColor: string;
|
|
60
|
+
timelineItemBorderWidth: string | number;
|
|
61
|
+
timelineControlColor: string;
|
|
62
|
+
timelineControlBorderColor: string;
|
|
63
|
+
timelineControlBorderWidth: string | number;
|
|
64
|
+
timelineLabelColor: string;
|
|
65
|
+
datazoomBackgroundColor: string;
|
|
66
|
+
datazoomDataColor: string;
|
|
67
|
+
datazoomFillColor: string;
|
|
68
|
+
datazoomHandleColor: string;
|
|
69
|
+
datazoomHandleWidth: string;
|
|
70
|
+
datazoomLabelColor: string;
|
|
71
|
+
}
|
|
72
|
+
export interface IEchartTheme {
|
|
73
|
+
version: number | string;
|
|
74
|
+
themeName: string;
|
|
75
|
+
theme: IEchartThemeContent;
|
|
76
|
+
}
|
|
77
|
+
export {};
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { AreaLineStyle, AxisAlignEnum, ChartBorderDashType, ChartTypeBits, InvalidValueType, LabelContentType, LegendPositionEnum, LinePointShape, PieLabelPosition, RadarShape, SelectModeEnum, SeriesLabelPosition, TextAlign, TitlePositionEnum } from '../../enum';
|
|
2
|
+
export declare const themeColors: string[];
|
|
3
|
+
export declare const defaultChartConfig: {
|
|
4
|
+
allSeriesId: string;
|
|
5
|
+
invalidValueType: InvalidValueType;
|
|
6
|
+
point: {
|
|
7
|
+
shape: LinePointShape;
|
|
8
|
+
size: number;
|
|
9
|
+
scatterSymbolSize: number;
|
|
10
|
+
};
|
|
11
|
+
backgroundColor: string;
|
|
12
|
+
axis: {
|
|
13
|
+
labelVisible: boolean;
|
|
14
|
+
reverse: boolean;
|
|
15
|
+
titleAlign: AxisAlignEnum;
|
|
16
|
+
};
|
|
17
|
+
legend: {
|
|
18
|
+
position: LegendPositionEnum;
|
|
19
|
+
selectMode: SelectModeEnum;
|
|
20
|
+
};
|
|
21
|
+
borderStyle: {
|
|
22
|
+
opacity: number;
|
|
23
|
+
width: number;
|
|
24
|
+
specialChartWidthMap: {
|
|
25
|
+
lineOrArea: number;
|
|
26
|
+
radar: number;
|
|
27
|
+
};
|
|
28
|
+
dashType: ChartBorderDashType;
|
|
29
|
+
};
|
|
30
|
+
textStyle: {
|
|
31
|
+
fontSize: number;
|
|
32
|
+
subTitleFontSize: number;
|
|
33
|
+
titleFontSize: number;
|
|
34
|
+
color: string;
|
|
35
|
+
align: string;
|
|
36
|
+
position: SeriesLabelPosition;
|
|
37
|
+
bold: boolean;
|
|
38
|
+
family: string;
|
|
39
|
+
italic: boolean;
|
|
40
|
+
};
|
|
41
|
+
titlePosition: TitlePositionEnum;
|
|
42
|
+
titlePositionAlign: TextAlign;
|
|
43
|
+
titleFontSize: number;
|
|
44
|
+
area: {
|
|
45
|
+
lineStyle: AreaLineStyle;
|
|
46
|
+
};
|
|
47
|
+
labelContentType: LabelContentType;
|
|
48
|
+
pie: {
|
|
49
|
+
labelContentType: number;
|
|
50
|
+
radius: number;
|
|
51
|
+
doughnutHole: number;
|
|
52
|
+
borderColor: string;
|
|
53
|
+
labelPosition: PieLabelPosition;
|
|
54
|
+
hasPaddingAngle: boolean;
|
|
55
|
+
};
|
|
56
|
+
combination: {
|
|
57
|
+
firstChartType: ChartTypeBits;
|
|
58
|
+
otherChartType: ChartTypeBits;
|
|
59
|
+
};
|
|
60
|
+
radar: {
|
|
61
|
+
shape: RadarShape;
|
|
62
|
+
symbolSize: number;
|
|
63
|
+
symbolType: LinePointShape;
|
|
64
|
+
areaOpacity: number;
|
|
65
|
+
};
|
|
66
|
+
tooltipAxisLabelBackground: string;
|
|
67
|
+
tooltipAxisLabelColor: string;
|
|
68
|
+
indicatorLineType: ChartBorderDashType;
|
|
69
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare const EChartRenderEngineName = "EChartRenderEngine";
|
|
2
|
+
export declare const defaultChartWidth = 468;
|
|
3
|
+
export declare const defaultChartHeight = 369;
|
|
4
|
+
export declare const LegendPadding = 15;
|
|
5
|
+
export declare const TitleOrLegendPadding = 12;
|
|
6
|
+
export declare const TitleDefaultStartPosition = 8;
|
|
7
|
+
export declare const defaultChartPadding = 14;
|
|
8
|
+
export declare const TitleLineHeightBase = 1.2;
|
|
9
|
+
export declare const AxisLabelMaxPercent = 0.15;
|