@univerjs-pro/engine-chart 1.0.0-alpha.2 → 1.0.0-alpha.4
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/facade.js +1 -0
- package/lib/cjs/index.js +1 -1
- package/lib/es/facade.js +1 -0
- package/lib/es/index.js +1 -1
- package/lib/facade.js +1 -0
- package/lib/index.js +1 -1
- package/lib/types/chart-builder/chart-builder-adapter.d.ts +13 -0
- package/lib/types/chart-builder/chart-builder.d.ts +35 -0
- package/lib/types/chart-builder/chart-description.d.ts +3 -0
- package/lib/types/chart-builder/chart-types.d.ts +459 -0
- package/lib/types/chart-builder/configuration/aggregation.d.ts +7 -0
- package/lib/types/chart-builder/configuration/appearance.d.ts +8 -0
- package/lib/types/chart-builder/configuration/area.d.ts +3 -0
- package/lib/types/chart-builder/configuration/axes.d.ts +26 -0
- package/lib/types/chart-builder/configuration/axis-pointer.d.ts +9 -0
- package/lib/types/chart-builder/configuration/bar.d.ts +3 -0
- package/lib/types/chart-builder/configuration/cartesian-series.d.ts +25 -0
- package/lib/types/chart-builder/configuration/chart-config-operation.d.ts +40 -0
- package/lib/types/chart-builder/configuration/combination.d.ts +10 -0
- package/lib/types/chart-builder/configuration/funnel.d.ts +4 -0
- package/lib/types/chart-builder/configuration/heatmap.d.ts +9 -0
- package/lib/types/chart-builder/configuration/index.d.ts +29 -0
- package/lib/types/chart-builder/configuration/invalid-value.d.ts +3 -0
- package/lib/types/chart-builder/configuration/legend.d.ts +3 -0
- package/lib/types/chart-builder/configuration/line.d.ts +3 -0
- package/lib/types/chart-builder/configuration/mapping.d.ts +4 -0
- package/lib/types/chart-builder/configuration/mark-lines.d.ts +3 -0
- package/lib/types/chart-builder/configuration/palette.d.ts +4 -0
- package/lib/types/chart-builder/configuration/pareto.d.ts +7 -0
- package/lib/types/chart-builder/configuration/pie.d.ts +23 -0
- package/lib/types/chart-builder/configuration/point-mapping.d.ts +5 -0
- package/lib/types/chart-builder/configuration/radar.d.ts +5 -0
- package/lib/types/chart-builder/configuration/relation.d.ts +14 -0
- package/lib/types/chart-builder/configuration/subtitle.d.ts +3 -0
- package/lib/types/chart-builder/configuration/theme.d.ts +4 -0
- package/lib/types/chart-builder/configuration/title.d.ts +3 -0
- package/lib/types/chart-builder/configuration/trendline.d.ts +12 -0
- package/lib/types/chart-builder/configuration/waterfall.d.ts +12 -0
- package/lib/types/chart-builder/configuration/word-cloud.d.ts +7 -0
- package/lib/types/chart-builder/conversion/chart-config-converter.d.ts +24 -0
- package/lib/types/chart-builder/conversion/chart-model-fields.d.ts +115 -0
- package/lib/types/chart-builder/conversion/chart-type-converter.d.ts +6 -0
- package/lib/types/chart-builder/conversion/describe-chart-model.d.ts +11 -0
- package/lib/types/chart-builder/conversion/resolve-chart-model-data.d.ts +5 -0
- package/lib/types/chart-builder/detached-chart-builder-adapter.d.ts +19 -0
- package/lib/types/chart-builder/index.d.ts +12 -0
- package/lib/types/chart-builder/internal/deep-freeze.d.ts +1 -0
- package/lib/types/chart-builder/internal/host-builder-runtime.d.ts +5 -0
- package/lib/types/chart-builder/internal/merge-description.d.ts +2 -0
- package/lib/types/enum.d.ts +36 -0
- package/lib/types/facade/builders/f-area-chart-builder.d.ts +33 -0
- package/lib/types/facade/builders/f-bubble-chart-builder.d.ts +33 -0
- package/lib/types/facade/builders/f-combination-chart-builder.d.ts +66 -0
- package/lib/types/facade/builders/f-funnel-chart-builder.d.ts +61 -0
- package/lib/types/facade/builders/f-heatmap-chart-builder.d.ts +124 -0
- package/lib/types/facade/builders/f-line-chart-builder.d.ts +36 -0
- package/lib/types/facade/builders/f-pareto-chart-builder.d.ts +112 -0
- package/lib/types/facade/builders/f-pie-chart-builder.d.ts +324 -0
- package/lib/types/facade/builders/f-radar-chart-builder.d.ts +62 -0
- package/lib/types/facade/builders/f-relation-chart-builder.d.ts +184 -0
- package/lib/types/facade/builders/f-scatter-chart-builder.d.ts +33 -0
- package/lib/types/facade/builders/f-waterfall-chart-builder.d.ts +226 -0
- package/lib/types/facade/builders/f-word-cloud-chart-builder.d.ts +91 -0
- package/lib/types/facade/builders/index.d.ts +13 -0
- package/lib/types/facade/chart-builder-registry.d.ts +8 -0
- package/lib/types/facade/chart-builder-type-map.d.ts +30 -0
- package/lib/types/facade/chart-host-builder-types.d.ts +21 -0
- package/lib/types/facade/f-axis-chart-builder.d.ts +245 -0
- package/lib/types/facade/f-cartesian-chart-builder.d.ts +146 -0
- package/lib/types/facade/f-chart-base.d.ts +82 -0
- package/lib/types/facade/f-chart-builder-base.d.ts +331 -0
- package/lib/types/facade/f-charts-base.d.ts +74 -0
- package/lib/types/facade/f-enum.d.ts +75 -0
- package/lib/types/facade/index.d.ts +16 -0
- package/lib/types/facade/internal/chart-builder-facade-context.d.ts +12 -0
- package/lib/types/facade/internal/constants.d.ts +2 -0
- package/lib/types/facade/internal/host-builder-composer.d.ts +16 -0
- package/lib/types/facade/register-builders.d.ts +1 -0
- package/lib/types/index.d.ts +74 -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 +40 -0
- package/lib/types/models/chart-model.d.ts +181 -49
- 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/chart-resource-serializer.d.ts +10 -0
- package/lib/types/models/chart-semantic-axes.d.ts +4 -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-chart-style.d.ts +21 -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/converters/waterfall-layout.d.ts +34 -0
- 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/mode-converter/render-spec-operators/mark-line.operator.d.ts +3 -0
- package/lib/types/models/mode-converter/render-spec-operators/tools.d.ts +2 -3
- package/lib/types/models/series-style/series-style-resolver.d.ts +9 -0
- package/lib/types/source/chart-data-item.d.ts +3 -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 +162 -39
- package/lib/types/util.d.ts +2 -4
- package/lib/types/utils/compact.d.ts +4 -0
- 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/facade.js +1 -0
- package/lib/umd/index.js +1 -1
- package/package.json +15 -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,331 @@
|
|
|
1
|
+
import type { ChartAggregationTarget, ChartAppearanceTarget, ChartBuilder, ChartDescription, ChartLegendSpec, ChartPendingConfig, ChartSubtitleSpec, ChartTitleSpec, IChartAggregationSpec, IChartAppearanceSpec, InvalidValueType } from '@univerjs-pro/engine-chart';
|
|
2
|
+
import type { IChartBuilderTypeMap } from './chart-builder-type-map';
|
|
3
|
+
import { FChartBase } from './f-chart-base';
|
|
4
|
+
export declare class FChartBuilderBase<TBuilder extends ChartBuilder = ChartBuilder, TDescription extends ChartDescription = ChartDescription> extends FChartBase<TDescription, TBuilder> {
|
|
5
|
+
protected _record(patch: ChartPendingConfig): this;
|
|
6
|
+
/**
|
|
7
|
+
* Sets the title configuration and returns this builder for chaining.
|
|
8
|
+
*
|
|
9
|
+
* This method executes synchronously.
|
|
10
|
+
*
|
|
11
|
+
* @param value The semantic value to record.
|
|
12
|
+
* @returns This builder for chaining.
|
|
13
|
+
* @example
|
|
14
|
+
* ```ts
|
|
15
|
+
* const worksheet = univerAPI.getActiveWorkbook().getActiveSheet();
|
|
16
|
+
* const builder = worksheet.charts.create();
|
|
17
|
+
* builder.setTitle({ text: 'Quarterly sales' });
|
|
18
|
+
* ```
|
|
19
|
+
*/
|
|
20
|
+
setTitle(value: ChartTitleSpec): this;
|
|
21
|
+
/**
|
|
22
|
+
* Clears the title configuration and returns this builder for chaining.
|
|
23
|
+
*
|
|
24
|
+
* This method executes synchronously.
|
|
25
|
+
*
|
|
26
|
+
* @returns This builder for chaining.
|
|
27
|
+
* @example
|
|
28
|
+
* ```ts
|
|
29
|
+
* const worksheet = univerAPI.getActiveWorkbook().getActiveSheet();
|
|
30
|
+
* const builder = worksheet.charts.create();
|
|
31
|
+
* builder.clearTitle();
|
|
32
|
+
* ```
|
|
33
|
+
*/
|
|
34
|
+
clearTitle(): this;
|
|
35
|
+
/**
|
|
36
|
+
* Sets the subtitle configuration and returns this builder for chaining.
|
|
37
|
+
*
|
|
38
|
+
* This method executes synchronously.
|
|
39
|
+
*
|
|
40
|
+
* @param value The semantic value to record.
|
|
41
|
+
* @returns This builder for chaining.
|
|
42
|
+
* @example
|
|
43
|
+
* ```ts
|
|
44
|
+
* const worksheet = univerAPI.getActiveWorkbook().getActiveSheet();
|
|
45
|
+
* const builder = worksheet.charts.create();
|
|
46
|
+
* builder.setSubtitle({ text: 'FY 2026' });
|
|
47
|
+
* ```
|
|
48
|
+
*/
|
|
49
|
+
setSubtitle(value: ChartSubtitleSpec): this;
|
|
50
|
+
/**
|
|
51
|
+
* Clears the subtitle configuration and returns this builder for chaining.
|
|
52
|
+
*
|
|
53
|
+
* This method executes synchronously.
|
|
54
|
+
*
|
|
55
|
+
* @returns This builder for chaining.
|
|
56
|
+
* @example
|
|
57
|
+
* ```ts
|
|
58
|
+
* const worksheet = univerAPI.getActiveWorkbook().getActiveSheet();
|
|
59
|
+
* const builder = worksheet.charts.create();
|
|
60
|
+
* builder.clearSubtitle();
|
|
61
|
+
* ```
|
|
62
|
+
*/
|
|
63
|
+
clearSubtitle(): this;
|
|
64
|
+
/**
|
|
65
|
+
* Sets the legend configuration and returns this builder for chaining.
|
|
66
|
+
*
|
|
67
|
+
* This method executes synchronously.
|
|
68
|
+
*
|
|
69
|
+
* @param value The semantic value to record.
|
|
70
|
+
* @returns This builder for chaining.
|
|
71
|
+
* @example
|
|
72
|
+
* ```ts
|
|
73
|
+
* const worksheet = univerAPI.getActiveWorkbook().getActiveSheet();
|
|
74
|
+
* const builder = worksheet.charts.create();
|
|
75
|
+
* builder.setLegend(true);
|
|
76
|
+
* ```
|
|
77
|
+
*/
|
|
78
|
+
setLegend(value: ChartLegendSpec): this;
|
|
79
|
+
/**
|
|
80
|
+
* Clears the legend configuration and returns this builder for chaining.
|
|
81
|
+
*
|
|
82
|
+
* This method executes synchronously.
|
|
83
|
+
*
|
|
84
|
+
* @returns This builder for chaining.
|
|
85
|
+
* @example
|
|
86
|
+
* ```ts
|
|
87
|
+
* const worksheet = univerAPI.getActiveWorkbook().getActiveSheet();
|
|
88
|
+
* const builder = worksheet.charts.create();
|
|
89
|
+
* builder.clearLegend();
|
|
90
|
+
* ```
|
|
91
|
+
*/
|
|
92
|
+
clearLegend(): this;
|
|
93
|
+
/**
|
|
94
|
+
* Sets the theme configuration and returns this builder for chaining.
|
|
95
|
+
*
|
|
96
|
+
* A non-empty chart palette takes precedence over the theme's series colors. This method does
|
|
97
|
+
* not clear that palette; call `clearPalette()` explicitly to use the selected theme colors.
|
|
98
|
+
*
|
|
99
|
+
* This method executes synchronously.
|
|
100
|
+
*
|
|
101
|
+
* @param name The stable registered name.
|
|
102
|
+
* @returns This builder for chaining.
|
|
103
|
+
* @example
|
|
104
|
+
* ```ts
|
|
105
|
+
* const fWorkbook = univerAPI.getActiveWorkbook();
|
|
106
|
+
* const fWorksheet = fWorkbook.getSheetByName('Sheet1');
|
|
107
|
+
* if (!fWorksheet) return;
|
|
108
|
+
* const builder = fWorksheet.charts.create();
|
|
109
|
+
* builder.setTheme('brand');
|
|
110
|
+
* ```
|
|
111
|
+
*/
|
|
112
|
+
setTheme(name: string): this;
|
|
113
|
+
/**
|
|
114
|
+
* Clears the theme configuration and returns this builder for chaining.
|
|
115
|
+
*
|
|
116
|
+
* This method executes synchronously.
|
|
117
|
+
*
|
|
118
|
+
* @returns This builder for chaining.
|
|
119
|
+
* @example
|
|
120
|
+
* ```ts
|
|
121
|
+
* const fWorkbook = univerAPI.getActiveWorkbook();
|
|
122
|
+
* const fWorksheet = fWorkbook.getSheetByName('Sheet1');
|
|
123
|
+
* if (!fWorksheet) return;
|
|
124
|
+
* const builder = fWorksheet.charts.create();
|
|
125
|
+
* builder.clearTheme();
|
|
126
|
+
* ```
|
|
127
|
+
*/
|
|
128
|
+
clearTheme(): this;
|
|
129
|
+
/**
|
|
130
|
+
* Sets absolute series palette colors and returns this builder for chaining.
|
|
131
|
+
*
|
|
132
|
+
* The values are copied, persisted with the chart, and used unchanged in light and dark mode.
|
|
133
|
+
* A non-empty palette takes precedence over the selected theme's series colors without clearing
|
|
134
|
+
* the selected theme. Call `clearPalette()` to return series-color control to the theme.
|
|
135
|
+
* An empty array has the same effect as `clearPalette()`.
|
|
136
|
+
*
|
|
137
|
+
* @param colors Ordered CSS colors that override the selected theme's series colors.
|
|
138
|
+
* @returns This builder for chaining.
|
|
139
|
+
* @example
|
|
140
|
+
* ```ts
|
|
141
|
+
* const fWorkbook = univerAPI.getActiveWorkbook();
|
|
142
|
+
* const fWorksheet = fWorkbook.getSheetByName('Sheet1');
|
|
143
|
+
* if (!fWorksheet) return;
|
|
144
|
+
* const builder = fWorksheet.charts.create();
|
|
145
|
+
* builder.setPalette(['#1677ff', '#52c41a']);
|
|
146
|
+
* ```
|
|
147
|
+
*/
|
|
148
|
+
setPalette(colors: readonly string[]): this;
|
|
149
|
+
/**
|
|
150
|
+
* Clears the chart-owned palette and returns to the selected theme colors.
|
|
151
|
+
*
|
|
152
|
+
* @returns This builder for chaining.
|
|
153
|
+
* @example
|
|
154
|
+
* ```ts
|
|
155
|
+
* const fWorkbook = univerAPI.getActiveWorkbook();
|
|
156
|
+
* const fWorksheet = fWorkbook.getSheetByName('Sheet1');
|
|
157
|
+
* if (!fWorksheet) return;
|
|
158
|
+
* const builder = fWorksheet.charts.list()[0];
|
|
159
|
+
* builder.clearPalette().commit();
|
|
160
|
+
* ```
|
|
161
|
+
*/
|
|
162
|
+
clearPalette(): this;
|
|
163
|
+
/**
|
|
164
|
+
* Sets the appearance configuration and returns this builder for chaining.
|
|
165
|
+
*
|
|
166
|
+
* Supported by Sheet, Document, Slide, and Board chart builders. An explicit
|
|
167
|
+
* `'transparent'` background remains transparent, and border width `0` hides
|
|
168
|
+
* the persisted host border without removing selection or transformer chrome.
|
|
169
|
+
*
|
|
170
|
+
* This method executes synchronously.
|
|
171
|
+
*
|
|
172
|
+
* @param value The semantic value to record.
|
|
173
|
+
* @returns This builder for chaining.
|
|
174
|
+
* @example
|
|
175
|
+
* ```ts
|
|
176
|
+
* builder.setAppearance({
|
|
177
|
+
* background: { color: 'transparent' },
|
|
178
|
+
* border: { width: 0 },
|
|
179
|
+
* });
|
|
180
|
+
* ```
|
|
181
|
+
*/
|
|
182
|
+
setAppearance(value: IChartAppearanceSpec): this;
|
|
183
|
+
/**
|
|
184
|
+
* Clears the appearance configuration and returns this builder for chaining.
|
|
185
|
+
*
|
|
186
|
+
* This method executes synchronously.
|
|
187
|
+
*
|
|
188
|
+
* @param target The configuration field to clear or reset.
|
|
189
|
+
* @returns This builder for chaining.
|
|
190
|
+
* @example
|
|
191
|
+
* ```ts
|
|
192
|
+
* const worksheet = univerAPI.getActiveWorkbook().getActiveSheet();
|
|
193
|
+
* const builder = worksheet.charts.create();
|
|
194
|
+
* builder.clearAppearance(univerAPI.Enum.ChartAppearanceTarget.Background);
|
|
195
|
+
* ```
|
|
196
|
+
*/
|
|
197
|
+
clearAppearance(target?: ChartAppearanceTarget): this;
|
|
198
|
+
/**
|
|
199
|
+
* Sets the invalid value strategy configuration and returns this builder for chaining.
|
|
200
|
+
*
|
|
201
|
+
* This method executes synchronously.
|
|
202
|
+
*
|
|
203
|
+
* @param value The semantic value to record.
|
|
204
|
+
* @returns This builder for chaining.
|
|
205
|
+
* @example
|
|
206
|
+
* ```ts
|
|
207
|
+
* const worksheet = univerAPI.getActiveWorkbook().getActiveSheet();
|
|
208
|
+
* const builder = worksheet.charts.create();
|
|
209
|
+
* builder.setInvalidValueStrategy(univerAPI.Enum.InvalidValueType.Break);
|
|
210
|
+
* ```
|
|
211
|
+
*/
|
|
212
|
+
setInvalidValueStrategy(value: InvalidValueType): this;
|
|
213
|
+
/**
|
|
214
|
+
* Restores the invalid value strategy to `Break` and returns this builder for chaining.
|
|
215
|
+
*
|
|
216
|
+
* This method executes synchronously.
|
|
217
|
+
*
|
|
218
|
+
* @returns This builder for chaining.
|
|
219
|
+
* @example
|
|
220
|
+
* ```ts
|
|
221
|
+
* const worksheet = univerAPI.getActiveWorkbook().getActiveSheet();
|
|
222
|
+
* const builder = worksheet.charts.create();
|
|
223
|
+
* builder.resetInvalidValueStrategy();
|
|
224
|
+
* ```
|
|
225
|
+
*/
|
|
226
|
+
resetInvalidValueStrategy(): this;
|
|
227
|
+
/**
|
|
228
|
+
* Sets the category field configuration and returns this builder for chaining.
|
|
229
|
+
*
|
|
230
|
+
* This method executes synchronously.
|
|
231
|
+
*
|
|
232
|
+
* @param index The zero-based field or series index.
|
|
233
|
+
* @returns This builder for chaining.
|
|
234
|
+
* @example
|
|
235
|
+
* ```ts
|
|
236
|
+
* const worksheet = univerAPI.getActiveWorkbook().getActiveSheet();
|
|
237
|
+
* const builder = worksheet.charts.create();
|
|
238
|
+
* builder.setCategoryField(0);
|
|
239
|
+
* ```
|
|
240
|
+
*/
|
|
241
|
+
setCategoryField(index: number): this;
|
|
242
|
+
/**
|
|
243
|
+
* Clears the category field configuration and returns this builder for chaining.
|
|
244
|
+
*
|
|
245
|
+
* This method executes synchronously.
|
|
246
|
+
*
|
|
247
|
+
* @returns This builder for chaining.
|
|
248
|
+
* @example
|
|
249
|
+
* ```ts
|
|
250
|
+
* const worksheet = univerAPI.getActiveWorkbook().getActiveSheet();
|
|
251
|
+
* const builder = worksheet.charts.create();
|
|
252
|
+
* builder.clearCategoryField();
|
|
253
|
+
* ```
|
|
254
|
+
*/
|
|
255
|
+
clearCategoryField(): this;
|
|
256
|
+
/**
|
|
257
|
+
* Sets the value fields configuration and returns this builder for chaining.
|
|
258
|
+
*
|
|
259
|
+
* This method executes synchronously.
|
|
260
|
+
*
|
|
261
|
+
* @param indexes The zero-based field indexes.
|
|
262
|
+
* @returns This builder for chaining.
|
|
263
|
+
* @example
|
|
264
|
+
* ```ts
|
|
265
|
+
* const worksheet = univerAPI.getActiveWorkbook().getActiveSheet();
|
|
266
|
+
* const builder = worksheet.charts.create();
|
|
267
|
+
* builder.setValueFields([1, 2]);
|
|
268
|
+
* ```
|
|
269
|
+
*/
|
|
270
|
+
setValueFields(indexes: readonly number[]): this;
|
|
271
|
+
/**
|
|
272
|
+
* Clears the value fields configuration and returns this builder for chaining.
|
|
273
|
+
*
|
|
274
|
+
* This method executes synchronously.
|
|
275
|
+
*
|
|
276
|
+
* @returns This builder for chaining.
|
|
277
|
+
* @example
|
|
278
|
+
* ```ts
|
|
279
|
+
* const worksheet = univerAPI.getActiveWorkbook().getActiveSheet();
|
|
280
|
+
* const builder = worksheet.charts.create();
|
|
281
|
+
* builder.clearValueFields();
|
|
282
|
+
* ```
|
|
283
|
+
*/
|
|
284
|
+
clearValueFields(): this;
|
|
285
|
+
/**
|
|
286
|
+
* Sets the aggregation configuration and returns this builder for chaining.
|
|
287
|
+
*
|
|
288
|
+
* This method executes synchronously.
|
|
289
|
+
*
|
|
290
|
+
* @param value The semantic value to record.
|
|
291
|
+
* @returns This builder for chaining.
|
|
292
|
+
* @example
|
|
293
|
+
* ```ts
|
|
294
|
+
* const worksheet = univerAPI.getActiveWorkbook().getActiveSheet();
|
|
295
|
+
* const builder = worksheet.charts.create();
|
|
296
|
+
* builder.setAggregation({ aggregate: true, topN: 10 });
|
|
297
|
+
* ```
|
|
298
|
+
*/
|
|
299
|
+
setAggregation(value: IChartAggregationSpec): this;
|
|
300
|
+
/**
|
|
301
|
+
* Clears the aggregation configuration and returns this builder for chaining.
|
|
302
|
+
*
|
|
303
|
+
* This method executes synchronously.
|
|
304
|
+
*
|
|
305
|
+
* @param target The configuration field to clear or reset.
|
|
306
|
+
* @returns This builder for chaining.
|
|
307
|
+
* @example
|
|
308
|
+
* ```ts
|
|
309
|
+
* const worksheet = univerAPI.getActiveWorkbook().getActiveSheet();
|
|
310
|
+
* const builder = worksheet.charts.create();
|
|
311
|
+
* builder.clearAggregation(univerAPI.Enum.ChartAggregationTarget.TopN);
|
|
312
|
+
* ```
|
|
313
|
+
*/
|
|
314
|
+
clearAggregation(target?: ChartAggregationTarget): this;
|
|
315
|
+
/**
|
|
316
|
+
* Sets the chart type and returns a builder specialized for that type.
|
|
317
|
+
*
|
|
318
|
+
* This method executes synchronously.
|
|
319
|
+
*
|
|
320
|
+
* @param type The canonical chart type.
|
|
321
|
+
* @returns A new specialized builder that shares this builder's pending configuration.
|
|
322
|
+
* @example
|
|
323
|
+
* ```ts
|
|
324
|
+
* const worksheet = univerAPI.getActiveWorkbook().getActiveSheet();
|
|
325
|
+
* const builder = worksheet.charts.create();
|
|
326
|
+
* const column = builder.setType(univerAPI.Enum.ChartTypeString.Column);
|
|
327
|
+
* ```
|
|
328
|
+
*/
|
|
329
|
+
setType<T extends keyof IChartBuilderTypeMap>(type: T): IChartBuilderTypeMap[T];
|
|
330
|
+
protected _setType(type: keyof IChartBuilderTypeMap): void;
|
|
331
|
+
}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import type { IEchartTheme } from '@univerjs-pro/engine-chart';
|
|
2
|
+
export interface IChartBuilderHandle {
|
|
3
|
+
getId(): string;
|
|
4
|
+
}
|
|
5
|
+
export interface IChartBuilderHostTypes {
|
|
6
|
+
Initial: IChartBuilderHandle;
|
|
7
|
+
Any: IChartBuilderHandle;
|
|
8
|
+
}
|
|
9
|
+
export declare abstract class FChartsBase<TTypes extends IChartBuilderHostTypes> {
|
|
10
|
+
/**
|
|
11
|
+
* Creates a detached chart builder.
|
|
12
|
+
* @returns A detached builder that does not mutate the host until inserted.
|
|
13
|
+
* @example
|
|
14
|
+
* ```ts
|
|
15
|
+
* const charts = univerAPI.getActiveWorkbook().getActiveSheet().charts;
|
|
16
|
+
* const chart = charts.create();
|
|
17
|
+
* ```
|
|
18
|
+
*/
|
|
19
|
+
abstract create(): TTypes['Initial'];
|
|
20
|
+
/**
|
|
21
|
+
* Inserts a detached chart builder into the current host.
|
|
22
|
+
* @param builder The detached builder returned by this collection.
|
|
23
|
+
* @returns The inserted builder, preserving its concrete chart and host APIs.
|
|
24
|
+
* @example
|
|
25
|
+
* ```ts
|
|
26
|
+
* const charts = univerAPI.getActiveWorkbook().getActiveSheet().charts;
|
|
27
|
+
* const chart = charts.create().setSource('A1:B6');
|
|
28
|
+
* await charts.insert(chart);
|
|
29
|
+
* ```
|
|
30
|
+
*/
|
|
31
|
+
abstract insert<T extends TTypes['Any']>(builder: T): Promise<T>;
|
|
32
|
+
/**
|
|
33
|
+
* Returns a chart builder by chart ID.
|
|
34
|
+
* @param chartId The host-owned chart ID.
|
|
35
|
+
* @returns The chart builder, or `null` when the ID is not in this host.
|
|
36
|
+
* @example
|
|
37
|
+
* ```ts
|
|
38
|
+
* const chart = univerAPI.getActiveWorkbook().getActiveSheet().charts.get('chart-1');
|
|
39
|
+
* ```
|
|
40
|
+
*/
|
|
41
|
+
abstract get(chartId: string): TTypes['Any'] | null;
|
|
42
|
+
/**
|
|
43
|
+
* Returns all chart builders in the current host.
|
|
44
|
+
* @returns The chart builders currently owned by this host.
|
|
45
|
+
* @example
|
|
46
|
+
* ```ts
|
|
47
|
+
* const charts = univerAPI.getActiveWorkbook().getActiveSheet().charts.list();
|
|
48
|
+
* ```
|
|
49
|
+
*/
|
|
50
|
+
abstract list(): TTypes['Any'][];
|
|
51
|
+
/**
|
|
52
|
+
* Removes a chart by builder or chart ID.
|
|
53
|
+
* @param builderOrId A chart builder from this host or its chart ID.
|
|
54
|
+
* @returns Whether the host command removed the chart.
|
|
55
|
+
* @example
|
|
56
|
+
* ```ts
|
|
57
|
+
* const charts = univerAPI.getActiveWorkbook().getActiveSheet().charts;
|
|
58
|
+
* await charts.remove('chart-1');
|
|
59
|
+
* ```
|
|
60
|
+
*/
|
|
61
|
+
abstract remove(builderOrId: TTypes['Any'] | string): Promise<boolean>;
|
|
62
|
+
/**
|
|
63
|
+
* Registers a chart theme in the shared Univer runtime registry.
|
|
64
|
+
* @param name The stable theme name used by `setTheme`.
|
|
65
|
+
* @param theme The ECharts theme definition.
|
|
66
|
+
* @example
|
|
67
|
+
* ```ts
|
|
68
|
+
* univerAPI.getActiveWorkbook().getActiveSheet().charts.registerTheme('brand', {
|
|
69
|
+
* color: ['#274060', '#1b998b'],
|
|
70
|
+
* });
|
|
71
|
+
* ```
|
|
72
|
+
*/
|
|
73
|
+
abstract registerTheme(name: string, theme: IEchartTheme): void;
|
|
74
|
+
}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { AreaLineStyle, ChartAggregationTarget, ChartAllSeriesStyleTarget, ChartAppearanceTarget, ChartAxisDimension, ChartAxisName, ChartAxisPointerTarget, ChartAxisTarget, ChartAxisTickPosition, ChartMarkLineLabelPosition, ChartSemanticAxis, ChartSeriesAxis, ChartSeriesClearTarget, ChartSeriesTypeString, ChartTrendlineType, ChartTypeString, ChartVisualMapType, ChartWaterfallPointRole, ChartWaterfallStyleTarget, ChartWordCloudShapeSource, InvalidValueType, LabelAlignEnum, LegendPositionEnum, LinePointShape, PieLabelPosition, RadarShape, RelationChartLayoutEnum, SelectModeEnum, SeriesLabelPosition, TitlePositionEnum, WaterfallStackTypeEnum, WordCloudShapeEnum } from '@univerjs-pro/engine-chart';
|
|
2
|
+
import { FEnum } from '@univerjs/core/facade';
|
|
3
|
+
/** @ignore */
|
|
4
|
+
export interface IFChartEnumMixin {
|
|
5
|
+
ChartAggregationTarget: typeof ChartAggregationTarget;
|
|
6
|
+
ChartAxisDimension: typeof ChartAxisDimension;
|
|
7
|
+
ChartTrendlineType: typeof ChartTrendlineType;
|
|
8
|
+
ChartAppearanceTarget: typeof ChartAppearanceTarget;
|
|
9
|
+
ChartAxisName: typeof ChartAxisName;
|
|
10
|
+
ChartAxisPointerTarget: typeof ChartAxisPointerTarget;
|
|
11
|
+
ChartAxisTarget: typeof ChartAxisTarget;
|
|
12
|
+
ChartAxisTickPosition: typeof ChartAxisTickPosition;
|
|
13
|
+
ChartMarkLineLabelPosition: typeof ChartMarkLineLabelPosition;
|
|
14
|
+
ChartSemanticAxis: typeof ChartSemanticAxis;
|
|
15
|
+
ChartSeriesAxis: typeof ChartSeriesAxis;
|
|
16
|
+
ChartSeriesClearTarget: typeof ChartSeriesClearTarget;
|
|
17
|
+
ChartAllSeriesStyleTarget: typeof ChartAllSeriesStyleTarget;
|
|
18
|
+
ChartSeriesTypeString: typeof ChartSeriesTypeString;
|
|
19
|
+
ChartTypeString: typeof ChartTypeString;
|
|
20
|
+
ChartVisualMapType: typeof ChartVisualMapType;
|
|
21
|
+
ChartWaterfallStyleTarget: typeof ChartWaterfallStyleTarget;
|
|
22
|
+
ChartWaterfallPointRole: typeof ChartWaterfallPointRole;
|
|
23
|
+
ChartWordCloudShapeSource: typeof ChartWordCloudShapeSource;
|
|
24
|
+
AreaLineStyle: typeof AreaLineStyle;
|
|
25
|
+
InvalidValueType: typeof InvalidValueType;
|
|
26
|
+
LabelAlignEnum: typeof LabelAlignEnum;
|
|
27
|
+
LegendPositionEnum: typeof LegendPositionEnum;
|
|
28
|
+
LinePointShape: typeof LinePointShape;
|
|
29
|
+
PieLabelPosition: typeof PieLabelPosition;
|
|
30
|
+
RadarShape: typeof RadarShape;
|
|
31
|
+
RelationChartLayoutEnum: typeof RelationChartLayoutEnum;
|
|
32
|
+
SelectModeEnum: typeof SelectModeEnum;
|
|
33
|
+
SeriesLabelPosition: typeof SeriesLabelPosition;
|
|
34
|
+
TitlePositionEnum: typeof TitlePositionEnum;
|
|
35
|
+
WaterfallStackTypeEnum: typeof WaterfallStackTypeEnum;
|
|
36
|
+
WordCloudShapeEnum: typeof WordCloudShapeEnum;
|
|
37
|
+
}
|
|
38
|
+
export declare class FChartEnumMixin extends FEnum implements IFChartEnumMixin {
|
|
39
|
+
get ChartAggregationTarget(): typeof ChartAggregationTarget;
|
|
40
|
+
get ChartAxisDimension(): typeof ChartAxisDimension;
|
|
41
|
+
get ChartTrendlineType(): typeof ChartTrendlineType;
|
|
42
|
+
get ChartAppearanceTarget(): typeof ChartAppearanceTarget;
|
|
43
|
+
get ChartAxisName(): typeof ChartAxisName;
|
|
44
|
+
get ChartAxisPointerTarget(): typeof ChartAxisPointerTarget;
|
|
45
|
+
get ChartAxisTarget(): typeof ChartAxisTarget;
|
|
46
|
+
get ChartAxisTickPosition(): typeof ChartAxisTickPosition;
|
|
47
|
+
get ChartMarkLineLabelPosition(): typeof ChartMarkLineLabelPosition;
|
|
48
|
+
get ChartSemanticAxis(): typeof ChartSemanticAxis;
|
|
49
|
+
get ChartSeriesAxis(): typeof ChartSeriesAxis;
|
|
50
|
+
get ChartSeriesClearTarget(): typeof ChartSeriesClearTarget;
|
|
51
|
+
get ChartAllSeriesStyleTarget(): typeof ChartAllSeriesStyleTarget;
|
|
52
|
+
get ChartSeriesTypeString(): typeof ChartSeriesTypeString;
|
|
53
|
+
get ChartTypeString(): typeof ChartTypeString;
|
|
54
|
+
get ChartVisualMapType(): typeof ChartVisualMapType;
|
|
55
|
+
get ChartWaterfallStyleTarget(): typeof ChartWaterfallStyleTarget;
|
|
56
|
+
get ChartWaterfallPointRole(): typeof ChartWaterfallPointRole;
|
|
57
|
+
get ChartWordCloudShapeSource(): typeof ChartWordCloudShapeSource;
|
|
58
|
+
get AreaLineStyle(): typeof AreaLineStyle;
|
|
59
|
+
get InvalidValueType(): typeof InvalidValueType;
|
|
60
|
+
get LabelAlignEnum(): typeof LabelAlignEnum;
|
|
61
|
+
get LegendPositionEnum(): typeof LegendPositionEnum;
|
|
62
|
+
get LinePointShape(): typeof LinePointShape;
|
|
63
|
+
get PieLabelPosition(): typeof PieLabelPosition;
|
|
64
|
+
get RadarShape(): typeof RadarShape;
|
|
65
|
+
get RelationChartLayoutEnum(): typeof RelationChartLayoutEnum;
|
|
66
|
+
get SelectModeEnum(): typeof SelectModeEnum;
|
|
67
|
+
get SeriesLabelPosition(): typeof SeriesLabelPosition;
|
|
68
|
+
get TitlePositionEnum(): typeof TitlePositionEnum;
|
|
69
|
+
get WaterfallStackTypeEnum(): typeof WaterfallStackTypeEnum;
|
|
70
|
+
get WordCloudShapeEnum(): typeof WordCloudShapeEnum;
|
|
71
|
+
}
|
|
72
|
+
declare module '@univerjs/core/facade' {
|
|
73
|
+
interface FEnum extends IFChartEnumMixin {
|
|
74
|
+
}
|
|
75
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import './register-builders';
|
|
2
|
+
import './f-enum';
|
|
3
|
+
export * from './builders';
|
|
4
|
+
export { getChartBuilderConstructor } from './chart-builder-registry';
|
|
5
|
+
export type { IChartBuilderTypeMap } from './chart-builder-type-map';
|
|
6
|
+
export type { HostAnyChartBuilder, HostChartBuilderOf, HostComposedChartBuilder, IHostChartBuilderTypes } from './chart-host-builder-types';
|
|
7
|
+
export { FAxisChartBuilder } from './f-axis-chart-builder';
|
|
8
|
+
export { FCartesianChartBuilder } from './f-cartesian-chart-builder';
|
|
9
|
+
export { FChartBase } from './f-chart-base';
|
|
10
|
+
export { FChartBuilderBase } from './f-chart-builder-base';
|
|
11
|
+
export { FChartsBase } from './f-charts-base';
|
|
12
|
+
export type { IChartBuilderHostTypes } from './f-charts-base';
|
|
13
|
+
export { getChartBuilderPendingConfig } from './internal/chart-builder-facade-context';
|
|
14
|
+
export { CHART_FACADE_RANDOM_ID_LENGTH } from './internal/constants';
|
|
15
|
+
export { HostBuilderComposer } from './internal/host-builder-composer';
|
|
16
|
+
export type { EngineChartBuilderConstructor } from './internal/host-builder-composer';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { ChartBuilder } from '@univerjs-pro/engine-chart';
|
|
2
|
+
export type ChartFacadeBuilderConstructor<TFacade = unknown> = new (context: IChartBuilderFacadeContext) => TFacade;
|
|
3
|
+
/** Facade-owned wrapping context for one shared chart builder instance. */
|
|
4
|
+
export interface IChartBuilderFacadeContext<TBuilder extends ChartBuilder = ChartBuilder> {
|
|
5
|
+
readonly builder: TBuilder;
|
|
6
|
+
wrap<TFacade>(Constructor: ChartFacadeBuilderConstructor<TFacade>): TFacade;
|
|
7
|
+
}
|
|
8
|
+
export declare const ChartBuilderFacadeContextAccess: unique symbol;
|
|
9
|
+
export interface IChartBuilderFacadeContextAccess {
|
|
10
|
+
readonly [ChartBuilderFacadeContextAccess]: IChartBuilderFacadeContext;
|
|
11
|
+
}
|
|
12
|
+
export declare function wrapChartBuilder<TFacade>(builder: ChartBuilder, Constructor: ChartFacadeBuilderConstructor<TFacade>): TFacade;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { ChartBuilder } from '@univerjs-pro/engine-chart';
|
|
2
|
+
import type { HostComposedChartBuilder } from '../chart-host-builder-types';
|
|
3
|
+
import type { FChartBuilderBase } from '../f-chart-builder-base';
|
|
4
|
+
import type { IChartBuilderFacadeContext } from './chart-builder-facade-context';
|
|
5
|
+
export type EngineChartBuilderConstructor<TBuilder extends FChartBuilderBase = FChartBuilderBase> = new (context: IChartBuilderFacadeContext) => TBuilder;
|
|
6
|
+
export declare class HostBuilderComposer<THostMethods extends object> {
|
|
7
|
+
private readonly _compose;
|
|
8
|
+
private readonly _cache;
|
|
9
|
+
constructor(_compose: (Constructor: EngineChartBuilderConstructor) => EngineChartBuilderConstructor<FChartBuilderBase & THostMethods>);
|
|
10
|
+
compose<TBuilder extends FChartBuilderBase>(Constructor: EngineChartBuilderConstructor<TBuilder>): EngineChartBuilderConstructor<TBuilder & THostMethods>;
|
|
11
|
+
/**
|
|
12
|
+
* Creates a host-composed builder whose Facade context preserves host methods
|
|
13
|
+
* when `setType()` selects another concrete builder class.
|
|
14
|
+
*/
|
|
15
|
+
create<TBuilder extends FChartBuilderBase>(builder: ChartBuilder, Constructor: EngineChartBuilderConstructor<TBuilder>): HostComposedChartBuilder<TBuilder, THostMethods>;
|
|
16
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/lib/types/index.d.ts
CHANGED
|
@@ -1,32 +1,91 @@
|
|
|
1
|
-
export {
|
|
2
|
-
export {
|
|
3
|
-
export {
|
|
1
|
+
export type { ChartDescription, ChartLegendSpec, ChartPublicSeriesSelector, ChartSeriesSelector, ChartSeriesTrendlineSelector, ChartSubtitleSpec, ChartTitleSpec, IChartAggregationSpec, IChartAppearanceSpec, IChartAreaSpec, IChartAxesSpec, IChartAxisBindingDescription, IChartAxisLabelSpec, IChartAxisPointerSpec, IChartAxisSpec, IChartBarSpec, IChartBubbleMappingSpec, IChartDescription, IChartFontSpec, IChartFunnelSpec, IChartHeatmapLabelSpec, IChartHeatmapSpec, IChartLegendOptions, IChartMappingSpec, IChartMarkLineLabelSpec, IChartMarkLineSpec, IChartParetoBarLabelStyleSpec, IChartParetoBarStyleSpec, IChartParetoBorderStyleSpec, IChartParetoLineLabelStyleSpec, IChartParetoLineStyleSpec, IChartParetoPointStyleSpec, IChartParetoSpec, IChartPieLabelSpec, IChartPieSpec, IChartRadarSpec, IChartRelationForceSpec, IChartRelationSpec, IChartScatterMappingSpec, IChartSeriesBorderSpec, IChartSeriesDescription, IChartSeriesLabelSpec, IChartSeriesPatch, IChartSeriesPointSpec, IChartSeriesStyleSpec, IChartSubtitleOptions, IChartTitleOptions, IChartTrendlineSpec, IChartWaterfallConnectorStyleSpec, IChartWaterfallPointRoleSpec, IChartWaterfallSpec, IChartWordCloudDescription, IChartWordCloudSpec, IInlineChartBuilderAdapter, IInlineChartHostPatch, IResolvedChartData, } from './chart-builder';
|
|
2
|
+
export { AREA_CHART_TYPES, AXIS_CHART_TYPES, CARTESIAN_CHART_TYPES, ChartAggregationTarget, ChartAllSeriesStyleTarget, ChartAppearanceTarget, ChartAxisName, ChartAxisPointerTarget, ChartAxisTarget, ChartAxisTickPosition, ChartSeriesAxis, ChartSeriesClearTarget, ChartSeriesTypeString, ChartTypeString, ChartVisualMapType, ChartWaterfallStyleTarget, ChartWordCloudShapeSource, DEFAULT_CHART_TYPE, } from './chart-builder';
|
|
3
|
+
export { ChartBuilder, chartTypeToBits, clearAggregation, clearAllSeriesStyle, clearAppearance, clearAreaLineStyle, clearAxisPointer, clearAxisTitle, clearBar, clearBubbleMapping, clearCategoryField, clearCellLabel, clearCumulativeLineStyle, clearDoughnutHole, clearLegend, clearLineStyle, clearMarkLines, clearPalette, clearMaskImage, clearParetoBarStyle, clearPieLabel, clearRelationForce, clearRightYAxis, clearScatterMapping, clearSeries, clearSliceBorderColor, clearSubtitle, clearTheme, clearTitle, clearTrendlines, clearValueFields, clearValueRange, clearValueSuffix, clearValueUnit, clearWaterfallConnector, clearWaterfallStyle, clearXAxis, clearYAxis, describeChartModel, DetachedChartBuilderAdapter, InlineChartBuilder, removeTrendline, resetCircularLabelRotation, resetCombinationSeriesAxis, resetCombinationSeriesType, resetDecimalPlaces, resetEmphasisEnabled, resetExplosion, resetFunnelGap, resetHalfPie, resetIncludeZeroValues, resetInvalidValueStrategy, resetLabelLineVisible, resetPaddingAngleEnabled, resetRadarFill, resetRadarShape, resetRelationLayout, resetRelationNodeShape, resetRosePie, resetUseAbsoluteValue, resetUseDateAxis, resetUseSubtotal, resetUseValueAsSymbolSize, resetValueScale, resetVisualMapType, resetWaterfallStackType, resetWordCloudRepeat, resetWordCloudShape, resolveChartDescriptionMetadata, resolveChartModelData, resolveInlineChartDataSet, setAggregation, setAllSeriesStyle, setAppearance, setAreaLineStyle, setAxisPointer, setAxisTitle, setBar, setBubbleMapping, setCategoryField, setCellLabel, setCircularLabelRotation, setCombinationSeriesAxis, setCombinationSeriesType, setCumulativeLineStyle, setDecimalPlaces, setDoughnutHole, setEmphasisEnabled, setExplosion, setFunnelGap, setHalfPie, setIncludeZeroValues, setInvalidValueStrategy, setLabelLineVisible, setLegend, setLineStyle, setMarkLines, setMaskImage, setPaddingAngleEnabled, setPalette, setParetoBarStyle, setPieLabel, setRadarFill, setRadarShape, setRelationForce, setRelationLayout, setRelationNodeShape, setRightYAxis, setRosePie, setScatterMapping, setSeries, setSliceBorderColor, setSubtitle, setTheme, setTitle, setTrendline, setUseAbsoluteValue, setUseDateAxis, setUseSubtotal, setUseValueAsSymbolSize, setValueFields, setValueRange, setValueScale, setValueSuffix, setValueUnit, setVisualMapType, setWaterfallConnector, setWaterfallPointRoles, setWaterfallStackType, setWaterfallStyle, setWordCloudRepeat, setWordCloudShape, setXAxis, setYAxis, toChartModelConfig, toCompleteChartModelConfig, } from './chart-builder';
|
|
4
|
+
export type { ChartPendingConfig, ChartTrendlineSelector, ChartTrendlineValue, IChartBuilderAdapter, IChartCreateConfig, } from './chart-builder';
|
|
5
|
+
export { AreaLineStyle, BarShape, AxisAlignEnum, AxisValueType, CategoryType, ChartAttributeBits, ChartAxisDimension, ChartBorderDashType, ChartMarkLineLabelPosition, ChartSemanticAxis, ChartSourceDataTypeEnum, ChartTrendlineType, ChartTypeBits, ChartWaterfallPointRole, DataOrientation, InvalidValueType, IRuntimeAxisPosition, IRuntimeAxisPriority, LabelAlignEnum, LabelContentType, LegendPositionEnum, LinePointShape, ParetoSeriesIndex, ParetoSeriesPart, PieLabelPosition, RadarShape, RelationChartLayoutEnum, SelectModeEnum, SeriesLabelPosition, StackType, TextAlign, TextVerticalAlign, TitlePositionEnum, WaterfallSeriesTypeEnum, WaterfallStackTypeEnum, WordCloudShapeEnum, } from './enum';
|
|
6
|
+
export { buildChartData, RelationColumnIndex } from './models/chart-data-operators/build-chart-data';
|
|
7
|
+
export { CartesianPointRoleIndex, CartesianPointValueIndex } from './models/chart-data-operators/cartesian-point-data';
|
|
8
|
+
export { defaultChartContextOperators, findCategoryIndexes, findCategoryOperator, findHeaderOperator, findSeriesOperator, generateChartModelContextByOperators, pieSeriesFilterOperator, } from './models/chart-data-operators/operators';
|
|
9
|
+
export { CHART_HOST_DEFAULT_BORDER_COLOR, CHART_HOST_DEFAULT_BORDER_RADIUS, CHART_HOST_DEFAULT_BORDER_WIDTH, composeChartHostFrameImage, getChartHostFrameContentRect, resolveChartHostFrameBorder, resolveChartHostFrameStyle, resolveDefaultChartHostFrameStyle, shouldComposeChartHostFrame, } from './models/chart-host-style';
|
|
10
|
+
export type { IResolveChartHostFrameStyleInput, IResolveDefaultChartHostFrameStyleInput, } from './models/chart-host-style';
|
|
4
11
|
export type { IChartLocaleTexts } from './models/chart-locale-texts';
|
|
5
12
|
export { getDefaultChartLocaleTexts, replaceLocaleParams } from './models/chart-locale-texts';
|
|
6
|
-
export { ChartModel } from './models/chart-model';
|
|
7
|
-
export {
|
|
8
|
-
export {
|
|
9
|
-
export {
|
|
13
|
+
export { CHART_DEBOUNCE_TIME, ChartModel, } from './models/chart-model';
|
|
14
|
+
export { resolveChartRenderModelImageExportInput } from './models/chart-render-input-resolver';
|
|
15
|
+
export type { IChartRenderInputRuntime, IResolveChartRenderModelImageExportInputParams, } from './models/chart-render-input-resolver';
|
|
16
|
+
export { ChartRenderModelManagerService, IChartRenderModelManagerService, registerChartRenderModelManagerService, } from './models/chart-render-model-manager.service';
|
|
17
|
+
export { serializeChartResource } from './models/chart-resource-serializer';
|
|
18
|
+
export { resolveChartRuntimeStyle, resolveChartStyleBackgroundColor, } from './models/chart-runtime-style';
|
|
19
|
+
export { ChartThemeService, registerChartThemeService, } from './models/chart-theme.service';
|
|
10
20
|
export { getThemeAxesByType } from './models/constants/build-in-theme';
|
|
11
21
|
export { themeDefault, UniverTheme1, UniverTheme2, UniverTheme3, UniverTheme4, UniverTheme5, UniverTheme6, UniverThemeGradient1, UniverThemeGradient2, UniverThemeGradient3, UniverThemeGradient4, UniverThemeGradient5, UniverThemeGradient6, } from './models/constants/build-in-theme';
|
|
12
22
|
export type { IEchartTheme } from './models/constants/build-in-theme';
|
|
13
23
|
export { getThemeProps } from './models/constants/build-in-theme';
|
|
14
24
|
export { defaultChartHeight, defaultChartWidth, EChartRenderEngineName } from './models/constants/default';
|
|
15
25
|
export { defaultChartConfig, RTLChartStyle, themeColors } from './models/constants/default-chart-style';
|
|
16
|
-
export { EChartRenderModel } from './models/echart-render-model';
|
|
26
|
+
export { EChartRenderEngine, EChartRenderModel } from './models/echart-render-model';
|
|
17
27
|
export type { IEChartRenderModelOptions } from './models/echart-render-model';
|
|
18
28
|
export { echartToChartModelInit, isChartModelInit } from './models/echart-to-chart-model-init';
|
|
19
29
|
export { chartImageSourceToDataUrl, ImageChartHost } from './models/image-chart-host';
|
|
20
30
|
export type { IChartModelInitParams } from './models/mode-converter/mode-converter';
|
|
21
|
-
export { convertModelFromInitData, convertModelToSpec,
|
|
31
|
+
export { convertModelFromInitData, convertModelToSpec, } from './models/mode-converter/mode-converter';
|
|
22
32
|
export { OffscreenChartHost } from './models/offscreen-chart-host';
|
|
23
|
-
export { registerWordCloudChartMakImageService, WordCloudMuskImageService } from './models/word-cloud-musk-image.service';
|
|
33
|
+
export { registerWordCloudChartMakImageService, WordCloudMuskImageService, } from './models/word-cloud-musk-image.service';
|
|
34
|
+
export { toChartDataItem } from './source/chart-data-item';
|
|
24
35
|
export { ChartDataSource } from './source/chart-source';
|
|
25
36
|
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';
|
|
37
|
+
export { ChartHostRenderMode, ChartImageSourceType } from './types';
|
|
38
|
+
export type { ChartDataSourceValue, ChartDataSourceValues, ChartDirection, ChartElementEventHandler, ChartElementEventType, ChartElementKind, ChartImageSource, ChartStyle, DeepPartial, DimensionDefinitionLoose, IAllSeriesStyle, IAxisOptions, IBarStyle, 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';
|
|
39
|
+
export { chartBitsUtils, chartTypeCanUseTrendLine, mergeChartConfig, } from './util';
|
|
30
40
|
export * from './utils/echarts';
|
|
31
41
|
export { WordCloudResourceConfig } from './word-cloud-resource/word-cloud-resource-config';
|
|
32
|
-
export
|
|
42
|
+
export { WORD_CLOUD_DEFAULT_OPTION, WORD_CLOUD_SERIES_TYPE } from './wordcloud-chart/adapters/echarts/echarts-options';
|
|
43
|
+
export { registerWordCloudChart } from './wordcloud-chart/adapters/echarts/install';
|
|
44
|
+
export { layoutWordCloudChart } from './wordcloud-chart/canvas';
|
|
45
|
+
export { resolveLayoutOptions } from './wordcloud-chart/canvas';
|
|
46
|
+
export * from './wordcloud-chart/core/layout/font-scale';
|
|
47
|
+
export { createBuiltinMaskGrid } from './wordcloud-chart/core/shape/built-in-shapes';
|
|
48
|
+
export { createMaskGridFromShape } from './wordcloud-chart/core/shape/built-in-shapes';
|
|
49
|
+
export { createTextMaskGrid } from './wordcloud-chart/core/shape/built-in-shapes';
|
|
50
|
+
export { normalizeMaskGrid } from './wordcloud-chart/core/shape/built-in-shapes';
|
|
51
|
+
export { segmentMaskGrid } from './wordcloud-chart/core/shape/built-in-shapes';
|
|
52
|
+
export { encodeWordCloudWords } from './wordcloud-chart/core/text/formatter';
|
|
53
|
+
export { normalizeWordCloudData } from './wordcloud-chart/core/text/normalize';
|
|
54
|
+
export { DEFAULT_WORD_CLOUD_CHART_SPEC } from './wordcloud-chart/defaults';
|
|
55
|
+
export { resolveWordCloudSpec } from './wordcloud-chart/defaults';
|
|
56
|
+
export type { INormalizedWordCloudDatum } from './wordcloud-chart/types';
|
|
57
|
+
export type { IResolvedWordCloudSpec } from './wordcloud-chart/types';
|
|
58
|
+
export type { IWordCloudBounds } from './wordcloud-chart/types';
|
|
59
|
+
export type { IWordCloudChartSpec } from './wordcloud-chart/types';
|
|
60
|
+
export type { IWordCloudDataSource } from './wordcloud-chart/types';
|
|
61
|
+
export type { IWordCloudEChartsMaskSource } from './wordcloud-chart/types';
|
|
62
|
+
export type { IWordCloudEChartsSeriesDataItem } from './wordcloud-chart/types';
|
|
63
|
+
export type { IWordCloudEChartsSeriesOption } from './wordcloud-chart/types';
|
|
64
|
+
export type { IWordCloudEncodedWord } from './wordcloud-chart/types';
|
|
65
|
+
export type { IWordCloudEncoding } from './wordcloud-chart/types';
|
|
66
|
+
export type { IWordCloudFieldMapping } from './wordcloud-chart/types';
|
|
67
|
+
export type { IWordCloudLayoutMask } from './wordcloud-chart/types';
|
|
68
|
+
export type { IWordCloudLayoutOptions } from './wordcloud-chart/types';
|
|
69
|
+
export type { IWordCloudLayoutResult } from './wordcloud-chart/types';
|
|
70
|
+
export type { IWordCloudMaskGrid } from './wordcloud-chart/types';
|
|
71
|
+
export type { IWordCloudMaskShapeSpec } from './wordcloud-chart/types';
|
|
72
|
+
export type { IWordCloudPlacedWord } from './wordcloud-chart/types';
|
|
73
|
+
export type { IWordCloudProtocolSpec } from './wordcloud-chart/types';
|
|
74
|
+
export type { IWordCloudSegmentationRegion } from './wordcloud-chart/types';
|
|
75
|
+
export type { IWordCloudSegmentationResult } from './wordcloud-chart/types';
|
|
76
|
+
export type { IWordCloudSeriesDataItem } from './wordcloud-chart/types';
|
|
77
|
+
export type { IWordCloudSeriesOption } from './wordcloud-chart/types';
|
|
78
|
+
export type { IWordCloudSpecBase } from './wordcloud-chart/types';
|
|
79
|
+
export type { IWordCloudTextMarkAttrs } from './wordcloud-chart/types';
|
|
80
|
+
export type { IWordCloudTextMarkSpec } from './wordcloud-chart/types';
|
|
81
|
+
export type { IWordCloudTextMeasurer } from './wordcloud-chart/types';
|
|
82
|
+
export type { IWordCloudTextSprite } from './wordcloud-chart/types';
|
|
83
|
+
export type { WordCloudFontSizeRange } from './wordcloud-chart/types';
|
|
84
|
+
export type { WordCloudShape } from './wordcloud-chart/types';
|
|
85
|
+
export { DEFAULT_WORD_CLOUD_SHAPE } from './wordcloud-chart/types';
|
|
86
|
+
export { normalizeWordCloudShape } from './wordcloud-chart/types';
|
|
87
|
+
export { SUPPORTED_WORD_CLOUD_SHAPES } from './wordcloud-chart/types';
|
|
88
|
+
export { DEFAULT_WORD_CLOUD_RENDER_CONFIG } from './wordcloud-chart/word-cloud-render-config';
|
|
89
|
+
export { resolveWordCloudRenderConfig } from './wordcloud-chart/word-cloud-render-config';
|
|
90
|
+
export type { IResolvedWordCloudRenderConfig } from './wordcloud-chart/word-cloud-render-config';
|
|
91
|
+
export type { IWordCloudRenderConfig } from './wordcloud-chart/word-cloud-render-config';
|