@univerjs-pro/engine-chart 1.0.0-rc.0 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/facade.js +1 -1
- package/lib/cjs/index.js +1 -1
- package/lib/cjs/locale/ar-SA.js +1 -1
- package/lib/cjs/locale/ca-ES.js +1 -1
- package/lib/cjs/locale/de-DE.js +1 -1
- package/lib/cjs/locale/en-US.js +1 -1
- package/lib/cjs/locale/es-ES.js +1 -1
- package/lib/cjs/locale/fa-IR.js +1 -1
- package/lib/cjs/locale/fr-FR.js +1 -1
- package/lib/cjs/locale/id-ID.js +1 -1
- package/lib/cjs/locale/it-IT.js +1 -1
- package/lib/cjs/locale/ja-JP.js +1 -1
- package/lib/cjs/locale/ko-KR.js +1 -1
- package/lib/cjs/locale/pl-PL.js +1 -1
- package/lib/cjs/locale/pt-BR.js +1 -1
- package/lib/cjs/locale/ru-RU.js +1 -1
- package/lib/cjs/locale/sk-SK.js +1 -1
- package/lib/cjs/locale/vi-VN.js +1 -1
- package/lib/cjs/locale/zh-CN.js +1 -1
- package/lib/cjs/locale/zh-HK.js +1 -1
- package/lib/cjs/locale/zh-TW.js +1 -1
- package/lib/es/facade.js +1 -1
- package/lib/es/index.js +1 -1
- package/lib/es/locale/ar-SA.js +1 -1
- package/lib/es/locale/ca-ES.js +1 -1
- package/lib/es/locale/de-DE.js +1 -1
- package/lib/es/locale/en-US.js +1 -1
- package/lib/es/locale/es-ES.js +1 -1
- package/lib/es/locale/fa-IR.js +1 -1
- package/lib/es/locale/fr-FR.js +1 -1
- package/lib/es/locale/id-ID.js +1 -1
- package/lib/es/locale/it-IT.js +1 -1
- package/lib/es/locale/ja-JP.js +1 -1
- package/lib/es/locale/ko-KR.js +1 -1
- package/lib/es/locale/pl-PL.js +1 -1
- package/lib/es/locale/pt-BR.js +1 -1
- package/lib/es/locale/ru-RU.js +1 -1
- package/lib/es/locale/sk-SK.js +1 -1
- package/lib/es/locale/vi-VN.js +1 -1
- package/lib/es/locale/zh-CN.js +1 -1
- package/lib/es/locale/zh-HK.js +1 -1
- package/lib/es/locale/zh-TW.js +1 -1
- package/lib/facade.js +1 -1
- package/lib/index.js +1 -1
- package/lib/locale/ar-SA.js +1 -1
- package/lib/locale/ca-ES.js +1 -1
- package/lib/locale/de-DE.js +1 -1
- package/lib/locale/en-US.js +1 -1
- package/lib/locale/es-ES.js +1 -1
- package/lib/locale/fa-IR.js +1 -1
- package/lib/locale/fr-FR.js +1 -1
- package/lib/locale/id-ID.js +1 -1
- package/lib/locale/it-IT.js +1 -1
- package/lib/locale/ja-JP.js +1 -1
- package/lib/locale/ko-KR.js +1 -1
- package/lib/locale/pl-PL.js +1 -1
- package/lib/locale/pt-BR.js +1 -1
- package/lib/locale/ru-RU.js +1 -1
- package/lib/locale/sk-SK.js +1 -1
- package/lib/locale/vi-VN.js +1 -1
- package/lib/locale/zh-CN.js +1 -1
- package/lib/locale/zh-HK.js +1 -1
- package/lib/locale/zh-TW.js +1 -1
- package/lib/types/chart-builder/chart-types.d.ts +10 -1
- package/lib/types/chart-builder/configuration/chart-config-group.d.ts +1 -0
- package/lib/types/chart-builder/conversion/chart-context-patch.d.ts +5 -2
- package/lib/types/chart-builder/conversion/chart-model-fields.d.ts +5 -0
- package/lib/types/chart-builder/conversion/describe-chart-model.d.ts +1030 -16
- package/lib/types/chart-text-measure-canvas.d.ts +1 -0
- package/lib/types/enum.d.ts +11 -1
- package/lib/types/facade/builders/f-scatter-chart-builder.d.ts +24 -0
- package/lib/types/facade/f-chart-builder-base.d.ts +22 -0
- package/lib/types/facade/f-chart.d.ts +22 -0
- package/lib/types/index.d.ts +3 -3
- package/lib/types/model/chart-data-operators/build-chart-data.d.ts +4 -0
- package/lib/types/model/chart-data-operators/index.d.ts +2 -0
- package/lib/types/model/chart-data-operators/operators.d.ts +25 -0
- package/lib/types/model/chart-locale-texts.d.ts +22 -0
- package/lib/types/model/chart-model.d.ts +3424 -0
- package/lib/types/model/chart-theme.service.d.ts +40 -0
- package/lib/types/model/constants/build-in-theme/default.d.ts +2 -0
- package/lib/types/model/constants/build-in-theme/index.d.ts +15 -0
- package/lib/types/model/constants/build-in-theme/theme-util.d.ts +5 -0
- package/lib/types/model/constants/build-in-theme/types.d.ts +76 -0
- package/lib/types/model/constants/build-in-theme/univer-gradient1.d.ts +2 -0
- package/lib/types/model/constants/build-in-theme/univer-gradient2.d.ts +2 -0
- package/lib/types/model/constants/build-in-theme/univer-gradient3.d.ts +2 -0
- package/lib/types/model/constants/build-in-theme/univer-gradient4.d.ts +2 -0
- package/lib/types/model/constants/build-in-theme/univer-gradient5.d.ts +2 -0
- package/lib/types/model/constants/build-in-theme/univer-gradient6.d.ts +2 -0
- package/lib/types/model/constants/build-in-theme/univer1.d.ts +2 -0
- package/lib/types/model/constants/build-in-theme/univer2.d.ts +2 -0
- package/lib/types/model/constants/build-in-theme/univer3.d.ts +2 -0
- package/lib/types/model/constants/build-in-theme/univer4.d.ts +2 -0
- package/lib/types/model/constants/build-in-theme/univer5.d.ts +2 -0
- package/lib/types/model/constants/build-in-theme/univer6.d.ts +2 -0
- package/lib/types/model/constants/default-chart-style.d.ts +114 -0
- package/lib/types/model/constants/default.d.ts +11 -0
- package/lib/types/model/data-context-transformers/bar-data-context-transformer.d.ts +3 -0
- package/lib/types/model/data-context-transformers/box-plot-data-context-transformer.d.ts +3 -0
- package/lib/types/model/data-context-transformers/line-like-context-transformer.d.ts +3 -0
- package/lib/types/model/data-context-transformers/pareto-data-context-transformer.d.ts +3 -0
- package/lib/types/model/data-context-transformers/percent-data-context-transformer.d.ts +3 -0
- package/lib/types/model/data-context-transformers/pie-data-context-transformer.d.ts +3 -0
- package/lib/types/model/data-context-transformers/word-cloud-data-context-transform.d.ts +3 -0
- package/lib/types/model/echart-render-model.d.ts +32 -0
- package/lib/types/model/echart-to-chart-model-init.d.ts +3 -0
- package/lib/types/model/mode-converter/converters/boxplot-chart-converter.d.ts +2 -0
- package/lib/types/model/mode-converter/converters/bubble-chart-converter.d.ts +2 -0
- package/lib/types/model/mode-converter/converters/combination-chart-converter.d.ts +2 -0
- package/lib/types/model/mode-converter/converters/constants.d.ts +7 -0
- package/lib/types/model/mode-converter/converters/funnel-chart-converter.d.ts +2 -0
- package/lib/types/model/mode-converter/converters/heatmap-chart-convert.d.ts +2 -0
- package/lib/types/model/mode-converter/converters/pareto-chart-converter.d.ts +2 -0
- package/lib/types/model/mode-converter/converters/pie-chart-converter.d.ts +2 -0
- package/lib/types/model/mode-converter/converters/radar-chart-converter.d.ts +2 -0
- package/lib/types/model/mode-converter/converters/relation-chart-converter.d.ts +2 -0
- package/lib/types/model/mode-converter/converters/sankey-chart-converter.d.ts +2 -0
- package/lib/types/model/mode-converter/converters/scatter-chart-converter.d.ts +2 -0
- package/lib/types/model/mode-converter/converters/tools.d.ts +15 -0
- package/lib/types/model/mode-converter/converters/waterfall-chart-converter.d.ts +2 -0
- package/lib/types/model/mode-converter/converters/word-cloud-converter.d.ts +76 -0
- package/lib/types/model/mode-converter/mode-converter.d.ts +96 -0
- package/lib/types/model/mode-converter/render-spec-operators/axis-title.operator.d.ts +2 -0
- package/lib/types/model/mode-converter/render-spec-operators/bubble-style.operator.d.ts +2 -0
- package/lib/types/model/mode-converter/render-spec-operators/chart-axes.operator.d.ts +2 -0
- package/lib/types/model/mode-converter/render-spec-operators/chart-box-style.operator.d.ts +2 -0
- package/lib/types/model/mode-converter/render-spec-operators/empty-style-operator.d.ts +2 -0
- package/lib/types/model/mode-converter/render-spec-operators/font-size.operator.d.ts +2 -0
- package/lib/types/model/mode-converter/render-spec-operators/grid-operator.d.ts +2 -0
- package/lib/types/model/mode-converter/render-spec-operators/heatmap-chart-operator.d.ts +2 -0
- package/lib/types/model/mode-converter/render-spec-operators/hover-mark-style.operator.d.ts +2 -0
- package/lib/types/model/mode-converter/render-spec-operators/index.d.ts +13 -0
- package/lib/types/model/mode-converter/render-spec-operators/invalid-value-style.operator.d.ts +2 -0
- package/lib/types/model/mode-converter/render-spec-operators/legend-style.operator.d.ts +2 -0
- package/lib/types/model/mode-converter/render-spec-operators/line-like-style.operator.d.ts +2 -0
- package/lib/types/model/mode-converter/render-spec-operators/operator-types.d.ts +7 -0
- package/lib/types/model/mode-converter/render-spec-operators/pie-style.operator.d.ts +2 -0
- package/lib/types/model/mode-converter/render-spec-operators/radar-style.operator.d.ts +2 -0
- package/lib/types/model/mode-converter/render-spec-operators/relation-chart-operator/relation-chart-operator.d.ts +2 -0
- package/lib/types/model/mode-converter/render-spec-operators/relation-chart-operator/relation-force-directed-layout.d.ts +28 -0
- package/lib/types/model/mode-converter/render-spec-operators/sankey-chart-operator.d.ts +2 -0
- package/lib/types/model/mode-converter/render-spec-operators/scatter-style.operator.d.ts +2 -0
- package/lib/types/model/mode-converter/render-spec-operators/series-style-operator/pareto-series-style.handler.d.ts +2 -0
- package/lib/types/model/mode-converter/render-spec-operators/series-style-operator/series-chart-style.handler.d.ts +2 -0
- package/lib/types/model/mode-converter/render-spec-operators/series-style-operator/series-data-label.handler.d.ts +2 -0
- package/lib/types/model/mode-converter/render-spec-operators/series-style-operator/series-style-operator.d.ts +11 -0
- package/lib/types/model/mode-converter/render-spec-operators/series-style-operator/waterfall-series-style-operator.d.ts +3 -0
- package/lib/types/model/mode-converter/render-spec-operators/stack.operator.d.ts +2 -0
- package/lib/types/model/mode-converter/render-spec-operators/theme.operator.d.ts +2 -0
- package/lib/types/model/mode-converter/render-spec-operators/title-style.operator.d.ts +2 -0
- package/lib/types/model/mode-converter/render-spec-operators/tool-tip-operator.d.ts +3 -0
- package/lib/types/model/mode-converter/render-spec-operators/tools.d.ts +26 -0
- package/lib/types/model/mode-converter/render-spec-operators/trend-line/trend-line.operator.d.ts +2 -0
- package/lib/types/model/mode-converter/render-spec-operators/trend-line/trendline-util.d.ts +13 -0
- package/lib/types/model/mode-converter/render-spec-operators/visual-map-operator.d.ts +2 -0
- package/lib/types/model/mode-converter/render-spec-operators/watermark.operator.d.ts +2 -0
- package/lib/types/model/spec-converter/spec-converter.d.ts +1 -0
- package/lib/types/model/word-cloud-musk-image.service.d.ts +17 -0
- package/lib/types/models/chart-context/chart-field-selection.d.ts +3 -7
- package/lib/types/models/chart-data/build-chart-data.d.ts +1 -1
- package/lib/types/models/chart-host/chart-license.d.ts +5 -0
- package/lib/types/models/chart-model/chart-model.d.ts +3093 -48
- package/lib/types/models/chart-render/axes/axis-placement.d.ts +19 -0
- package/lib/types/models/chart-render/chart-field-button-layout.d.ts +51 -0
- package/lib/types/models/chart-render/converter/calendar-date-axis.d.ts +7 -0
- package/lib/types/models/chart-render/converter/render-spec-operators/date-axis-label-layout.d.ts +5 -0
- package/lib/types/models/chart-render/converter/render-spec-operators/error-bars.operator.d.ts +3 -0
- package/lib/types/models/chart-render/converter/render-spec-operators/grid-operator.d.ts +3 -0
- package/lib/types/models/chart-render/converter/render-spec-operators/legend-size.d.ts +24 -1
- package/lib/types/models/chart-render/converter/render-spec-operators/multi-level-category-axis-layout.d.ts +2 -1
- package/lib/types/models/chart-render/converter/render-spec-operators/pie-auto-label-layout.d.ts +4 -0
- package/lib/types/models/chart-render/converter/render-spec-operators/title-size.d.ts +10 -0
- package/lib/types/models/chart-render/converter/render-spec-operators/tool-tip-operator.d.ts +2 -0
- package/lib/types/models/chart-render/converter/render-spec-operators/tools.d.ts +6 -3
- package/lib/types/models/chart-render/converter/render-spec-operators/value-axis-scale.d.ts +9 -0
- package/lib/types/models/chart-render/echart-render-model/echart-render-engine.d.ts +1 -0
- package/lib/types/models/chart-render/format/pie-data-label.d.ts +9 -0
- package/lib/types/models/chart-render/style/chart-runtime-style.d.ts +2 -1
- package/lib/types/models/common/constants/default-chart-style.d.ts +2 -1
- package/lib/types/types.d.ts +142 -11
- package/lib/umd/facade.js +1 -1
- package/lib/umd/index.js +1 -1
- package/lib/umd/locale/ar-SA.js +1 -1
- package/lib/umd/locale/ca-ES.js +1 -1
- package/lib/umd/locale/de-DE.js +1 -1
- package/lib/umd/locale/en-US.js +1 -1
- package/lib/umd/locale/es-ES.js +1 -1
- package/lib/umd/locale/fa-IR.js +1 -1
- package/lib/umd/locale/fr-FR.js +1 -1
- package/lib/umd/locale/id-ID.js +1 -1
- package/lib/umd/locale/it-IT.js +1 -1
- package/lib/umd/locale/ja-JP.js +1 -1
- package/lib/umd/locale/ko-KR.js +1 -1
- package/lib/umd/locale/pl-PL.js +1 -1
- package/lib/umd/locale/pt-BR.js +1 -1
- package/lib/umd/locale/ru-RU.js +1 -1
- package/lib/umd/locale/sk-SK.js +1 -1
- package/lib/umd/locale/vi-VN.js +1 -1
- package/lib/umd/locale/zh-CN.js +1 -1
- package/lib/umd/locale/zh-HK.js +1 -1
- package/lib/umd/locale/zh-TW.js +1 -1
- package/package.json +7 -7
package/lib/types/enum.d.ts
CHANGED
|
@@ -202,6 +202,12 @@ export declare enum AxisValueType {
|
|
|
202
202
|
Numeric = 2,
|
|
203
203
|
Date = 3
|
|
204
204
|
}
|
|
205
|
+
/** Persisted Scatter geometry; absent fields retain historical marker-only rendering. */
|
|
206
|
+
export declare enum ScatterLineType {
|
|
207
|
+
None = "none",
|
|
208
|
+
Straight = "straight",
|
|
209
|
+
Smooth = "smooth"
|
|
210
|
+
}
|
|
205
211
|
export declare enum InvalidValueType {
|
|
206
212
|
Zero = "zero",
|
|
207
213
|
Break = "break",
|
|
@@ -300,9 +306,12 @@ export declare enum SeriesLabelPosition {
|
|
|
300
306
|
Left = "left",
|
|
301
307
|
Right = "right",
|
|
302
308
|
Inside = "inside",
|
|
309
|
+
InsideBase = "insideBase",
|
|
310
|
+
InsideEnd = "insideEnd",
|
|
303
311
|
Outside = "outside"
|
|
304
312
|
}
|
|
305
313
|
export declare enum PieLabelPosition {
|
|
314
|
+
Auto = "auto",
|
|
306
315
|
Inside = "inside",
|
|
307
316
|
Outside = "outside"
|
|
308
317
|
}
|
|
@@ -418,7 +427,8 @@ export declare enum LabelContentType {
|
|
|
418
427
|
CategoryName = 2,
|
|
419
428
|
SeriesName = 4,
|
|
420
429
|
Value = 8,
|
|
421
|
-
Percentage = 16
|
|
430
|
+
Percentage = 16,
|
|
431
|
+
BubbleSize = 32
|
|
422
432
|
}
|
|
423
433
|
export declare enum TextAlign {
|
|
424
434
|
Left = "left",
|
|
@@ -5,6 +5,30 @@ import { FCartesianChartBuilder } from '../f-cartesian-chart-builder';
|
|
|
5
5
|
*
|
|
6
6
|
* Scatter uses the ordinary Cartesian category/value mapping. Select the optional X-axis
|
|
7
7
|
* field with `setCategoryField()` and every Y/value series with `setValueFields()`.
|
|
8
|
+
* Use `setSeriesToCategory()` when a Y series has its own X field. The mapping uses
|
|
9
|
+
* dataset field indexes after source orientation, not positions in the selected series list.
|
|
10
|
+
* Independent X data can share the same visual X axis.
|
|
11
|
+
*
|
|
12
|
+
* @example Independent X fields in Sheets
|
|
13
|
+
* ```ts
|
|
14
|
+
* const fWorksheet = univerAPI.getActiveWorkbook().getActiveSheet();
|
|
15
|
+
* fWorksheet.getRange('A1:D4').setValues([
|
|
16
|
+
* ['Shared X', 'First Y', 'Other X', 'Second Y'],
|
|
17
|
+
* [1, 10, 5, 30],
|
|
18
|
+
* [2, 20, 9, 40],
|
|
19
|
+
* [3, 25, 12, 50],
|
|
20
|
+
* ]);
|
|
21
|
+
* const info = fWorksheet.newChart(univerAPI.Enum.ChartTypeString.Scatter)
|
|
22
|
+
* .setSource({ range: 'A1:D4', orientation: univerAPI.Enum.ChartSourceOrientation.Columns })
|
|
23
|
+
* .setCategoryField(0)
|
|
24
|
+
* .setValueFields([1, 3])
|
|
25
|
+
* .setSeriesToCategory({ 3: [2] })
|
|
26
|
+
* .build();
|
|
27
|
+
* await fWorksheet.insertChart(info);
|
|
28
|
+
* // First Y inherits Shared X: (1,10), (2,20), (3,25).
|
|
29
|
+
* // Second Y uses Other X: (5,30), (9,40), (12,50).
|
|
30
|
+
* // Calling setSeriesToCategory({}) restores Shared X for both Y series.
|
|
31
|
+
* ```
|
|
8
32
|
*
|
|
9
33
|
* @example Sheet
|
|
10
34
|
* ```ts
|
|
@@ -426,6 +426,28 @@ export declare class FChartBuilderBase<TSource = never[], TDataSource = TSource,
|
|
|
426
426
|
* ```
|
|
427
427
|
*/
|
|
428
428
|
setCategoryField(index: number): this;
|
|
429
|
+
/**
|
|
430
|
+
* Replaces all per-series category/X bindings. An empty object restores shared categories.
|
|
431
|
+
* Keys are dataset value-field indexes, not series positions or visual axis IDs.
|
|
432
|
+
* Values are ordered dataset category-field indexes. Scatter requires one X field;
|
|
433
|
+
* Combination supports root-to-leaf fields when multi-level categories are enabled.
|
|
434
|
+
* Omitted series retain the shared category selection; this does not create extra axes.
|
|
435
|
+
* Input arrays are copied. Repeated calls replace this map without changing other selections.
|
|
436
|
+
* @param {Record<number, number[]>} mapping Complete independent category mapping.
|
|
437
|
+
* @returns {this} This chart API for chaining.
|
|
438
|
+
* @example
|
|
439
|
+
* ```ts
|
|
440
|
+
* // Columns A/B/C/D become dataset fields 0/1/2/3.
|
|
441
|
+
* // A = shared X, B = first Y, C = independent X, D = second Y.
|
|
442
|
+
* builder.setCategoryField(0).setValueFields([1, 3]);
|
|
443
|
+
* builder.setSeriesToCategory({ 3: [2] }); // B uses A; D uses C.
|
|
444
|
+
* builder.setSeriesToCategory({ 1: [0], 3: [0] }); // Both explicitly use A.
|
|
445
|
+
* builder.setSeriesToCategory({}); // Both inherit the shared category again.
|
|
446
|
+
* // Combination with multi-level categories enabled:
|
|
447
|
+
* builder.setSeriesToCategory({ 2: [0, 1] }); // Series 2 uses root field 0, leaf field 1.
|
|
448
|
+
* ```
|
|
449
|
+
*/
|
|
450
|
+
setSeriesToCategory(mapping: Record<number, number[]>): this;
|
|
429
451
|
/**
|
|
430
452
|
* Sets the ordered category fields used by a multi-level category axis.
|
|
431
453
|
*
|
|
@@ -489,6 +489,28 @@ export declare class FChart<TSource, TDataSource = TSource, TInfo extends IChart
|
|
|
489
489
|
* ```
|
|
490
490
|
*/
|
|
491
491
|
setCategoryField(index: number): this;
|
|
492
|
+
/**
|
|
493
|
+
* Replaces all per-series category/X bindings. An empty object restores shared categories.
|
|
494
|
+
* Keys are dataset value-field indexes, not series positions or visual axis IDs.
|
|
495
|
+
* Values are ordered dataset category-field indexes. Scatter requires one X field;
|
|
496
|
+
* Combination supports root-to-leaf fields when multi-level categories are enabled.
|
|
497
|
+
* Omitted series retain the shared category selection; this does not create extra axes.
|
|
498
|
+
* Input arrays are copied. Repeated calls replace this map without changing other selections.
|
|
499
|
+
* @param {Record<number, number[]>} mapping Complete independent category mapping.
|
|
500
|
+
* @returns {this} This chart API for chaining.
|
|
501
|
+
* @example
|
|
502
|
+
* ```ts
|
|
503
|
+
* // Columns A/B/C/D become dataset fields 0/1/2/3.
|
|
504
|
+
* // A = shared X, B = first Y, C = independent X, D = second Y.
|
|
505
|
+
* fChart.setCategoryField(0).setValueFields([1, 3]);
|
|
506
|
+
* fChart.setSeriesToCategory({ 3: [2] }); // B uses A; D uses C.
|
|
507
|
+
* fChart.setSeriesToCategory({ 1: [0], 3: [0] }); // Both explicitly use A.
|
|
508
|
+
* fChart.setSeriesToCategory({}); // Both inherit the shared category again.
|
|
509
|
+
* // Combination with multi-level categories enabled:
|
|
510
|
+
* fChart.setSeriesToCategory({ 2: [0, 1] }); // Series 2 uses root field 0, leaf field 1.
|
|
511
|
+
* ```
|
|
512
|
+
*/
|
|
513
|
+
setSeriesToCategory(mapping: Record<number, number[]>): this;
|
|
492
514
|
/**
|
|
493
515
|
* Sets the ordered category fields used by this live Chart's multi-level category axis.
|
|
494
516
|
* @param {readonly number[]} indexes The zero-based source field indexes in root-to-leaf order.
|
package/lib/types/index.d.ts
CHANGED
|
@@ -64,7 +64,7 @@ export type { IBuildOrientedChartDataSetOptions, IChartHostConfigAdapter, IChart
|
|
|
64
64
|
export { buildOrientedChartDataSet, } from './chart-builder/internal/chart-host-config-adapter';
|
|
65
65
|
export type { IChartDataAggregation, IChartTopNSpec } from './chart-data-aggregation';
|
|
66
66
|
export type { IUniverChartConfig } from './config/config';
|
|
67
|
-
export { AreaLineStyle, AxisAlignEnum, AxisValueType, BarShape, CategoryType, ChartAttributeBits, ChartAxisDimension, ChartBorderDashType, ChartCandlestickState, ChartChordFocusMode, ChartChordLabelPosition, ChartChordRibbonColorMode, ChartGaugeMode, ChartGaugePointerShape, ChartHistogramBinKind, ChartMarkLineLabelPosition, ChartSemanticAxis, ChartSourceDataTypeEnum, ChartSunburstLabelPosition, ChartTrendlineType, ChartTypeBits, ChartWaterfallPointRole, DataOrientation, HistogramBinningMode, InvalidValueType, IRuntimeAxisPosition, IRuntimeAxisPriority, LabelAlignEnum, LabelContentType, LegendPositionEnum, LinePointShape, ParetoSeriesIndex, ParetoSeriesPart, PieLabelPosition, RadarShape, RelationChartLayoutEnum, SelectModeEnum, SeriesLabelPosition, StackType, TextAlign, TextVerticalAlign, TitlePositionEnum, TreemapParentLabelLayout, WaterfallSeriesTypeEnum, WaterfallStackTypeEnum, WordCloudShapeEnum, } from './enum';
|
|
67
|
+
export { AreaLineStyle, AxisAlignEnum, AxisValueType, BarShape, CategoryType, ChartAttributeBits, ChartAxisDimension, ChartBorderDashType, ChartCandlestickState, ChartChordFocusMode, ChartChordLabelPosition, ChartChordRibbonColorMode, ChartGaugeMode, ChartGaugePointerShape, ChartHistogramBinKind, ChartMarkLineLabelPosition, ChartSemanticAxis, ChartSourceDataTypeEnum, ChartSunburstLabelPosition, ChartTrendlineType, ChartTypeBits, ChartWaterfallPointRole, DataOrientation, HistogramBinningMode, InvalidValueType, IRuntimeAxisPosition, IRuntimeAxisPriority, LabelAlignEnum, LabelContentType, LegendPositionEnum, LinePointShape, ParetoSeriesIndex, ParetoSeriesPart, PieLabelPosition, RadarShape, RelationChartLayoutEnum, ScatterLineType, SelectModeEnum, SeriesLabelPosition, StackType, TextAlign, TextVerticalAlign, TitlePositionEnum, TreemapParentLabelLayout, WaterfallSeriesTypeEnum, WaterfallStackTypeEnum, WordCloudShapeEnum, } from './enum';
|
|
68
68
|
export { generateChartContext, reconcileChartContext } from './models/chart-context/resolve-chart-context';
|
|
69
69
|
export { MAX_HISTOGRAM_BIN_COUNT } from './models/chart-data/internal/histogram-bins';
|
|
70
70
|
export { PIE_CONNECTOR_COLOR_DEFAULT, PIE_CONNECTOR_DASH_TYPE_DEFAULT, PIE_CONNECTOR_OPACITY_DEFAULT, PIE_CONNECTOR_VISIBLE_DEFAULT, PIE_CONNECTOR_WIDTH_DEFAULT, PIE_PERCENTAGE_SPLIT_LESS_THAN_DEFAULT, PIE_POSITION_SPLIT_COUNT_DEFAULT, PIE_POSITION_SPLIT_COUNT_MIN, PIE_SECONDARY_GAP_WIDTH_DEFAULT, PIE_SECONDARY_GAP_WIDTH_MAX, PIE_SECONDARY_GAP_WIDTH_MIN, PIE_SECONDARY_SIZE_DEFAULT, PIE_SECONDARY_SIZE_MAX, PIE_SECONDARY_SIZE_MIN, PIE_VALUE_SPLIT_LESS_THAN_DEFAULT, } from './models/chart-data/pie-composite/pie-composite-spec';
|
|
@@ -109,7 +109,7 @@ export type { IChartLocaleTexts } from './models/common/chart-locale-texts';
|
|
|
109
109
|
export { replaceLocaleParams } from './models/common/chart-locale-texts';
|
|
110
110
|
export { DEFAULT_CHORD_MAPPING } from './models/common/constants/chord';
|
|
111
111
|
export { defaultChartHeight, defaultChartWidth, EChartRenderEngineName } from './models/common/constants/default';
|
|
112
|
-
export { defaultChartConfig, resolveGaugeStyle, RTLChartStyle } from './models/common/constants/default-chart-style';
|
|
112
|
+
export { DEFAULT_SCATTER_LINE_TYPE, defaultChartConfig, resolveGaugeStyle, RTLChartStyle } from './models/common/constants/default-chart-style';
|
|
113
113
|
export { DEFAULT_HISTOGRAM_BIN_COUNT, DEFAULT_HISTOGRAM_BIN_WIDTH, MAX_HISTOGRAM_BIN_GAP, } from './models/common/constants/histogram-defaults';
|
|
114
114
|
export { resolveChordStyle, resolveSunburstCenterLabelStyle, resolveSunburstLabelStyle, } from './models/common/style/chart-specific-default-style';
|
|
115
115
|
export type { IEchartTheme } from './models/common/theme/build-in-theme/types';
|
|
@@ -136,7 +136,7 @@ export type { IChartSourceHeader, IChartSourceHeaderTitle } from './source/chart
|
|
|
136
136
|
export { StaticChartSource } from './source/static-chart-source';
|
|
137
137
|
export type { IChartCandlestickMappingSpec, IChartCandlestickSpec, IChartCandlestickStateStyleSpec, IChartChordEmphasisSpec, IChartChordLabelSpec, IChartChordLayoutSpec, IChartChordMappingSpec, IChartChordNodeStyleSpec, IChartChordRibbonStyleSpec, IChartChordSpec, IChartGaugeAnchorSpec, IChartGaugeAnglesSpec, IChartGaugeAxisLabelSpec, IChartGaugeAxisLineSpec, IChartGaugeAxisTickSpec, IChartGaugeDetailSpec, IChartGaugeFontSpec, IChartGaugePointerSpec, IChartGaugeProgressSpec, IChartGaugeRangeSpec, IChartGaugeScaleSpec, IChartGaugeSpec, IChartGaugeSplitLineSpec, IChartGaugeTitleSpec, IChartHistogramBinningSpec, IChartHistogramDataSpec, IChartHistogramSpec, IChartHistogramStyleSpec, IChartSunburstCenterLabelSpec, IChartSunburstLabelSpec, IChartSunburstSpec, IChartTreemapLabelSpec, IChartTreemapSpec, IChartValueLabelSpec, } from './types';
|
|
138
138
|
export { ChartImageExportFormat, ChartImageSourceType, ChartRenderMode } from './types';
|
|
139
|
-
export type { ChartDataSourceValues, ChartDirection, ChartElementEventHandler, ChartElementEventType, ChartElementKind, ChartImageSource, ChartRenderRuntimeContext, ChartRuntimeStyle, ChartStyle, DeepNullish, DeepPartial, DimensionDefinitionLoose, IAllSeriesStyle, IAxisOptions, IBarStyle, IChartBubbleStyle, IChartCandlestickData, IChartCandlestickPoint, IChartChordData, IChartChordLink, IChartChordNode, IChartConfig, IChartContext, IChartData, IChartDataCategory, IChartDataCategoryLevel, IChartDataCategorySegment, IChartDataSeries, IChartDataSource, IChartElementBounds, IChartElementEvent, IChartElementHit, IChartElementOverlay, IChartGaugeData, IChartGaugeItem, IChartHistogramBin, IChartHistogramData, IChartHost, IChartHostBorderStyle, IChartHostLease, IChartHostRect, IChartHostStyle, IChartInstance, IChartPlotArea, IChartRenderAsImageOptions, IChartRenderInput, IChartRenderInstance, IChartRenderInstanceCreateContext, IChartRenderInstanceSpecInput, IChartRenderInstanceStyleInput, IChartRenderModel, IChartRenderModelImageExportInput, IChartRenderModelImageExportOptions, IChartRenderModelImageExportResult, IChartRenderTransitionOptions, IChartSnapshot, IChartStyle, IChartSunburstData, IChartSunburstNode, IChartTreemapData, IChartTreemapNode, IDimensionDefinition, IDomChartHost, IGridLineStyle, IImageChartHost, ILabelStyle, ILegendStyle, IPieLabelStyle, IPointStyle, IRelationForceOptions, IRuntimeAxis, ISeriesLabelStyle, ISeriesStyle, ITrendLine, IUniverDataSet, IUniverDataSetCategorySpan, OptionDataValue, RightYAxisOptions, } from './types';
|
|
139
|
+
export type { ChartDataSourceValues, ChartDirection, ChartElementEventHandler, ChartElementEventType, ChartElementKind, ChartFieldButtonRole, ChartImageSource, ChartRenderRuntimeContext, ChartRuntimeStyle, ChartStyle, DeepNullish, DeepPartial, DimensionDefinitionLoose, IAllSeriesStyle, IAxisOptions, IBarStyle, IChartBubbleStyle, IChartCandlestickData, IChartCandlestickPoint, IChartChordData, IChartChordLink, IChartChordNode, IChartConfig, IChartContext, IChartData, IChartDataCategory, IChartDataCategoryLevel, IChartDataCategorySegment, IChartDataSeries, IChartDataSource, IChartElementBounds, IChartElementEvent, IChartElementHit, IChartElementOverlay, IChartFieldButton, IChartGaugeData, IChartGaugeItem, IChartHistogramBin, IChartHistogramData, IChartHost, IChartHostBorderStyle, IChartHostLease, IChartHostRect, IChartHostStyle, IChartInstance, IChartPlotArea, IChartRenderAsImageOptions, IChartRenderInput, IChartRenderInstance, IChartRenderInstanceCreateContext, IChartRenderInstanceSpecInput, IChartRenderInstanceStyleInput, IChartRenderModel, IChartRenderModelImageExportInput, IChartRenderModelImageExportOptions, IChartRenderModelImageExportResult, IChartRenderTransitionOptions, IChartSnapshot, IChartStyle, IChartSunburstData, IChartSunburstNode, IChartTreemapData, IChartTreemapNode, IDimensionDefinition, IDomChartHost, IGridLineStyle, IImageChartHost, ILabelStyle, ILegendStyle, IPieLabelStyle, IPointStyle, IRelationForceOptions, IRuntimeAxis, ISeriesLabelStyle, ISeriesStyle, ITrendLine, IUniverDataSet, IUniverDataSetCategorySpan, OptionDataValue, RightYAxisOptions, } from './types';
|
|
140
140
|
export { CHART_DATA_UPDATE_ANIMATION_DURATION } from './types';
|
|
141
141
|
export { chartBitsUtils, chartTypeCanUseTrendLine, mergeChartConfig, } from './util';
|
|
142
142
|
export { omitUndefinedFields, } from './utils/compact';
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { IChartContext, IChartData, IUniverDataSet } from '../../types';
|
|
2
|
+
import type { IChartLocaleTexts } from '../chart-locale-texts';
|
|
3
|
+
import { ChartTypeBits } from '../../enum';
|
|
4
|
+
export declare function buildChartData(dataSource: IUniverDataSet, chartContext: IChartContext, chartType: ChartTypeBits, isRowDirection: boolean, localeTexts: IChartLocaleTexts): IChartData;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { ChartDataSource } from '../../source/chart-source';
|
|
2
|
+
import type { ChartDataSourceValue, ChartDataSourceValues, IChartContext, IChartDataAggregation, OptionDataValue } from '../../types';
|
|
3
|
+
import type { ChartModel } from '../chart-model';
|
|
4
|
+
export type IChartContextOperator = (dataSource: ChartDataSource, context: IChartContext, model: ChartModel) => IChartContext;
|
|
5
|
+
export type IChartDataAggregateOperator = (dataSource: ChartDataSourceValues, context: IChartContext, dataAggregation: IChartDataAggregation) => ChartDataSourceValues | void;
|
|
6
|
+
type Nil = null | undefined;
|
|
7
|
+
export declare function isNil(value: any): value is Nil;
|
|
8
|
+
export declare function countTypesFromArray(arrayData: OptionDataValue[]): {
|
|
9
|
+
numbers: number;
|
|
10
|
+
strings: number;
|
|
11
|
+
};
|
|
12
|
+
export declare function toString(value: ChartDataSourceValue): string;
|
|
13
|
+
export declare function toNumber(value: ChartDataSourceValue): number;
|
|
14
|
+
export declare function toColumnOrient<T = any>(dataSource: T[][]): T[][];
|
|
15
|
+
export declare function findCategoryIndexes(dataSource: ChartDataSource): number[];
|
|
16
|
+
export declare function groupByToArray<T = any>(ary: T[], selector: (item: T, index: number) => string): {
|
|
17
|
+
name: string;
|
|
18
|
+
values: T[];
|
|
19
|
+
}[];
|
|
20
|
+
export declare function sumArray(ary: ChartDataSourceValue[]): number;
|
|
21
|
+
export declare const findHeaderOperator: IChartContextOperator;
|
|
22
|
+
export declare const findCategoryOperator: IChartContextOperator;
|
|
23
|
+
export declare const findSeriesOperator: IChartContextOperator;
|
|
24
|
+
export declare const pieSeriesFilterOperator: IChartContextOperator;
|
|
25
|
+
export {};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export interface IChartLocaleTexts {
|
|
2
|
+
seriesDefaultName: string;
|
|
3
|
+
categoryDefaultName: string;
|
|
4
|
+
blank: string;
|
|
5
|
+
boxplotMin: string;
|
|
6
|
+
boxplotQ1: string;
|
|
7
|
+
boxplotMedian: string;
|
|
8
|
+
boxplotQ3: string;
|
|
9
|
+
boxplotMax: string;
|
|
10
|
+
bubbleEmptyTips: string;
|
|
11
|
+
cloudWord: string;
|
|
12
|
+
cloudFrequency: string;
|
|
13
|
+
msgEmptyTips: string;
|
|
14
|
+
msgSankeyCircularTips: string;
|
|
15
|
+
paretoLineName: string;
|
|
16
|
+
relationEmptyTips: string;
|
|
17
|
+
waterfallPositive: string;
|
|
18
|
+
waterfallNegative: string;
|
|
19
|
+
waterfallSubtotal: string;
|
|
20
|
+
}
|
|
21
|
+
export declare function replaceLocaleParams(text: string, ...args: string[]): string;
|
|
22
|
+
export declare function getDefaultChartLocaleTexts(): IChartLocaleTexts;
|