@univerjs-pro/engine-chart 1.0.0-alpha.2 → 1.0.0-alpha.3
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 +9 -3
- package/lib/cjs/index.js +1 -1
- package/lib/es/index.js +1 -1
- package/lib/index.js +1 -1
- package/lib/types/chart-model-api/chart-model-api.d.ts +2 -0
- package/lib/types/chart-model-api/chart-type-manifest.d.ts +128 -0
- package/lib/types/chart-model-api/chart-type-registry.d.ts +56 -0
- package/lib/types/chart-model-api/chart-type.d.ts +7 -0
- package/lib/types/chart-model-api/constants.d.ts +99 -0
- package/lib/types/chart-model-api/describe.d.ts +3 -0
- package/lib/types/chart-model-api/index.d.ts +8 -0
- package/lib/types/chart-model-api/patch-builder.d.ts +9 -0
- package/lib/types/chart-model-api/series-selector.d.ts +3 -0
- package/lib/types/chart-model-api/types.d.ts +452 -0
- package/lib/types/chart-model-api/utils.d.ts +10 -0
- package/lib/types/chart-model-api/validate.d.ts +5 -0
- package/lib/types/enum.d.ts +8 -0
- package/lib/types/f-base-chart.d.ts +25 -0
- package/lib/types/index.d.ts +118 -15
- package/lib/types/models/chart-data-operators/build-chart-data.d.ts +6 -1
- package/lib/types/models/chart-data-operators/cartesian-point-data.d.ts +43 -0
- package/lib/types/models/chart-data-operators/operators.d.ts +6 -6
- package/lib/types/models/chart-element-axis-id.d.ts +9 -0
- package/lib/types/models/chart-element-edit-overlay/chart-element-edit-overlay.d.ts +38 -0
- package/lib/types/models/chart-element-edit-overlay/index.d.ts +4 -0
- package/lib/types/models/chart-element-edit-overlay/palette.d.ts +2 -0
- package/lib/types/models/chart-element-edit-overlay/resolve-chart-element-hit-layout.d.ts +16 -0
- package/lib/types/models/chart-element-edit-overlay/types.d.ts +20 -0
- package/lib/types/models/chart-host-style.d.ts +35 -0
- package/lib/types/models/chart-model.d.ts +40 -31
- package/lib/types/models/chart-render-input-resolver.d.ts +13 -0
- package/lib/types/models/chart-render-model-manager.service.d.ts +26 -0
- package/lib/types/models/constants/build-in-theme/index.d.ts +12 -12
- package/lib/types/models/constants/build-in-theme/univer-gradient1.d.ts +1 -1
- package/lib/types/models/constants/build-in-theme/univer-gradient2.d.ts +1 -1
- package/lib/types/models/constants/build-in-theme/univer-gradient3.d.ts +1 -1
- package/lib/types/models/constants/build-in-theme/univer-gradient4.d.ts +1 -1
- package/lib/types/models/constants/build-in-theme/univer-gradient5.d.ts +1 -1
- package/lib/types/models/constants/build-in-theme/univer-gradient6.d.ts +1 -1
- package/lib/types/models/constants/build-in-theme/univer1.d.ts +1 -1
- package/lib/types/models/constants/build-in-theme/univer2.d.ts +1 -1
- package/lib/types/models/constants/build-in-theme/univer3.d.ts +1 -1
- package/lib/types/models/constants/build-in-theme/univer4.d.ts +1 -1
- package/lib/types/models/constants/build-in-theme/univer5.d.ts +1 -1
- package/lib/types/models/constants/build-in-theme/univer6.d.ts +1 -1
- package/lib/types/models/constants/default.d.ts +3 -1
- package/lib/types/models/echart-render-model.d.ts +37 -2
- package/lib/types/models/image-chart-host.d.ts +2 -1
- package/lib/types/models/mode-converter/mode-converter.d.ts +0 -2
- package/lib/types/models/mode-converter/render-spec-operators/legend-size.d.ts +2 -1
- package/lib/types/models/series-style/series-style-resolver.d.ts +9 -0
- package/lib/types/source/source-util.d.ts +1 -1
- package/lib/types/source/static-chart-source.d.ts +11 -3
- package/lib/types/types.d.ts +101 -37
- package/lib/types/util.d.ts +1 -1
- package/lib/types/wordcloud-chart/adapters/echarts/chart-view.d.ts +2 -2
- package/lib/types/wordcloud-chart/adapters/echarts/install.d.ts +2 -2
- package/lib/types/wordcloud-chart/adapters/echarts/layout-register.d.ts +2 -2
- package/lib/types/wordcloud-chart/adapters/echarts/series-model.d.ts +2 -2
- package/lib/types/wordcloud-chart/core/collision/box-shape-engine.d.ts +1 -1
- package/lib/types/wordcloud-chart/core/collision/engine.d.ts +1 -1
- package/lib/types/wordcloud-chart/core/collision/footprint.d.ts +1 -1
- package/lib/types/wordcloud-chart/core/collision/glyph-shape-engine.d.ts +1 -1
- package/lib/types/wordcloud-chart/core/collision/grid.d.ts +1 -1
- package/lib/types/wordcloud-chart/core/layout/candidates.d.ts +1 -1
- package/lib/types/wordcloud-chart/core/layout/layout-config.d.ts +1 -1
- package/lib/types/wordcloud-chart/core/layout/layout.d.ts +1 -2
- package/lib/types/wordcloud-chart/core/layout/phases.d.ts +1 -1
- package/lib/types/wordcloud-chart/core/layout/place-word.d.ts +1 -1
- package/lib/types/wordcloud-chart/core/layout/placement-stats.d.ts +1 -1
- package/lib/types/wordcloud-chart/core/layout/placement-types.d.ts +1 -1
- package/lib/types/wordcloud-chart/core/layout/placement-word-manager.d.ts +1 -1
- package/lib/types/wordcloud-chart/core/layout/runtime-mask.d.ts +1 -1
- package/lib/types/wordcloud-chart/core/layout/word-prepare.d.ts +1 -1
- package/lib/types/wordcloud-chart/core/shape/shape-mask.d.ts +1 -1
- package/lib/types/wordcloud-chart/index.d.ts +3 -2
- package/lib/types/wordcloud-chart/types.d.ts +2 -0
- package/lib/umd/index.js +1 -1
- package/package.json +5 -5
- package/lib/types/wordcloud-chart/core/collision/types.d.ts +0 -1
- package/lib/types/wordcloud-chart/core/layout/types.d.ts +0 -1
- package/lib/types/wordcloud-chart/core/shape/types.d.ts +0 -1
- package/lib/types/wordcloud-chart/core/text/types.d.ts +0 -1
- package/lib/types/wordcloud-chart/core/types/option.d.ts +0 -1
- package/lib/types/wordcloud-chart/core/types/shape.d.ts +0 -1
- package/lib/types/wordcloud-chart/core/types/word.d.ts +0 -1
- package/lib/types/wordcloud-chart/echarts.d.ts +0 -2
|
@@ -0,0 +1,452 @@
|
|
|
1
|
+
import type { ChartBorderDashType, ChartTypeBits, LabelContentType, LinePointShape, RadarShape, WordCloudShapeEnum } from '../enum';
|
|
2
|
+
import type { ChartModel } from '../models/chart-model';
|
|
3
|
+
import type { ChartStyle, IChartContext, IChartDataAggregation, IChartDataCategory, IChartDataSeries } from '../types';
|
|
4
|
+
import type { ChartKnownTypeName } from './chart-type-manifest';
|
|
5
|
+
import type { ChartModelChangedGroup, ChartModelDiagnosticCode, ChartModelPatchGroup, ChartModelPatchSemantic } from './constants';
|
|
6
|
+
export type DeepReadonly<T> = T extends (...args: any[]) => unknown ? T : T extends readonly (infer U)[] ? readonly DeepReadonly<U>[] : T extends object ? {
|
|
7
|
+
readonly [K in keyof T]: DeepReadonly<T[K]>;
|
|
8
|
+
} : T;
|
|
9
|
+
export type DeepPartial<T> = T extends (...args: any[]) => unknown ? T : T extends readonly (infer U)[] ? DeepPartial<U>[] : T extends object ? {
|
|
10
|
+
[K in keyof T]?: DeepPartial<T[K]>;
|
|
11
|
+
} : T;
|
|
12
|
+
/**
|
|
13
|
+
* Chart type names accepted by create/update model patches.
|
|
14
|
+
* Aliases are accepted and validation normalizes them:
|
|
15
|
+
* `doughnut` -> `donut`, `combo` -> `combination`.
|
|
16
|
+
*/
|
|
17
|
+
/**
|
|
18
|
+
* Chart type names returned by readback APIs. `unsupported` is only used when an
|
|
19
|
+
* existing ChartModel has a raw type that this semantic API cannot edit safely.
|
|
20
|
+
*/
|
|
21
|
+
export type ChartTypeName = ChartKnownTypeName | typeof import('./chart-type-registry').UNSUPPORTED_CHART_TYPE_NAME;
|
|
22
|
+
export type { ChartKnownTypeName } from './chart-type-manifest';
|
|
23
|
+
export type ChartTitleSpec = string | {
|
|
24
|
+
text?: string;
|
|
25
|
+
visible?: boolean;
|
|
26
|
+
position?: 'top' | 'bottom' | 'left' | 'right';
|
|
27
|
+
alignment?: 'left' | 'center' | 'right';
|
|
28
|
+
fontSize?: number;
|
|
29
|
+
color?: string;
|
|
30
|
+
bold?: boolean;
|
|
31
|
+
};
|
|
32
|
+
export type ChartLegendSpec = boolean | {
|
|
33
|
+
visible?: boolean;
|
|
34
|
+
position?: 'top' | 'bottom' | 'left' | 'right';
|
|
35
|
+
selectMode?: 'single' | 'multiple' | 'close';
|
|
36
|
+
fontSize?: number;
|
|
37
|
+
color?: string;
|
|
38
|
+
bold?: boolean;
|
|
39
|
+
italic?: boolean;
|
|
40
|
+
};
|
|
41
|
+
export interface IChartAxisSpec {
|
|
42
|
+
title?: string;
|
|
43
|
+
min?: number | null;
|
|
44
|
+
max?: number | null;
|
|
45
|
+
reverse?: boolean;
|
|
46
|
+
line?: {
|
|
47
|
+
visible?: boolean;
|
|
48
|
+
color?: string;
|
|
49
|
+
width?: number;
|
|
50
|
+
};
|
|
51
|
+
tick?: {
|
|
52
|
+
visible?: boolean;
|
|
53
|
+
color?: string;
|
|
54
|
+
width?: number;
|
|
55
|
+
length?: number;
|
|
56
|
+
position?: 'inside' | 'outside';
|
|
57
|
+
};
|
|
58
|
+
format?: string | null;
|
|
59
|
+
titleStyle?: {
|
|
60
|
+
color?: string;
|
|
61
|
+
fontSize?: number;
|
|
62
|
+
bold?: boolean;
|
|
63
|
+
italic?: boolean;
|
|
64
|
+
family?: string;
|
|
65
|
+
};
|
|
66
|
+
label?: {
|
|
67
|
+
visible?: boolean;
|
|
68
|
+
color?: string;
|
|
69
|
+
fontSize?: number;
|
|
70
|
+
rotate?: number;
|
|
71
|
+
};
|
|
72
|
+
gridLine?: {
|
|
73
|
+
visible?: boolean;
|
|
74
|
+
color?: string;
|
|
75
|
+
width?: number;
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
export type ChartAxisSpec = IChartAxisSpec;
|
|
79
|
+
export interface IChartAxesSpec {
|
|
80
|
+
x?: ChartAxisSpec;
|
|
81
|
+
y?: ChartAxisSpec;
|
|
82
|
+
rightY?: Omit<ChartAxisSpec, 'reverse'>;
|
|
83
|
+
}
|
|
84
|
+
export type ChartAxesSpec = IChartAxesSpec;
|
|
85
|
+
export type ChartSeriesSelector = {
|
|
86
|
+
/**
|
|
87
|
+
* Preferentially matches IChartDataSeries.index. When no series data is
|
|
88
|
+
* available, builders treat it as an already-resolved series array position.
|
|
89
|
+
*/
|
|
90
|
+
index: number;
|
|
91
|
+
} | {
|
|
92
|
+
name: string;
|
|
93
|
+
};
|
|
94
|
+
export interface IChartSeriesPatch {
|
|
95
|
+
selector: ChartSeriesSelector;
|
|
96
|
+
name?: string;
|
|
97
|
+
type?: 'column' | 'line' | 'area';
|
|
98
|
+
color?: string;
|
|
99
|
+
fillOpacity?: number;
|
|
100
|
+
border?: {
|
|
101
|
+
color?: string | null;
|
|
102
|
+
width?: number;
|
|
103
|
+
opacity?: number;
|
|
104
|
+
dashType?: ChartBorderDashType;
|
|
105
|
+
};
|
|
106
|
+
point?: {
|
|
107
|
+
shape?: LinePointShape;
|
|
108
|
+
size?: number;
|
|
109
|
+
color?: string | null;
|
|
110
|
+
};
|
|
111
|
+
rightAxis?: boolean;
|
|
112
|
+
label?: {
|
|
113
|
+
visible?: boolean;
|
|
114
|
+
position?: 'top' | 'bottom' | 'inside' | 'outside';
|
|
115
|
+
contentType?: LabelContentType;
|
|
116
|
+
color?: string;
|
|
117
|
+
fontSize?: number;
|
|
118
|
+
bold?: boolean;
|
|
119
|
+
italic?: boolean;
|
|
120
|
+
};
|
|
121
|
+
dataPoints?: Record<number, {
|
|
122
|
+
shape?: LinePointShape;
|
|
123
|
+
size?: number;
|
|
124
|
+
color?: string | null;
|
|
125
|
+
fillOpacity?: number;
|
|
126
|
+
}>;
|
|
127
|
+
}
|
|
128
|
+
export type ChartSeriesPatch = IChartSeriesPatch;
|
|
129
|
+
export interface IChartWordCloudSpec {
|
|
130
|
+
shape?: WordCloudShapeEnum;
|
|
131
|
+
maskImageId?: string | null;
|
|
132
|
+
repeat?: boolean;
|
|
133
|
+
}
|
|
134
|
+
export type ChartWordCloudSpec = IChartWordCloudSpec;
|
|
135
|
+
export interface IChartWordCloudDescription {
|
|
136
|
+
shape?: WordCloudShapeEnum;
|
|
137
|
+
maskImageId?: string;
|
|
138
|
+
repeat?: boolean;
|
|
139
|
+
effectiveShapeSource: 'shape' | 'maskImage';
|
|
140
|
+
}
|
|
141
|
+
export type ChartWordCloudDescription = IChartWordCloudDescription;
|
|
142
|
+
export interface IChartAppearanceSpec {
|
|
143
|
+
background?: {
|
|
144
|
+
color?: string | null;
|
|
145
|
+
gradient?: boolean;
|
|
146
|
+
};
|
|
147
|
+
border?: {
|
|
148
|
+
color?: string | null;
|
|
149
|
+
width?: number;
|
|
150
|
+
};
|
|
151
|
+
font?: {
|
|
152
|
+
color?: string;
|
|
153
|
+
size?: number;
|
|
154
|
+
family?: string;
|
|
155
|
+
};
|
|
156
|
+
}
|
|
157
|
+
export type ChartAppearanceSpec = IChartAppearanceSpec;
|
|
158
|
+
/**
|
|
159
|
+
* Selects source fields for an explicit Scatter mapping.
|
|
160
|
+
*
|
|
161
|
+
* `xIndex` and `yIndex` are required, distinct indexes into the chart source.
|
|
162
|
+
* `labelIndex` is optional. Any mapped row with a non-finite x or y value makes
|
|
163
|
+
* the complete point source invalid. Omitting `mapping.scatter` preserves the
|
|
164
|
+
* established inferred Scatter behavior.
|
|
165
|
+
*
|
|
166
|
+
* @example
|
|
167
|
+
* ```ts
|
|
168
|
+
* mapping: {
|
|
169
|
+
* scatter: { labelIndex: 0, xIndex: 1, yIndex: 2 }
|
|
170
|
+
* }
|
|
171
|
+
* ```
|
|
172
|
+
*/
|
|
173
|
+
export interface IChartScatterMappingSpec {
|
|
174
|
+
xIndex: number;
|
|
175
|
+
yIndex: number;
|
|
176
|
+
labelIndex?: number;
|
|
177
|
+
}
|
|
178
|
+
/**
|
|
179
|
+
* Selects source fields for an explicit Bubble mapping.
|
|
180
|
+
*
|
|
181
|
+
* `xIndex` and `yIndex` are required and distinct. Labels, size values, and
|
|
182
|
+
* series grouping are optional. Any mapped row with a non-finite x or y value
|
|
183
|
+
* makes the complete point source invalid. Omitting `mapping.bubble` preserves
|
|
184
|
+
* the established inferred Bubble behavior.
|
|
185
|
+
*
|
|
186
|
+
* @example
|
|
187
|
+
* ```ts
|
|
188
|
+
* mapping: {
|
|
189
|
+
* bubble: {
|
|
190
|
+
* labelIndex: 0,
|
|
191
|
+
* xIndex: 1,
|
|
192
|
+
* yIndex: 2,
|
|
193
|
+
* sizeIndex: 3,
|
|
194
|
+
* seriesIndex: 4
|
|
195
|
+
* }
|
|
196
|
+
* }
|
|
197
|
+
* ```
|
|
198
|
+
*/
|
|
199
|
+
export interface IChartBubbleMappingSpec extends IChartScatterMappingSpec {
|
|
200
|
+
sizeIndex?: number;
|
|
201
|
+
seriesIndex?: number;
|
|
202
|
+
}
|
|
203
|
+
export interface IChartMappingSpec {
|
|
204
|
+
categoryIndex?: number | null;
|
|
205
|
+
/**
|
|
206
|
+
* Logical source-field indexes selected as chart measures.
|
|
207
|
+
* For WordCloud, `seriesIndexes[0]` is the single numeric weight measure;
|
|
208
|
+
* `categoryIndex` selects the term field.
|
|
209
|
+
*/
|
|
210
|
+
seriesIndexes?: number[] | null;
|
|
211
|
+
useDateAxis?: boolean | null;
|
|
212
|
+
scatter?: IChartScatterMappingSpec;
|
|
213
|
+
bubble?: IChartBubbleMappingSpec;
|
|
214
|
+
}
|
|
215
|
+
export type ChartMappingSpec = IChartMappingSpec;
|
|
216
|
+
export interface IChartAggregationSpec {
|
|
217
|
+
aggregate?: boolean;
|
|
218
|
+
topN?: number | null;
|
|
219
|
+
}
|
|
220
|
+
export type ChartAggregationSpec = IChartAggregationSpec;
|
|
221
|
+
export interface IChartPieSpec {
|
|
222
|
+
doughnutHole?: number | null;
|
|
223
|
+
/** Slice offset as a ratio of the pie radius. */
|
|
224
|
+
explosion?: number;
|
|
225
|
+
borderColor?: string;
|
|
226
|
+
hasPaddingAngle?: boolean;
|
|
227
|
+
isHalfPie?: boolean;
|
|
228
|
+
rosePie?: boolean;
|
|
229
|
+
showLabelLine?: boolean;
|
|
230
|
+
valueScale?: number;
|
|
231
|
+
valueSuffix?: string;
|
|
232
|
+
digitalFixed?: number;
|
|
233
|
+
label?: {
|
|
234
|
+
visible?: boolean;
|
|
235
|
+
position?: 'inside' | 'outside';
|
|
236
|
+
contentType?: LabelContentType;
|
|
237
|
+
color?: string;
|
|
238
|
+
fontSize?: number;
|
|
239
|
+
bold?: boolean;
|
|
240
|
+
italic?: boolean;
|
|
241
|
+
};
|
|
242
|
+
}
|
|
243
|
+
export type ChartPieSpec = IChartPieSpec;
|
|
244
|
+
export interface IChartRadarSpec {
|
|
245
|
+
shape?: RadarShape;
|
|
246
|
+
fill?: boolean;
|
|
247
|
+
}
|
|
248
|
+
export type ChartRadarSpec = IChartRadarSpec;
|
|
249
|
+
/**
|
|
250
|
+
* Pareto-specific persisted options. The descending bars, cumulative-percentage
|
|
251
|
+
* line, and secondary percentage axis are chart invariants, not configuration.
|
|
252
|
+
*/
|
|
253
|
+
export interface IChartParetoSpec {
|
|
254
|
+
/** Omitted keeps the current color; null clears it back to the theme default. */
|
|
255
|
+
barColor?: string | null;
|
|
256
|
+
/** Omitted keeps the current color; null clears it back to the theme default. */
|
|
257
|
+
cumulativeLineColor?: string | null;
|
|
258
|
+
/**
|
|
259
|
+
* Whether zero-valued categories remain in the Pareto bars and cumulative line.
|
|
260
|
+
* Defaults to false. For values [5, 0, -2], false keeps [5], while true keeps
|
|
261
|
+
* [5, 0]; negative values are always excluded and zeros sort after positives.
|
|
262
|
+
*/
|
|
263
|
+
includeZeroValues?: boolean;
|
|
264
|
+
}
|
|
265
|
+
export type ChartParetoSpec = IChartParetoSpec;
|
|
266
|
+
/**
|
|
267
|
+
* Escape hatch for engine-level style groups not covered by semantic fields.
|
|
268
|
+
* Prefer title/legend/axes/series/etc. when a semantic field exists.
|
|
269
|
+
*/
|
|
270
|
+
export type ChartAdvancedStylePatch = DeepPartial<Pick<ChartStyle, 'tooltip' | 'area' | 'funnel' | 'relation' | 'waterfall'>>;
|
|
271
|
+
/**
|
|
272
|
+
* Model-only create spec. Host source, drawing layout, and command execution stay
|
|
273
|
+
* in the sheet/slide adapter layer.
|
|
274
|
+
*/
|
|
275
|
+
export interface IChartModelCreateSpec {
|
|
276
|
+
type: ChartKnownTypeName;
|
|
277
|
+
title?: ChartTitleSpec;
|
|
278
|
+
legend?: ChartLegendSpec;
|
|
279
|
+
axes?: ChartAxesSpec;
|
|
280
|
+
series?: ChartSeriesPatch[];
|
|
281
|
+
wordCloud?: ChartWordCloudSpec;
|
|
282
|
+
appearance?: ChartAppearanceSpec;
|
|
283
|
+
mapping?: ChartMappingSpec;
|
|
284
|
+
aggregation?: ChartAggregationSpec;
|
|
285
|
+
pie?: ChartPieSpec;
|
|
286
|
+
radar?: ChartRadarSpec;
|
|
287
|
+
pareto?: ChartParetoSpec;
|
|
288
|
+
advancedStyle?: ChartAdvancedStylePatch;
|
|
289
|
+
theme?: string;
|
|
290
|
+
}
|
|
291
|
+
export type ChartModelCreateSpec = IChartModelCreateSpec;
|
|
292
|
+
/**
|
|
293
|
+
* Model-only patch. It can cover every supported model semantic field, while
|
|
294
|
+
* omitted fields and `undefined` mean no change. `null` clears the value where
|
|
295
|
+
* the field explicitly supports clearing.
|
|
296
|
+
*/
|
|
297
|
+
export interface IChartModelPatch {
|
|
298
|
+
type?: ChartKnownTypeName;
|
|
299
|
+
title?: ChartTitleSpec;
|
|
300
|
+
legend?: ChartLegendSpec;
|
|
301
|
+
axes?: ChartAxesSpec;
|
|
302
|
+
series?: ChartSeriesPatch[];
|
|
303
|
+
wordCloud?: ChartWordCloudSpec;
|
|
304
|
+
appearance?: ChartAppearanceSpec;
|
|
305
|
+
mapping?: ChartMappingSpec;
|
|
306
|
+
aggregation?: ChartAggregationSpec;
|
|
307
|
+
pie?: ChartPieSpec;
|
|
308
|
+
radar?: ChartRadarSpec;
|
|
309
|
+
pareto?: ChartParetoSpec;
|
|
310
|
+
advancedStyle?: ChartAdvancedStylePatch;
|
|
311
|
+
theme?: string;
|
|
312
|
+
}
|
|
313
|
+
export type ChartModelPatch = IChartModelPatch;
|
|
314
|
+
export interface IChartModelDiagnostic {
|
|
315
|
+
code: ChartModelDiagnosticCode;
|
|
316
|
+
severity: 'error' | 'warning';
|
|
317
|
+
message: string;
|
|
318
|
+
path?: string;
|
|
319
|
+
details?: unknown;
|
|
320
|
+
allowedValues?: readonly unknown[];
|
|
321
|
+
suggestion?: string;
|
|
322
|
+
}
|
|
323
|
+
export type ChartModelDiagnostic = IChartModelDiagnostic;
|
|
324
|
+
export interface IChartValidationResult<TNormalized = unknown> {
|
|
325
|
+
ok: boolean;
|
|
326
|
+
diagnostics: ChartModelDiagnostic[];
|
|
327
|
+
normalized?: DeepReadonly<TNormalized>;
|
|
328
|
+
}
|
|
329
|
+
export type ChartValidationResult<TNormalized = unknown> = IChartValidationResult<TNormalized>;
|
|
330
|
+
/**
|
|
331
|
+
* Patch to pass into the host adapter's chart config command.
|
|
332
|
+
*
|
|
333
|
+
* Do not JSON-roundtrip this object before applying it. `undefined` inside
|
|
334
|
+
* context/dataAggregation can be an intentional clear signal for command merge
|
|
335
|
+
* semantics, not just an absent field.
|
|
336
|
+
*/
|
|
337
|
+
export interface IChartModelConfigPatch {
|
|
338
|
+
chartType?: ChartTypeBits;
|
|
339
|
+
style?: ChartStyle;
|
|
340
|
+
context?: IChartContext;
|
|
341
|
+
dataAggregation?: Partial<IChartDataAggregation>;
|
|
342
|
+
}
|
|
343
|
+
export type ChartModelConfigPatch = IChartModelConfigPatch;
|
|
344
|
+
export interface IChartModelUpdateResult<TChanged extends string = ChartModelChangedGroup, TDiagnostic = ChartModelDiagnostic> {
|
|
345
|
+
ok: boolean;
|
|
346
|
+
diagnostics: TDiagnostic[];
|
|
347
|
+
/** Model config groups touched by configPatch; source/layout are adapter-owned. */
|
|
348
|
+
changed: TChanged[];
|
|
349
|
+
/** Absent when the update is valid but produces no model config change. */
|
|
350
|
+
configPatch?: ChartModelConfigPatch;
|
|
351
|
+
}
|
|
352
|
+
export type ChartModelUpdateResult<TChanged extends string = ChartModelChangedGroup, TDiagnostic = ChartModelDiagnostic> = IChartModelUpdateResult<TChanged, TDiagnostic>;
|
|
353
|
+
export interface IChartModelPatchSemantics {
|
|
354
|
+
omitted: ChartModelPatchSemantic.NoChange;
|
|
355
|
+
undefined: ChartModelPatchSemantic.NoChange;
|
|
356
|
+
null: ChartModelPatchSemantic.ClearWhereSupported;
|
|
357
|
+
object: ChartModelPatchSemantic.SemanticMerge;
|
|
358
|
+
array: ChartModelPatchSemantic.ReplaceUnlessSelectorMerge;
|
|
359
|
+
unknownField: ChartModelPatchSemantic.ValidationError;
|
|
360
|
+
}
|
|
361
|
+
export type ChartModelPatchSemantics = IChartModelPatchSemantics;
|
|
362
|
+
export interface IChartCapabilities {
|
|
363
|
+
version: string;
|
|
364
|
+
chartTypes: readonly ChartKnownTypeName[];
|
|
365
|
+
patchSemantics: ChartModelPatchSemantics;
|
|
366
|
+
createGroups: readonly ChartModelPatchGroup[];
|
|
367
|
+
updateGroups: readonly ChartModelPatchGroup[];
|
|
368
|
+
styleGroups: readonly ChartModelPatchGroup[];
|
|
369
|
+
advancedStyle: {
|
|
370
|
+
supported: boolean;
|
|
371
|
+
};
|
|
372
|
+
}
|
|
373
|
+
export type ChartModelCapabilities = IChartCapabilities;
|
|
374
|
+
export interface IChartModelInstanceCapabilities extends IChartCapabilities {
|
|
375
|
+
chartId: string;
|
|
376
|
+
type: ChartTypeName;
|
|
377
|
+
rawType?: number;
|
|
378
|
+
unsupportedGroups: readonly ChartModelPatchGroup[];
|
|
379
|
+
}
|
|
380
|
+
export type ChartModelInstanceCapabilities = IChartModelInstanceCapabilities;
|
|
381
|
+
export interface IChartSeriesDescription {
|
|
382
|
+
index: number;
|
|
383
|
+
name: string;
|
|
384
|
+
type?: 'column' | 'line' | 'area';
|
|
385
|
+
color?: string | null;
|
|
386
|
+
fillOpacity?: number;
|
|
387
|
+
border?: ChartSeriesPatch['border'];
|
|
388
|
+
point?: ChartSeriesPatch['point'];
|
|
389
|
+
rightAxis?: boolean;
|
|
390
|
+
label?: {
|
|
391
|
+
visible?: boolean;
|
|
392
|
+
position?: 'top' | 'bottom' | 'inside' | 'outside';
|
|
393
|
+
contentType?: LabelContentType;
|
|
394
|
+
color?: string;
|
|
395
|
+
fontSize?: number;
|
|
396
|
+
bold?: boolean;
|
|
397
|
+
italic?: boolean;
|
|
398
|
+
};
|
|
399
|
+
dataPoints?: ChartSeriesPatch['dataPoints'];
|
|
400
|
+
data?: DeepReadonly<IChartDataSeries>;
|
|
401
|
+
}
|
|
402
|
+
export type ChartSeriesDescription = IChartSeriesDescription;
|
|
403
|
+
export interface IChartModelDescription {
|
|
404
|
+
id: string;
|
|
405
|
+
type: ChartTypeName;
|
|
406
|
+
rawType?: number;
|
|
407
|
+
diagnostics?: ChartModelDiagnostic[];
|
|
408
|
+
title?: ChartTitleSpec;
|
|
409
|
+
legend?: ChartLegendSpec;
|
|
410
|
+
axes?: ChartAxesSpec;
|
|
411
|
+
wordCloud?: ChartWordCloudDescription;
|
|
412
|
+
appearance?: ChartAppearanceSpec;
|
|
413
|
+
mapping?: ChartMappingSpec;
|
|
414
|
+
aggregation?: ChartAggregationSpec;
|
|
415
|
+
pie?: ChartPieSpec;
|
|
416
|
+
radar?: ChartRadarSpec;
|
|
417
|
+
pareto?: ChartParetoSpec;
|
|
418
|
+
series: ChartSeriesDescription[];
|
|
419
|
+
category?: DeepReadonly<IChartDataCategory>;
|
|
420
|
+
theme?: string;
|
|
421
|
+
/**
|
|
422
|
+
* Frozen cloned readback for fields not yet represented by semantic
|
|
423
|
+
* description fields. Treat this as an escape hatch, not update input.
|
|
424
|
+
*/
|
|
425
|
+
rawStyle?: DeepReadonly<ChartStyle>;
|
|
426
|
+
}
|
|
427
|
+
export type ChartModelDescription = IChartModelDescription;
|
|
428
|
+
/**
|
|
429
|
+
* Stateless semantic operations for an existing ChartModel.
|
|
430
|
+
*
|
|
431
|
+
* This API never resolves host source/layout and never executes commands.
|
|
432
|
+
* update() only builds a configPatch; sheet/slide adapters decide how to apply it.
|
|
433
|
+
*/
|
|
434
|
+
export interface IChartModelApi {
|
|
435
|
+
describe(chartModel: ChartModel): ChartModelDescription;
|
|
436
|
+
/** Static capabilities of the model API, independent of any chart instance. */
|
|
437
|
+
getCapabilities(): ChartModelCapabilities;
|
|
438
|
+
/** Capabilities plus readback for one existing chart model. */
|
|
439
|
+
getInstanceCapabilities(chartModel: ChartModel): ChartModelInstanceCapabilities;
|
|
440
|
+
/**
|
|
441
|
+
* Validates patch shape, enums, and scalar ranges only. Selectors that depend
|
|
442
|
+
* on current chart data are resolved by update(), so a valid patch can still
|
|
443
|
+
* fail when applied to a specific ChartModel.
|
|
444
|
+
*/
|
|
445
|
+
validatePatch(patch: ChartModelPatch): ChartValidationResult<ChartModelPatch>;
|
|
446
|
+
/**
|
|
447
|
+
* Builds a model config patch for an existing ChartModel without mutating it.
|
|
448
|
+
* The returned configPatch is applied by host adapters through their command layer.
|
|
449
|
+
*/
|
|
450
|
+
update(chartModel: ChartModel, patch: ChartModelPatch): ChartModelUpdateResult;
|
|
451
|
+
}
|
|
452
|
+
export type ChartModelApi = IChartModelApi;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { ChartModelDiagnostic, ChartValidationResult } from './types';
|
|
2
|
+
export declare function createChartModelDiagnostic(code: ChartModelDiagnostic['code'], message: string, path?: string, severity?: ChartModelDiagnostic['severity'], details?: unknown, metadata?: Pick<ChartModelDiagnostic, 'allowedValues' | 'suggestion'>): ChartModelDiagnostic;
|
|
3
|
+
export declare function hasChartModelDiagnosticError(diagnostics: ChartModelDiagnostic[]): boolean;
|
|
4
|
+
export declare function validateKnownKeys(value: unknown, allowedKeys: ReadonlySet<string>, diagnostics: ChartModelDiagnostic[], path?: string): void;
|
|
5
|
+
export declare function setIfDefined(target: Record<string, any>, path: string, value: unknown): void;
|
|
6
|
+
export declare function setContextIfDefined(target: Record<string, any>, key: string, value: unknown): void;
|
|
7
|
+
export declare function deepAssign(target: Record<string, any>, source: Record<string, any>): void;
|
|
8
|
+
export declare function cloneReadonly<T>(value: T): T;
|
|
9
|
+
export declare function deepFreeze<T>(value: T): T;
|
|
10
|
+
export declare function okResult<TNormalized>(diagnostics: ChartModelDiagnostic[], normalized: TNormalized): ChartValidationResult<TNormalized>;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { ChartModelCreateSpec, ChartModelDiagnostic, ChartModelPatch, ChartValidationResult } from './types';
|
|
2
|
+
import { ChartModelPatchGroup } from './constants';
|
|
3
|
+
export declare function validateChartModelCreateSpec(spec: ChartModelCreateSpec): ChartValidationResult<ChartModelCreateSpec>;
|
|
4
|
+
export declare function validateChartModelPatch(patch: ChartModelPatch, effectiveType?: string): ChartValidationResult<ChartModelPatch>;
|
|
5
|
+
export declare function validateChartModelSupportedGroups(patch: ChartModelCreateSpec | ChartModelPatch, supportedGroups: readonly ChartModelPatchGroup[], diagnostics: ChartModelDiagnostic[], ignoreRequiredType?: boolean): void;
|
package/lib/types/enum.d.ts
CHANGED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { ChartModelChangedGroup, ChartModelDescription, ChartModelDiagnostic, ChartModelPatch, ChartModelUpdateResult } from './chart-model-api';
|
|
2
|
+
import type { IChartRenderModelImageExportOptions, IChartRenderModelImageExportResult } from './types';
|
|
3
|
+
export type FChartDescription<TIdentity extends object, TDataSource> = {
|
|
4
|
+
identity: TIdentity;
|
|
5
|
+
dataSource: TDataSource;
|
|
6
|
+
};
|
|
7
|
+
export type FAnyChartDescription = ChartModelDescription & FChartDescription<object, unknown>;
|
|
8
|
+
export type FChartUpdateResult<TChart = unknown, TChanged extends string = ChartModelChangedGroup, TDiagnostic = ChartModelDiagnostic> = ChartModelUpdateResult<TChanged, TDiagnostic> & {
|
|
9
|
+
chart: TChart | null;
|
|
10
|
+
};
|
|
11
|
+
export declare abstract class FBaseChart<TDescription extends object = FAnyChartDescription, TUpdateResult extends FChartUpdateResult<unknown, string, unknown> = FChartUpdateResult> {
|
|
12
|
+
abstract getId(): string;
|
|
13
|
+
abstract describe(): TDescription | null;
|
|
14
|
+
abstract update(patch: ChartModelPatch): Promise<TUpdateResult>;
|
|
15
|
+
abstract exportImage(options?: IChartRenderModelImageExportOptions): Promise<IChartRenderModelImageExportResult | null>;
|
|
16
|
+
abstract remove(): Promise<boolean>;
|
|
17
|
+
}
|
|
18
|
+
export declare abstract class FBaseCharts<TChart extends FBaseChart<object, FChartUpdateResult<unknown, string, unknown>>, TCreateSpec, TCapabilities> {
|
|
19
|
+
abstract create(spec: TCreateSpec): Promise<TChart>;
|
|
20
|
+
abstract get(id: string): TChart | null;
|
|
21
|
+
abstract list(): TChart[];
|
|
22
|
+
abstract update(chart: TChart | string, patch: ChartModelPatch): ReturnType<TChart['update']>;
|
|
23
|
+
abstract remove(chart: TChart | string): Promise<boolean>;
|
|
24
|
+
abstract getCapabilities(): TCapabilities;
|
|
25
|
+
}
|
package/lib/types/index.d.ts
CHANGED
|
@@ -1,32 +1,135 @@
|
|
|
1
|
-
export {
|
|
2
|
-
export {
|
|
3
|
-
export {
|
|
1
|
+
export { chartModelApi } from './chart-model-api/chart-model-api';
|
|
2
|
+
export { buildDonutStyle } from './chart-model-api/chart-type';
|
|
3
|
+
export { chartTypeBitsToName } from './chart-model-api/chart-type';
|
|
4
|
+
export { chartTypeNameToBits } from './chart-model-api/chart-type';
|
|
5
|
+
export { UNSUPPORTED_CHART_TYPE_NAME } from './chart-model-api/chart-type-registry';
|
|
6
|
+
export { CHART_MODEL_API_CAPABILITIES_VERSION } from './chart-model-api/constants';
|
|
7
|
+
export { CHART_MODEL_DEFAULT_DONUT_HOLE } from './chart-model-api/constants';
|
|
8
|
+
export { CHART_MODEL_PATCH_SEMANTICS } from './chart-model-api/constants';
|
|
9
|
+
export { CHART_MODEL_UNSUPPORTED_TYPE_SUGGESTION } from './chart-model-api/constants';
|
|
10
|
+
export { ChartModelChangedGroup } from './chart-model-api/constants';
|
|
11
|
+
export { ChartModelDiagnosticCode } from './chart-model-api/constants';
|
|
12
|
+
export { ChartModelPatchGroup } from './chart-model-api/constants';
|
|
13
|
+
export { ChartModelPatchSemantic } from './chart-model-api/constants';
|
|
14
|
+
export { buildChartModelConfigPatch, buildCreateChartModelConfigPatch } from './chart-model-api/patch-builder';
|
|
15
|
+
export type { ChartAdvancedStylePatch } from './chart-model-api/types';
|
|
16
|
+
export type { ChartAggregationSpec } from './chart-model-api/types';
|
|
17
|
+
export type { ChartAppearanceSpec } from './chart-model-api/types';
|
|
18
|
+
export type { ChartAxesSpec } from './chart-model-api/types';
|
|
19
|
+
export type { ChartAxisSpec } from './chart-model-api/types';
|
|
20
|
+
export type { ChartKnownTypeName } from './chart-model-api/types';
|
|
21
|
+
export type { ChartLegendSpec } from './chart-model-api/types';
|
|
22
|
+
export type { ChartMappingSpec } from './chart-model-api/types';
|
|
23
|
+
export type { ChartModelApi } from './chart-model-api/types';
|
|
24
|
+
export type { ChartModelCapabilities } from './chart-model-api/types';
|
|
25
|
+
export type { ChartModelConfigPatch } from './chart-model-api/types';
|
|
26
|
+
export type { ChartModelCreateSpec } from './chart-model-api/types';
|
|
27
|
+
export type { ChartModelDescription } from './chart-model-api/types';
|
|
28
|
+
export type { ChartModelDiagnostic } from './chart-model-api/types';
|
|
29
|
+
export type { ChartModelInstanceCapabilities } from './chart-model-api/types';
|
|
30
|
+
export type { ChartModelPatch } from './chart-model-api/types';
|
|
31
|
+
export type { ChartModelPatchSemantics } from './chart-model-api/types';
|
|
32
|
+
export type { ChartModelUpdateResult } from './chart-model-api/types';
|
|
33
|
+
export type { ChartParetoSpec } from './chart-model-api/types';
|
|
34
|
+
export type { ChartPieSpec } from './chart-model-api/types';
|
|
35
|
+
export type { ChartRadarSpec } from './chart-model-api/types';
|
|
36
|
+
export type { ChartSeriesDescription } from './chart-model-api/types';
|
|
37
|
+
export type { ChartSeriesPatch } from './chart-model-api/types';
|
|
38
|
+
export type { ChartSeriesSelector } from './chart-model-api/types';
|
|
39
|
+
export type { ChartTitleSpec } from './chart-model-api/types';
|
|
40
|
+
export type { ChartTypeName } from './chart-model-api/types';
|
|
41
|
+
export type { ChartValidationResult } from './chart-model-api/types';
|
|
42
|
+
export type { ChartWordCloudDescription } from './chart-model-api/types';
|
|
43
|
+
export type { ChartWordCloudSpec } from './chart-model-api/types';
|
|
44
|
+
export type { DeepReadonly } from './chart-model-api/types';
|
|
45
|
+
export { createChartModelDiagnostic } from './chart-model-api/utils';
|
|
46
|
+
export { hasChartModelDiagnosticError } from './chart-model-api/utils';
|
|
47
|
+
export { validateChartModelCreateSpec } from './chart-model-api/validate';
|
|
48
|
+
export { validateChartModelPatch } from './chart-model-api/validate';
|
|
49
|
+
export { AreaLineStyle, AxisAlignEnum, AxisValueType, CategoryType, ChartAttributeBits, ChartBorderDashType, ChartSourceDataTypeEnum, ChartTrendlineType, ChartTypeBits, DataOrientation, InvalidValueType, IRuntimeAxisPosition, IRuntimeAxisPriority, LabelAlignEnum, LabelContentType, LegendPositionEnum, LinePointShape, ParetoSeriesIndex, ParetoSeriesPart, PieLabelPosition, RadarShape, RelationChartLayoutEnum, SelectModeEnum, SeriesLabelPosition, StackType, TextAlign, TextVerticalAlign, TitlePositionEnum, WaterfallSeriesTypeEnum, WaterfallStackTypeEnum, WordCloudShapeEnum, } from './enum';
|
|
50
|
+
export type { FAnyChartDescription, FChartDescription, FChartUpdateResult, } from './f-base-chart';
|
|
51
|
+
export { FBaseChart, FBaseCharts, } from './f-base-chart';
|
|
52
|
+
export { buildChartData, RelationColumnIndex } from './models/chart-data-operators/build-chart-data';
|
|
53
|
+
export { CartesianPointRoleIndex, CartesianPointValueIndex } from './models/chart-data-operators/cartesian-point-data';
|
|
54
|
+
export { defaultChartContextOperators, findCategoryIndexes, findCategoryOperator, findHeaderOperator, findSeriesOperator, generateChartModelContextByOperators, pieSeriesFilterOperator, } from './models/chart-data-operators/operators';
|
|
55
|
+
export { CHART_HOST_DEFAULT_BORDER_COLOR, CHART_HOST_DEFAULT_BORDER_RADIUS, CHART_HOST_DEFAULT_BORDER_WIDTH, composeChartHostFrameImage, getChartHostFrameContentRect, resolveDefaultChartHostFrameStyle, resolveChartHostFrameStyle, shouldComposeChartHostFrame, } from './models/chart-host-style';
|
|
56
|
+
export type { IResolveChartHostFrameStyleInput, IResolveDefaultChartHostFrameStyleInput, } from './models/chart-host-style';
|
|
4
57
|
export type { IChartLocaleTexts } from './models/chart-locale-texts';
|
|
5
58
|
export { getDefaultChartLocaleTexts, replaceLocaleParams } from './models/chart-locale-texts';
|
|
6
|
-
export { ChartModel } from './models/chart-model';
|
|
7
|
-
export {
|
|
8
|
-
export {
|
|
9
|
-
export {
|
|
59
|
+
export { CHART_DEBOUNCE_TIME, ChartModel, } from './models/chart-model';
|
|
60
|
+
export { resolveChartRenderModelImageExportInput } from './models/chart-render-input-resolver';
|
|
61
|
+
export type { IChartRenderInputRuntime, IResolveChartRenderModelImageExportInputParams, } from './models/chart-render-input-resolver';
|
|
62
|
+
export { ChartRenderModelManagerService, IChartRenderModelManagerService, registerChartRenderModelManagerService, } from './models/chart-render-model-manager.service';
|
|
63
|
+
export { resolveChartRuntimeStyle, resolveChartStyleBackgroundColor, } from './models/chart-runtime-style';
|
|
64
|
+
export { ChartThemeService, registerChartThemeService, } from './models/chart-theme.service';
|
|
10
65
|
export { getThemeAxesByType } from './models/constants/build-in-theme';
|
|
11
66
|
export { themeDefault, UniverTheme1, UniverTheme2, UniverTheme3, UniverTheme4, UniverTheme5, UniverTheme6, UniverThemeGradient1, UniverThemeGradient2, UniverThemeGradient3, UniverThemeGradient4, UniverThemeGradient5, UniverThemeGradient6, } from './models/constants/build-in-theme';
|
|
12
67
|
export type { IEchartTheme } from './models/constants/build-in-theme';
|
|
13
68
|
export { getThemeProps } from './models/constants/build-in-theme';
|
|
14
69
|
export { defaultChartHeight, defaultChartWidth, EChartRenderEngineName } from './models/constants/default';
|
|
15
70
|
export { defaultChartConfig, RTLChartStyle, themeColors } from './models/constants/default-chart-style';
|
|
16
|
-
export { EChartRenderModel } from './models/echart-render-model';
|
|
71
|
+
export { EChartRenderEngine, EChartRenderModel } from './models/echart-render-model';
|
|
17
72
|
export type { IEChartRenderModelOptions } from './models/echart-render-model';
|
|
18
73
|
export { echartToChartModelInit, isChartModelInit } from './models/echart-to-chart-model-init';
|
|
19
74
|
export { chartImageSourceToDataUrl, ImageChartHost } from './models/image-chart-host';
|
|
20
75
|
export type { IChartModelInitParams } from './models/mode-converter/mode-converter';
|
|
21
|
-
export { convertModelFromInitData, convertModelToSpec,
|
|
76
|
+
export { convertModelFromInitData, convertModelToSpec, } from './models/mode-converter/mode-converter';
|
|
22
77
|
export { OffscreenChartHost } from './models/offscreen-chart-host';
|
|
23
|
-
export { registerWordCloudChartMakImageService, WordCloudMuskImageService } from './models/word-cloud-musk-image.service';
|
|
78
|
+
export { registerWordCloudChartMakImageService, WordCloudMuskImageService, } from './models/word-cloud-musk-image.service';
|
|
24
79
|
export { ChartDataSource } from './source/chart-source';
|
|
25
80
|
export { StaticChartSource } from './source/static-chart-source';
|
|
26
|
-
export { ChartImageSourceType } from './types';
|
|
27
|
-
export type { ChartDataSourceValue, ChartDataSourceValues,
|
|
28
|
-
export
|
|
29
|
-
export { chartBitsUtils, chartTypeCanUseTrendLine } from './util';
|
|
81
|
+
export { ChartHostRenderMode, ChartImageSourceType } from './types';
|
|
82
|
+
export type { ChartDataSourceValue, ChartDataSourceValues, ChartDirection, ChartElementEventHandler, ChartElementEventType, ChartElementKind, ChartImageSource, ChartStyle, DeepPartial, DimensionDefinitionLoose, IAllSeriesStyle, IAxisOptions, IChartConfig, IChartContext, IChartData, IChartDataAggregation, IChartDataCategory, IChartDataSeries, IChartDataSource, IChartElementBounds, IChartElementEvent, IChartElementHit, IChartElementOverlay, IChartHost, IChartHostBorderStyle, IChartHostLease, IChartHostRect, IChartHostStyle, IChartInstance, IChartRenderAsImageOptions, IChartRenderInput, IChartRenderInstance, IChartRenderInstanceCreateContext, IChartRenderInstanceSpecInput, IChartRenderInstanceStyleInput, IChartRenderModel, IChartRenderModelImageExportInput, IChartRenderModelImageExportOptions, IChartRenderModelImageExportResult, IChartSnapshot, IChartStyle, IDimensionDefinition, IDomChartHost, IGridLineStyle, IImageChartHost, ILabelStyle, ILegendStyle, IPieLabelStyle, IPointStyle, IRelationForceOptions, IRuntimeAxis, ISeriesLabelStyle, ISeriesStyle, ITrendLine, IUniverDataSet, OptionDataValue, RightYAxisOptions, } from './types';
|
|
83
|
+
export { chartBitsUtils, chartTypeCanUseTrendLine, } from './util';
|
|
30
84
|
export * from './utils/echarts';
|
|
31
85
|
export { WordCloudResourceConfig } from './word-cloud-resource/word-cloud-resource-config';
|
|
32
|
-
export
|
|
86
|
+
export { WORD_CLOUD_DEFAULT_OPTION, WORD_CLOUD_SERIES_TYPE } from './wordcloud-chart/adapters/echarts/echarts-options';
|
|
87
|
+
export { registerWordCloudChart } from './wordcloud-chart/adapters/echarts/install';
|
|
88
|
+
export { layoutWordCloudChart } from './wordcloud-chart/canvas';
|
|
89
|
+
export { resolveLayoutOptions } from './wordcloud-chart/canvas';
|
|
90
|
+
export * from './wordcloud-chart/core/layout/font-scale';
|
|
91
|
+
export { createBuiltinMaskGrid } from './wordcloud-chart/core/shape/built-in-shapes';
|
|
92
|
+
export { createMaskGridFromShape } from './wordcloud-chart/core/shape/built-in-shapes';
|
|
93
|
+
export { createTextMaskGrid } from './wordcloud-chart/core/shape/built-in-shapes';
|
|
94
|
+
export { normalizeMaskGrid } from './wordcloud-chart/core/shape/built-in-shapes';
|
|
95
|
+
export { segmentMaskGrid } from './wordcloud-chart/core/shape/built-in-shapes';
|
|
96
|
+
export { encodeWordCloudWords } from './wordcloud-chart/core/text/formatter';
|
|
97
|
+
export { normalizeWordCloudData } from './wordcloud-chart/core/text/normalize';
|
|
98
|
+
export { DEFAULT_WORD_CLOUD_CHART_SPEC } from './wordcloud-chart/defaults';
|
|
99
|
+
export { resolveWordCloudSpec } from './wordcloud-chart/defaults';
|
|
100
|
+
export type { INormalizedWordCloudDatum } from './wordcloud-chart/types';
|
|
101
|
+
export type { IResolvedWordCloudSpec } from './wordcloud-chart/types';
|
|
102
|
+
export type { IWordCloudBounds } from './wordcloud-chart/types';
|
|
103
|
+
export type { IWordCloudChartSpec } from './wordcloud-chart/types';
|
|
104
|
+
export type { IWordCloudDataSource } from './wordcloud-chart/types';
|
|
105
|
+
export type { IWordCloudEChartsMaskSource } from './wordcloud-chart/types';
|
|
106
|
+
export type { IWordCloudEChartsSeriesDataItem } from './wordcloud-chart/types';
|
|
107
|
+
export type { IWordCloudEChartsSeriesOption } from './wordcloud-chart/types';
|
|
108
|
+
export type { IWordCloudEncodedWord } from './wordcloud-chart/types';
|
|
109
|
+
export type { IWordCloudEncoding } from './wordcloud-chart/types';
|
|
110
|
+
export type { IWordCloudFieldMapping } from './wordcloud-chart/types';
|
|
111
|
+
export type { IWordCloudLayoutMask } from './wordcloud-chart/types';
|
|
112
|
+
export type { IWordCloudLayoutOptions } from './wordcloud-chart/types';
|
|
113
|
+
export type { IWordCloudLayoutResult } from './wordcloud-chart/types';
|
|
114
|
+
export type { IWordCloudMaskGrid } from './wordcloud-chart/types';
|
|
115
|
+
export type { IWordCloudMaskShapeSpec } from './wordcloud-chart/types';
|
|
116
|
+
export type { IWordCloudPlacedWord } from './wordcloud-chart/types';
|
|
117
|
+
export type { IWordCloudProtocolSpec } from './wordcloud-chart/types';
|
|
118
|
+
export type { IWordCloudSegmentationRegion } from './wordcloud-chart/types';
|
|
119
|
+
export type { IWordCloudSegmentationResult } from './wordcloud-chart/types';
|
|
120
|
+
export type { IWordCloudSeriesDataItem } from './wordcloud-chart/types';
|
|
121
|
+
export type { IWordCloudSeriesOption } from './wordcloud-chart/types';
|
|
122
|
+
export type { IWordCloudSpecBase } from './wordcloud-chart/types';
|
|
123
|
+
export type { IWordCloudTextMarkAttrs } from './wordcloud-chart/types';
|
|
124
|
+
export type { IWordCloudTextMarkSpec } from './wordcloud-chart/types';
|
|
125
|
+
export type { IWordCloudTextMeasurer } from './wordcloud-chart/types';
|
|
126
|
+
export type { IWordCloudTextSprite } from './wordcloud-chart/types';
|
|
127
|
+
export type { WordCloudFontSizeRange } from './wordcloud-chart/types';
|
|
128
|
+
export type { WordCloudShape } from './wordcloud-chart/types';
|
|
129
|
+
export { DEFAULT_WORD_CLOUD_SHAPE } from './wordcloud-chart/types';
|
|
130
|
+
export { normalizeWordCloudShape } from './wordcloud-chart/types';
|
|
131
|
+
export { SUPPORTED_WORD_CLOUD_SHAPES } from './wordcloud-chart/types';
|
|
132
|
+
export { DEFAULT_WORD_CLOUD_RENDER_CONFIG } from './wordcloud-chart/word-cloud-render-config';
|
|
133
|
+
export { resolveWordCloudRenderConfig } from './wordcloud-chart/word-cloud-render-config';
|
|
134
|
+
export type { IResolvedWordCloudRenderConfig } from './wordcloud-chart/word-cloud-render-config';
|
|
135
|
+
export type { IWordCloudRenderConfig } from './wordcloud-chart/word-cloud-render-config';
|