@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.
Files changed (157) hide show
  1. package/README.md +9 -3
  2. package/lib/cjs/facade.js +1 -0
  3. package/lib/cjs/index.js +1 -1
  4. package/lib/es/facade.js +1 -0
  5. package/lib/es/index.js +1 -1
  6. package/lib/facade.js +1 -0
  7. package/lib/index.js +1 -1
  8. package/lib/types/chart-builder/chart-builder-adapter.d.ts +13 -0
  9. package/lib/types/chart-builder/chart-builder.d.ts +35 -0
  10. package/lib/types/chart-builder/chart-description.d.ts +3 -0
  11. package/lib/types/chart-builder/chart-types.d.ts +459 -0
  12. package/lib/types/chart-builder/configuration/aggregation.d.ts +7 -0
  13. package/lib/types/chart-builder/configuration/appearance.d.ts +8 -0
  14. package/lib/types/chart-builder/configuration/area.d.ts +3 -0
  15. package/lib/types/chart-builder/configuration/axes.d.ts +26 -0
  16. package/lib/types/chart-builder/configuration/axis-pointer.d.ts +9 -0
  17. package/lib/types/chart-builder/configuration/bar.d.ts +3 -0
  18. package/lib/types/chart-builder/configuration/cartesian-series.d.ts +25 -0
  19. package/lib/types/chart-builder/configuration/chart-config-operation.d.ts +40 -0
  20. package/lib/types/chart-builder/configuration/combination.d.ts +10 -0
  21. package/lib/types/chart-builder/configuration/funnel.d.ts +4 -0
  22. package/lib/types/chart-builder/configuration/heatmap.d.ts +9 -0
  23. package/lib/types/chart-builder/configuration/index.d.ts +29 -0
  24. package/lib/types/chart-builder/configuration/invalid-value.d.ts +3 -0
  25. package/lib/types/chart-builder/configuration/legend.d.ts +3 -0
  26. package/lib/types/chart-builder/configuration/line.d.ts +3 -0
  27. package/lib/types/chart-builder/configuration/mapping.d.ts +4 -0
  28. package/lib/types/chart-builder/configuration/mark-lines.d.ts +3 -0
  29. package/lib/types/chart-builder/configuration/palette.d.ts +4 -0
  30. package/lib/types/chart-builder/configuration/pareto.d.ts +7 -0
  31. package/lib/types/chart-builder/configuration/pie.d.ts +23 -0
  32. package/lib/types/chart-builder/configuration/point-mapping.d.ts +5 -0
  33. package/lib/types/chart-builder/configuration/radar.d.ts +5 -0
  34. package/lib/types/chart-builder/configuration/relation.d.ts +14 -0
  35. package/lib/types/chart-builder/configuration/subtitle.d.ts +3 -0
  36. package/lib/types/chart-builder/configuration/theme.d.ts +4 -0
  37. package/lib/types/chart-builder/configuration/title.d.ts +3 -0
  38. package/lib/types/chart-builder/configuration/trendline.d.ts +12 -0
  39. package/lib/types/chart-builder/configuration/waterfall.d.ts +12 -0
  40. package/lib/types/chart-builder/configuration/word-cloud.d.ts +7 -0
  41. package/lib/types/chart-builder/conversion/chart-config-converter.d.ts +24 -0
  42. package/lib/types/chart-builder/conversion/chart-model-fields.d.ts +115 -0
  43. package/lib/types/chart-builder/conversion/chart-type-converter.d.ts +6 -0
  44. package/lib/types/chart-builder/conversion/describe-chart-model.d.ts +11 -0
  45. package/lib/types/chart-builder/conversion/resolve-chart-model-data.d.ts +5 -0
  46. package/lib/types/chart-builder/detached-chart-builder-adapter.d.ts +19 -0
  47. package/lib/types/chart-builder/index.d.ts +12 -0
  48. package/lib/types/chart-builder/internal/deep-freeze.d.ts +1 -0
  49. package/lib/types/chart-builder/internal/host-builder-runtime.d.ts +5 -0
  50. package/lib/types/chart-builder/internal/merge-description.d.ts +2 -0
  51. package/lib/types/enum.d.ts +36 -0
  52. package/lib/types/facade/builders/f-area-chart-builder.d.ts +33 -0
  53. package/lib/types/facade/builders/f-bubble-chart-builder.d.ts +33 -0
  54. package/lib/types/facade/builders/f-combination-chart-builder.d.ts +66 -0
  55. package/lib/types/facade/builders/f-funnel-chart-builder.d.ts +61 -0
  56. package/lib/types/facade/builders/f-heatmap-chart-builder.d.ts +124 -0
  57. package/lib/types/facade/builders/f-line-chart-builder.d.ts +36 -0
  58. package/lib/types/facade/builders/f-pareto-chart-builder.d.ts +112 -0
  59. package/lib/types/facade/builders/f-pie-chart-builder.d.ts +324 -0
  60. package/lib/types/facade/builders/f-radar-chart-builder.d.ts +62 -0
  61. package/lib/types/facade/builders/f-relation-chart-builder.d.ts +184 -0
  62. package/lib/types/facade/builders/f-scatter-chart-builder.d.ts +33 -0
  63. package/lib/types/facade/builders/f-waterfall-chart-builder.d.ts +226 -0
  64. package/lib/types/facade/builders/f-word-cloud-chart-builder.d.ts +91 -0
  65. package/lib/types/facade/builders/index.d.ts +13 -0
  66. package/lib/types/facade/chart-builder-registry.d.ts +8 -0
  67. package/lib/types/facade/chart-builder-type-map.d.ts +30 -0
  68. package/lib/types/facade/chart-host-builder-types.d.ts +21 -0
  69. package/lib/types/facade/f-axis-chart-builder.d.ts +245 -0
  70. package/lib/types/facade/f-cartesian-chart-builder.d.ts +146 -0
  71. package/lib/types/facade/f-chart-base.d.ts +82 -0
  72. package/lib/types/facade/f-chart-builder-base.d.ts +331 -0
  73. package/lib/types/facade/f-charts-base.d.ts +74 -0
  74. package/lib/types/facade/f-enum.d.ts +75 -0
  75. package/lib/types/facade/index.d.ts +16 -0
  76. package/lib/types/facade/internal/chart-builder-facade-context.d.ts +12 -0
  77. package/lib/types/facade/internal/constants.d.ts +2 -0
  78. package/lib/types/facade/internal/host-builder-composer.d.ts +16 -0
  79. package/lib/types/facade/register-builders.d.ts +1 -0
  80. package/lib/types/index.d.ts +74 -15
  81. package/lib/types/models/chart-data-operators/build-chart-data.d.ts +6 -1
  82. package/lib/types/models/chart-data-operators/cartesian-point-data.d.ts +43 -0
  83. package/lib/types/models/chart-data-operators/operators.d.ts +6 -6
  84. package/lib/types/models/chart-element-axis-id.d.ts +9 -0
  85. package/lib/types/models/chart-element-edit-overlay/chart-element-edit-overlay.d.ts +38 -0
  86. package/lib/types/models/chart-element-edit-overlay/index.d.ts +4 -0
  87. package/lib/types/models/chart-element-edit-overlay/palette.d.ts +2 -0
  88. package/lib/types/models/chart-element-edit-overlay/resolve-chart-element-hit-layout.d.ts +16 -0
  89. package/lib/types/models/chart-element-edit-overlay/types.d.ts +20 -0
  90. package/lib/types/models/chart-host-style.d.ts +40 -0
  91. package/lib/types/models/chart-model.d.ts +181 -49
  92. package/lib/types/models/chart-render-input-resolver.d.ts +13 -0
  93. package/lib/types/models/chart-render-model-manager.service.d.ts +26 -0
  94. package/lib/types/models/chart-resource-serializer.d.ts +10 -0
  95. package/lib/types/models/chart-semantic-axes.d.ts +4 -0
  96. package/lib/types/models/constants/build-in-theme/index.d.ts +12 -12
  97. package/lib/types/models/constants/build-in-theme/univer-gradient1.d.ts +1 -1
  98. package/lib/types/models/constants/build-in-theme/univer-gradient2.d.ts +1 -1
  99. package/lib/types/models/constants/build-in-theme/univer-gradient3.d.ts +1 -1
  100. package/lib/types/models/constants/build-in-theme/univer-gradient4.d.ts +1 -1
  101. package/lib/types/models/constants/build-in-theme/univer-gradient5.d.ts +1 -1
  102. package/lib/types/models/constants/build-in-theme/univer-gradient6.d.ts +1 -1
  103. package/lib/types/models/constants/build-in-theme/univer1.d.ts +1 -1
  104. package/lib/types/models/constants/build-in-theme/univer2.d.ts +1 -1
  105. package/lib/types/models/constants/build-in-theme/univer3.d.ts +1 -1
  106. package/lib/types/models/constants/build-in-theme/univer4.d.ts +1 -1
  107. package/lib/types/models/constants/build-in-theme/univer5.d.ts +1 -1
  108. package/lib/types/models/constants/build-in-theme/univer6.d.ts +1 -1
  109. package/lib/types/models/constants/default-chart-style.d.ts +21 -1
  110. package/lib/types/models/constants/default.d.ts +3 -1
  111. package/lib/types/models/echart-render-model.d.ts +37 -2
  112. package/lib/types/models/image-chart-host.d.ts +2 -1
  113. package/lib/types/models/mode-converter/converters/waterfall-layout.d.ts +34 -0
  114. package/lib/types/models/mode-converter/mode-converter.d.ts +0 -2
  115. package/lib/types/models/mode-converter/render-spec-operators/legend-size.d.ts +2 -1
  116. package/lib/types/models/mode-converter/render-spec-operators/mark-line.operator.d.ts +3 -0
  117. package/lib/types/models/mode-converter/render-spec-operators/tools.d.ts +2 -3
  118. package/lib/types/models/series-style/series-style-resolver.d.ts +9 -0
  119. package/lib/types/source/chart-data-item.d.ts +3 -0
  120. package/lib/types/source/source-util.d.ts +1 -1
  121. package/lib/types/source/static-chart-source.d.ts +11 -3
  122. package/lib/types/types.d.ts +162 -39
  123. package/lib/types/util.d.ts +2 -4
  124. package/lib/types/utils/compact.d.ts +4 -0
  125. package/lib/types/wordcloud-chart/adapters/echarts/chart-view.d.ts +2 -2
  126. package/lib/types/wordcloud-chart/adapters/echarts/install.d.ts +2 -2
  127. package/lib/types/wordcloud-chart/adapters/echarts/layout-register.d.ts +2 -2
  128. package/lib/types/wordcloud-chart/adapters/echarts/series-model.d.ts +2 -2
  129. package/lib/types/wordcloud-chart/core/collision/box-shape-engine.d.ts +1 -1
  130. package/lib/types/wordcloud-chart/core/collision/engine.d.ts +1 -1
  131. package/lib/types/wordcloud-chart/core/collision/footprint.d.ts +1 -1
  132. package/lib/types/wordcloud-chart/core/collision/glyph-shape-engine.d.ts +1 -1
  133. package/lib/types/wordcloud-chart/core/collision/grid.d.ts +1 -1
  134. package/lib/types/wordcloud-chart/core/layout/candidates.d.ts +1 -1
  135. package/lib/types/wordcloud-chart/core/layout/layout-config.d.ts +1 -1
  136. package/lib/types/wordcloud-chart/core/layout/layout.d.ts +1 -2
  137. package/lib/types/wordcloud-chart/core/layout/phases.d.ts +1 -1
  138. package/lib/types/wordcloud-chart/core/layout/place-word.d.ts +1 -1
  139. package/lib/types/wordcloud-chart/core/layout/placement-stats.d.ts +1 -1
  140. package/lib/types/wordcloud-chart/core/layout/placement-types.d.ts +1 -1
  141. package/lib/types/wordcloud-chart/core/layout/placement-word-manager.d.ts +1 -1
  142. package/lib/types/wordcloud-chart/core/layout/runtime-mask.d.ts +1 -1
  143. package/lib/types/wordcloud-chart/core/layout/word-prepare.d.ts +1 -1
  144. package/lib/types/wordcloud-chart/core/shape/shape-mask.d.ts +1 -1
  145. package/lib/types/wordcloud-chart/index.d.ts +3 -2
  146. package/lib/types/wordcloud-chart/types.d.ts +2 -0
  147. package/lib/umd/facade.js +1 -0
  148. package/lib/umd/index.js +1 -1
  149. package/package.json +15 -5
  150. package/lib/types/wordcloud-chart/core/collision/types.d.ts +0 -1
  151. package/lib/types/wordcloud-chart/core/layout/types.d.ts +0 -1
  152. package/lib/types/wordcloud-chart/core/shape/types.d.ts +0 -1
  153. package/lib/types/wordcloud-chart/core/text/types.d.ts +0 -1
  154. package/lib/types/wordcloud-chart/core/types/option.d.ts +0 -1
  155. package/lib/types/wordcloud-chart/core/types/shape.d.ts +0 -1
  156. package/lib/types/wordcloud-chart/core/types/word.d.ts +0 -1
  157. package/lib/types/wordcloud-chart/echarts.d.ts +0 -2
@@ -1,6 +1,7 @@
1
1
  import type { IDisposable, Nullable } from '@univerjs/core';
2
2
  import type { Observable } from 'rxjs';
3
- import type { AreaLineStyle, AxisAlignEnum, AxisValueType, CategoryType, ChartBorderDashType, ChartSourceDataTypeEnum, ChartTrendlineType, ChartTypeBits, DataOrientation, InvalidValueType, IRuntimeAxisPosition, IRuntimeAxisPriority, LabelAlignEnum, LegendPositionEnum, LinePointShape, PieLabelPosition, RadarShape, RelationChartLayoutEnum, SelectModeEnum, SeriesLabelPosition, TitlePositionEnum, WaterfallSeriesTypeEnum, WaterfallStackTypeEnum, WordCloudShapeEnum } from './enum';
3
+ import type { AreaLineStyle, AxisAlignEnum, AxisValueType, BarShape, CategoryType, ChartAxisDimension, ChartBorderDashType, ChartMarkLineLabelPosition, ChartSemanticAxis, ChartSourceDataTypeEnum, ChartTrendlineType, ChartTypeBits, ChartWaterfallPointRole, DataOrientation, InvalidValueType, IRuntimeAxisPosition, IRuntimeAxisPriority, LabelAlignEnum, LegendPositionEnum, LinePointShape, PieLabelPosition, RadarShape, RelationChartLayoutEnum, SelectModeEnum, SeriesLabelPosition, TitlePositionEnum, WaterfallSeriesTypeEnum, WaterfallStackTypeEnum, WordCloudShapeEnum } from './enum';
4
+ import type { ICartesianPointData } from './models/chart-data-operators/cartesian-point-data';
4
5
  import type { IChartLocaleTexts } from './models/chart-locale-texts';
5
6
  import type { IEchartTheme } from './models/constants/build-in-theme';
6
7
  import type { BarSeriesOption } from './utils/echarts';
@@ -28,6 +29,17 @@ export type DimensionDefinitionLoose = IDimensionDefinition['name'] | IDimension
28
29
  export type OptionDataValue = string | number | Date | null | undefined;
29
30
  export type ChartDataSourceValue = OptionDataValue;
30
31
  export type ChartDataSourceValues = ChartDataSourceValue[][];
32
+ /**
33
+ * Canonical chart dataset used by chart context operators and chart-data builders.
34
+ *
35
+ * Adapters must normalize their raw input before exposing this shape:
36
+ * - `dimensions[index]` is the optional header label for `source[index]`.
37
+ * - `source[index]` is one logical data vector, already oriented by the adapter.
38
+ * - `sourceType` and `sourceLabels`, when present, have the same vector shape as `source`.
39
+ *
40
+ * Category detection reads from `source` vectors only. `dimensions` must not be
41
+ * used as a fallback category vector.
42
+ */
31
43
  export interface IUniverDataSet {
32
44
  source: OptionDataValue[][];
33
45
  dimensions: Array<DimensionDefinitionLoose>;
@@ -49,15 +61,15 @@ export interface IChartContext {
49
61
  categoryIndex?: number;
50
62
  seriesIndexes?: number[];
51
63
  };
52
- bubbleSizeSeriesId?: number;
53
- bubbleXAxis?: number;
54
- bubbleYAxis?: number;
55
- bubbleLabel?: number;
56
- bubbleSeries?: number;
64
+ scatterXIndex?: number;
65
+ scatterYIndex?: number;
66
+ scatterLabelIndex?: number;
67
+ bubbleSizeIndex?: number;
68
+ bubbleSeriesIndex?: number;
57
69
  }
58
70
  export interface IRelationNodes {
59
71
  id: string;
60
- category: string;
72
+ category?: string;
61
73
  name: string;
62
74
  value: number;
63
75
  symbolSize?: number;
@@ -80,34 +92,7 @@ export interface IChartData {
80
92
  * the dataset of the chart, it should match echart dataset option
81
93
  */
82
94
  dataset?: IUniverDataSet;
83
- bubble?: {
84
- bubbleSizeData?: {
85
- id: string;
86
- name: string;
87
- items: IChartDataItem[];
88
- };
89
- bubbleXData?: {
90
- id: string;
91
- name: string;
92
- items: IChartDataItem[];
93
- };
94
- bubbleYData?: {
95
- id: string;
96
- name: string;
97
- items: IChartDataItem[];
98
- };
99
- bubbleLabelData?: {
100
- id: string;
101
- name: string;
102
- items: IChartDataItem[];
103
- };
104
- bubbleSeriesData?: {
105
- id: string;
106
- name: string;
107
- items: IChartDataItem[];
108
- };
109
- isValidateBubbleSource?: boolean;
110
- };
95
+ cartesianPoint?: ICartesianPointData;
111
96
  heatmapData?: {
112
97
  xData: string[];
113
98
  yData: string[];
@@ -167,6 +152,8 @@ export interface IChartRuntimeContext {
167
152
  axes: IRuntimeAxis[];
168
153
  themeInfo: IEchartTheme;
169
154
  wordCloudRenderConfig?: IWordCloudRenderConfig;
155
+ /** Runtime-only extra inset reserved by host adapters around chart content. */
156
+ layoutInset?: number;
170
157
  /**
171
158
  * The function to transform the color to the render color with considering the system theme is dark mode or not.
172
159
  * @param {string} color - The color to be rendered.
@@ -201,6 +188,8 @@ export interface ILegendStyle {
201
188
  position?: LegendPositionEnum;
202
189
  label?: Omit<ILabelStyle, 'visible' | 'align' | 'content'>;
203
190
  selectMode?: SelectModeEnum;
191
+ /** Allow a horizontal legend to flow onto multiple rows instead of using pagination. */
192
+ wrap?: boolean;
204
193
  }
205
194
  export interface IGridLineStyle {
206
195
  visible: boolean;
@@ -272,7 +261,7 @@ export interface ISeriesStyle {
272
261
  };
273
262
  }
274
263
  export type RightYAxisOptions = Omit<IAxisOptions, 'reverse'>;
275
- export interface IAllSeriesStyle extends Pick<ISeriesStyle, 'border' | 'label' | 'rightYAxis' | 'point' | 'color' | 'waterfall'> {
264
+ export interface IAllSeriesStyle extends Pick<ISeriesStyle, 'border' | 'label' | 'rightYAxis' | 'point' | 'color' | 'fillOpacity' | 'waterfall'> {
276
265
  }
277
266
  export interface ITrendLine {
278
267
  seriesIndex: number;
@@ -289,6 +278,51 @@ export interface ITrendLine {
289
278
  r2Color?: string;
290
279
  formulaColor?: string;
291
280
  }
281
+ export interface IWaterfallPointRole {
282
+ seriesIndex: number;
283
+ dataPointIndex: number;
284
+ role: ChartWaterfallPointRole;
285
+ }
286
+ export interface IWaterfallConnectorStyle {
287
+ color?: string;
288
+ width?: number;
289
+ opacity?: number;
290
+ dashType?: ChartBorderDashType;
291
+ }
292
+ export interface IChartAxisBinding {
293
+ dimension: ChartAxisDimension;
294
+ position: IRuntimeAxisPosition;
295
+ }
296
+ export interface IChartMarkLineLabel {
297
+ visible?: boolean;
298
+ text?: string;
299
+ position?: ChartMarkLineLabelPosition;
300
+ color?: string;
301
+ fontSize?: number;
302
+ bold?: boolean;
303
+ }
304
+ export type IChartMarkLine = {
305
+ label?: IChartMarkLineLabel;
306
+ color?: string;
307
+ width?: number;
308
+ opacity?: number;
309
+ dashType?: ChartBorderDashType;
310
+ } & ({
311
+ axis: ChartSemanticAxis.Category | ChartSemanticAxis.SecondaryCategory;
312
+ categoryIndex: number;
313
+ } | {
314
+ axis: ChartSemanticAxis.PrimaryValue | ChartSemanticAxis.SecondaryValue;
315
+ value: number;
316
+ });
317
+ export interface IBarStyle {
318
+ /** Exchange metadata. Renderers without 3D support may ignore these fields. */
319
+ is3D: boolean;
320
+ shape: BarShape;
321
+ /** OOXML view rotation around the horizontal axis, in degrees. */
322
+ rotX: number;
323
+ /** OOXML view rotation around the vertical axis, in degrees. */
324
+ rotY: number;
325
+ }
292
326
  export interface IChartStyle {
293
327
  runtime: IChartRuntimeContext;
294
328
  /** Runtime-only locale direction. It must not be persisted in chart snapshots. */
@@ -296,13 +330,17 @@ export interface IChartStyle {
296
330
  width: number;
297
331
  height: number;
298
332
  theme: string;
333
+ /** Persisted absolute series colors. A non-empty value overrides theme colors. */
334
+ palette?: string[];
299
335
  invalidValueType: InvalidValueType;
300
336
  gradientFill: boolean;
301
337
  backgroundColor: Nullable<string>;
302
338
  titleFontSize: number;
303
339
  fontSize: number;
304
340
  fontColor: string;
341
+ fontFamily: string;
305
342
  borderColor: Nullable<string>;
343
+ borderWidth: number;
306
344
  titles: {
307
345
  title: Omit<ILabelStyle, 'visible'>;
308
346
  subtitle: Omit<ILabelStyle, 'visible'>;
@@ -323,12 +361,17 @@ export interface IChartStyle {
323
361
  seriesStyleMap: {
324
362
  [id: string]: ISeriesStyle;
325
363
  };
364
+ bar: IBarStyle;
326
365
  trendlines: ITrendLine[];
327
366
  pie: {
328
367
  doughnutHole: Nullable<number>;
368
+ /** Slice offset as a ratio of the pie radius. */
369
+ explosion?: number;
329
370
  labelStyle: IPieLabelStyle;
330
371
  borderColor: string;
331
372
  hasPaddingAngle: boolean;
373
+ /** Exchange metadata. Renderers without 3D support may ignore this field. */
374
+ is3D: boolean;
332
375
  isHalfPie: boolean;
333
376
  rosePie: boolean;
334
377
  showLabelLine: boolean;
@@ -365,7 +408,10 @@ export interface IChartStyle {
365
408
  waterfall: {
366
409
  stackType: WaterfallStackTypeEnum;
367
410
  useSubtotal: boolean;
411
+ pointRoles: IWaterfallPointRole[];
412
+ connector: boolean | IWaterfallConnectorStyle;
368
413
  };
414
+ markLines: IChartMarkLine[];
369
415
  tooltip: {
370
416
  indicatorLabelColor: string;
371
417
  indicatorLineType: ChartBorderDashType;
@@ -375,11 +421,14 @@ export interface IChartStyle {
375
421
  pareto: {
376
422
  lineStyle: ISeriesStyle;
377
423
  barStyle: ISeriesStyle;
424
+ includeZeroValues?: boolean;
378
425
  };
379
426
  heatmap: {
380
427
  visualMapType: 'continuous' | 'piecewise';
381
428
  max?: number;
382
429
  min?: number;
430
+ unit?: string;
431
+ label?: ISeriesLabelStyle;
383
432
  };
384
433
  }
385
434
  export interface IRelationForceOptions {
@@ -413,10 +462,19 @@ export interface IChartRenderSpecConverter<ChartRenderSpec = Record<string, any>
413
462
  }
414
463
  export type ChartConfigInterceptor = (config: IChartConfig) => IChartConfig;
415
464
  export type RenderSpecOperator<ChartRenderSpec> = (spec: ChartRenderSpec, style: ChartStyle, config: IChartConfig, instance: IChartInstance) => void;
416
- export type ChartHostRenderMode = 'image' | 'dom';
465
+ export declare enum ChartHostRenderMode {
466
+ Image = "image",
467
+ Dom = "dom"
468
+ }
469
+ export interface IChartHostBorderStyle {
470
+ color?: string;
471
+ width?: number;
472
+ }
417
473
  export interface IChartHostStyle {
418
474
  stroke?: string;
419
475
  fill?: string;
476
+ border?: IChartHostBorderStyle;
477
+ radius?: number;
420
478
  [key: string]: any;
421
479
  }
422
480
  export interface IChartHostLease extends IDisposable {
@@ -429,7 +487,7 @@ export interface IChartHost extends IDisposable {
429
487
  setStyle(style: IChartHostStyle): void;
430
488
  }
431
489
  export interface IImageChartHost extends IChartHost {
432
- readonly mode: 'image';
490
+ readonly mode: ChartHostRenderMode.Image;
433
491
  nextVersion(): number;
434
492
  commitSnapshot(image: ChartImageSource, version: number): boolean;
435
493
  requestPaint(): void;
@@ -437,7 +495,7 @@ export interface IImageChartHost extends IChartHost {
437
495
  acquireOffscreenHost(rect: IChartHostRect): IChartHostLease;
438
496
  }
439
497
  export interface IDomChartHost extends IChartHost {
440
- readonly mode: 'dom';
498
+ readonly mode: ChartHostRenderMode.Dom;
441
499
  ensureMount(): Promise<HTMLElement | null>;
442
500
  checkMounted(): boolean;
443
501
  syncLayout(): void;
@@ -449,11 +507,28 @@ export interface IChartRenderInput {
449
507
  config: IChartConfig;
450
508
  style: ChartStyle;
451
509
  }
510
+ export interface IChartRenderModelImageExportInput extends IChartRenderInput {
511
+ width: number;
512
+ height: number;
513
+ }
514
+ export interface IChartRenderModelImageExportOptions {
515
+ pixelRatio?: number;
516
+ backgroundColor?: string | null;
517
+ }
518
+ export interface IChartRenderModelImageExportResult {
519
+ dataUrl: string;
520
+ width: number;
521
+ height: number;
522
+ pixelRatio: number;
523
+ }
452
524
  export interface IChartRenderInstance extends IDisposable {
453
525
  readonly mode: ChartHostRenderMode;
454
526
  bind(host: IChartHost): void;
455
527
  render(input: IChartRenderInput): Promise<void>;
528
+ exportImg(): Promise<string | undefined>;
456
529
  resize(): void;
530
+ on(type: ChartElementEventType, handler: ChartElementEventHandler): IDisposable;
531
+ setElementEditMode(enabled: boolean): void;
457
532
  }
458
533
  export interface IChartRenderInstanceStyleInput<Spec = Record<string, any>> extends IChartRenderInput {
459
534
  mode: ChartHostRenderMode;
@@ -478,6 +553,7 @@ export interface IChartRenderModelStylizeInit<Spec> {
478
553
  export interface IChartRenderModel<Spec extends Record<string, any> = Record<string, any>> extends IDisposable {
479
554
  toSpec(chartConfig: IChartConfig, style: ChartStyle): Spec;
480
555
  stylizeSpec(spec: Spec, stylizeInit: IChartRenderModelStylizeInit<Spec>, rect: IChartHostRect): Spec;
556
+ exportImage(input: IChartRenderModelImageExportInput, options?: IChartRenderModelImageExportOptions): Promise<IChartRenderModelImageExportResult>;
481
557
  updateWatermark(addWatermark: boolean): void;
482
558
  createChartInstance(): IChartInstance<Spec>;
483
559
  createChartInstance(mode: ChartHostRenderMode, context?: IChartRenderInstanceCreateContext<Spec>): IChartRenderInstance;
@@ -515,13 +591,60 @@ export interface IChartRenderAsImageOptions {
515
591
  export interface IChartRenderRuntimeOptions {
516
592
  echartsProvider?: any;
517
593
  chartId?: string;
594
+ width?: number;
595
+ height?: number;
596
+ }
597
+ export type ChartElementKind = 'blank' | 'chartArea' | 'title' | 'subtitle' | 'xAxisTitle' | 'yAxisTitle' | 'rightYAxisTitle' | 'xAxisLabel' | 'yAxisLabel' | 'rightYAxisLabel' | 'xAxisLine' | 'yAxisLine' | 'rightYAxisLine' | 'gridLine' | 'tick' | 'legend' | 'legendItem' | 'mark' | 'series' | 'dataPoint' | 'dataLabel';
598
+ export interface IChartElementBounds {
599
+ left: number;
600
+ top: number;
601
+ right: number;
602
+ bottom: number;
603
+ }
604
+ export interface IChartElementOverlay {
605
+ type: 'rect' | 'circle' | 'polyline' | 'polygon' | 'sector';
606
+ bounds: IChartElementBounds;
607
+ shape?: Record<string, any>;
608
+ padding?: number;
609
+ items?: IChartElementOverlay[];
610
+ }
611
+ export interface IChartElementHit {
612
+ kind: ChartElementKind;
613
+ bounds?: IChartElementBounds;
614
+ overlay?: IChartElementOverlay;
615
+ axisId?: 'xAxis' | 'yAxis' | 'rightYAxis';
616
+ axisIndex?: number;
617
+ axisPosition?: 'top' | 'right' | 'bottom' | 'left';
618
+ legendIndex?: number;
619
+ legendName?: string;
620
+ seriesIndex?: number;
621
+ seriesId?: string;
622
+ seriesName?: string;
623
+ dataIndex?: number;
624
+ baseSeriesIndex?: string;
625
+ waterfallSeriesType?: WaterfallSeriesTypeEnum;
626
+ }
627
+ export type ChartElementEventType = 'click' | 'dblclick' | 'pointerdown' | 'pointerup' | 'pointermove' | 'pointerenter' | 'pointerleave';
628
+ export interface IChartElementEvent {
629
+ type: ChartElementEventType;
630
+ hit: IChartElementHit;
631
+ localPoint: {
632
+ x: number;
633
+ y: number;
634
+ };
635
+ button?: number;
636
+ nativeEvent?: Event;
637
+ preventDefault?(): void;
518
638
  }
639
+ export type ChartElementEventHandler = (event: IChartElementEvent) => void;
519
640
  export interface IChartInstance<Spec = Record<string, any>> extends IDisposable {
520
641
  container: HTMLElement | string;
521
642
  mount(id: string | HTMLElement): void;
522
643
  render(spec: Spec, echartsProvider?: any): void;
523
644
  render(spec: Spec, options?: IChartRenderRuntimeOptions): void;
524
645
  renderAsImage(spec: Spec, options: IChartRenderAsImageOptions): Promise<ChartImageSource>;
646
+ on(type: ChartElementEventType, handler: ChartElementEventHandler): IDisposable;
647
+ setElementEditMode(enabled: boolean): void;
525
648
  exportImg(): Promise<string>;
526
649
  resize(): void;
527
650
  }
@@ -3,8 +3,9 @@ export declare const chartBitsUtils: {
3
3
  has(bit: number, attribute: number): boolean;
4
4
  baseOn(bit: number, base: number): boolean;
5
5
  remove(bit: number, attribute: number): number;
6
- chartBitToString(bit: ChartTypeBits): "" | "line" | "wordCloud" | "bar" | "scatter" | "pie" | "radar" | "graph" | "funnel" | "sankey" | "boxplot" | "heatmap" | "combination";
6
+ chartBitToString(bit: ChartTypeBits): "" | "line" | "bar" | "wordCloud" | "scatter" | "pie" | "radar" | "graph" | "funnel" | "sankey" | "boxplot" | "heatmap" | "combination";
7
7
  };
8
+ export declare function mergeChartConfig<T extends object>(current: T | undefined, update: Partial<T>): T;
8
9
  export declare const setProperty: (data: Record<string, any>, propertyPath: string, value: any) => void;
9
10
  export declare const getProperty: <T = any>(data: Record<string, any> | undefined, propertyPath: string) => T | undefined;
10
11
  /**
@@ -17,15 +18,12 @@ interface ISize {
17
18
  width: number;
18
19
  height: number;
19
20
  }
20
- export declare const ChartTextMeasureCache: Map<string, ISize>;
21
21
  export declare const calcPosition: (text: string, font: string) => ISize;
22
- export declare const clearChartTextMeasureCache: () => void;
23
22
  /**
24
23
  * We define the chart type can use trend line. In excel it also can use for combined chart ro bar chart.
25
24
  * @param {ChartTypeBits} chartType The test chart type.
26
25
  * @returns {boolean} If the chart type can use trend line, return true, otherwise return false.
27
26
  */
28
27
  export declare const chartTypeCanUseTrendLine: (chartType: ChartTypeBits) => boolean;
29
- export declare const numfmtRedCache: Map<string, boolean>;
30
28
  export declare function isNegativeRedCached(fmt: string): boolean | undefined;
31
29
  export {};
@@ -0,0 +1,4 @@
1
+ /** Deep-clones a value while removing own properties whose value is undefined. */
2
+ export declare function cloneWithoutUndefined<T>(value: T): T;
3
+ /** Returns an undefined-free record, or undefined when no fields remain. */
4
+ export declare function compactRecord<T extends object>(value: T): T | undefined;
@@ -1,7 +1,7 @@
1
- import type { echarts as EchartsType } from '../../../utils/echarts';
1
+ import type { echarts } from '../../../utils/echarts';
2
2
  import { WORD_CLOUD_SERIES_TYPE } from './echarts-options';
3
3
  export interface IRegisterWordCloudChartViewContext {
4
4
  createTextElement(layout: any, data: any, dataIndex: number, seriesModel: any): unknown;
5
5
  }
6
- export declare function registerWordCloudChartView(echarts: typeof EchartsType, context: IRegisterWordCloudChartViewContext): void;
6
+ export declare function registerWordCloudChartView(echartsInstance: typeof echarts, context: IRegisterWordCloudChartViewContext): void;
7
7
  export { WORD_CLOUD_SERIES_TYPE };
@@ -1,5 +1,5 @@
1
- import type { echarts as EchartsType } from '../../../utils/echarts';
1
+ import type { echarts } from '../../../utils/echarts';
2
2
  import type { IWordCloudEChartsSeriesOption } from '../../types';
3
- export declare function registerWordCloudChart(echarts: typeof EchartsType): typeof EchartsType;
3
+ export declare function registerWordCloudChart(echartsInstance: typeof echarts): typeof echarts;
4
4
  export declare function waitForWordCloudImageResourcesReady(spec: unknown, timeout?: number): Promise<void>;
5
5
  export type { IWordCloudEChartsSeriesOption };
@@ -1,5 +1,5 @@
1
- import type { echarts as EchartsType } from '../../../utils/echarts';
1
+ import type { echarts } from '../../../utils/echarts';
2
2
  import { WORD_CLOUD_SERIES_TYPE } from './echarts-options';
3
3
  export type PerformWordCloudSeriesLayout = (seriesModel: unknown, ecModel: unknown, api: unknown) => void;
4
- export declare function registerWordCloudLayout(echarts: typeof EchartsType, performSeriesLayout: PerformWordCloudSeriesLayout): void;
4
+ export declare function registerWordCloudLayout(echartsInstance: typeof echarts, performSeriesLayout: PerformWordCloudSeriesLayout): void;
5
5
  export { WORD_CLOUD_SERIES_TYPE };
@@ -1,7 +1,7 @@
1
- import type { echarts as EchartsType } from '../../../utils/echarts';
1
+ import type { echarts } from '../../../utils/echarts';
2
2
  import { WORD_CLOUD_DEFAULT_OPTION, WORD_CLOUD_SERIES_TYPE } from './echarts-options';
3
3
  export interface IWordCloudEChartsHelper {
4
4
  createDimensions(data: any[], options: Record<string, unknown>): any;
5
5
  }
6
- export declare function registerWordCloudSeriesModel(echarts: typeof EchartsType, helper: IWordCloudEChartsHelper): void;
6
+ export declare function registerWordCloudSeriesModel(echartsInstance: typeof echarts, helper: IWordCloudEChartsHelper): void;
7
7
  export { WORD_CLOUD_DEFAULT_OPTION, WORD_CLOUD_SERIES_TYPE };
@@ -1,5 +1,5 @@
1
1
  import type { IWordCloudEncodedWord } from '../../types';
2
- import type { IBoxFootprint, IWordCloudLayoutGrid } from '../layout/types';
2
+ import type { IBoxFootprint, IWordCloudLayoutGrid } from '../types/layout';
3
3
  import type { ICollisionCandidate, ICollisionEngine, ICollisionEngineStats, ICollisionTextStyle } from './engine';
4
4
  export declare class BoxShapeEngine implements ICollisionEngine<IBoxFootprint> {
5
5
  private readonly _grid;
@@ -1,5 +1,5 @@
1
1
  import type { IWordCloudBounds, IWordCloudClipMask, IWordCloudEncodedWord, IWordCloudTextMeasurer, IWordCloudTextSprite } from '../../types';
2
- import type { IWordCloudLayoutGrid } from '../layout/types';
2
+ import type { IWordCloudLayoutGrid } from '../types/layout';
3
3
  export type WordCloudCollisionShape = 'box' | 'glyph';
4
4
  export type WordCloudRejectReason = 'collision' | 'shape';
5
5
  export interface ICollisionEngineStats {
@@ -1,5 +1,5 @@
1
1
  import type { IWordCloudBounds, IWordCloudMeasureResult } from '../../types';
2
- import type { IBoxFootprint, IWordCloudLayoutGrid } from './types';
2
+ import type { IBoxFootprint, IWordCloudLayoutGrid } from '../types/layout';
3
3
  export interface IBoxTightTextBox {
4
4
  readonly width: number;
5
5
  readonly height: number;
@@ -1,5 +1,5 @@
1
1
  import type { IWordCloudBounds, IWordCloudClipMask, IWordCloudEncodedWord, IWordCloudTextMeasurer } from '../../types';
2
- import type { IWordCloudLayoutGrid } from '../layout/types';
2
+ import type { IWordCloudLayoutGrid } from '../types/layout';
3
3
  import type { IPixelBitsetSprite } from './bitset-board';
4
4
  import type { ICollisionCandidate, ICollisionEngine, ICollisionFootprint, ICollisionTextStyle } from './engine';
5
5
  interface IPixelSpan {
@@ -1,4 +1,4 @@
1
- import type { IBoxFootprint, IWordCloudLayoutGrid } from './types';
1
+ import type { IBoxFootprint, IWordCloudLayoutGrid } from '../types/layout';
2
2
  export declare function createWordCloudGrid(width: number, height: number, cellSize: number): IWordCloudLayoutGrid;
3
3
  export declare function getCellCenter(grid: IWordCloudLayoutGrid, index: number): {
4
4
  row: number;
@@ -1,7 +1,7 @@
1
1
  import type { ICollisionCandidate } from '../collision/engine';
2
2
  import type { IWordCloudShapeProfile } from '../shape/shape-profile';
3
+ import type { IPreparedWordCloudWord, IWordCloudLayoutConfig, IWordCloudLayoutGrid, IWordCloudLayoutRuntime } from '../types/layout';
3
4
  import type { IWordCloudPlacementContext } from './placement-types';
4
- import type { IPreparedWordCloudWord, IWordCloudLayoutConfig, IWordCloudLayoutGrid, IWordCloudLayoutRuntime } from './types';
5
5
  export interface IEnumerateCandidatePointsOptions {
6
6
  readonly grid: IWordCloudLayoutGrid;
7
7
  readonly shapeGrid: Uint8Array;
@@ -1,3 +1,3 @@
1
1
  import type { IWordCloudLayoutOptions } from '../../types';
2
- import type { IWordCloudLayoutConfig } from './types';
2
+ import type { IWordCloudLayoutConfig } from '../types/layout';
3
3
  export declare function resolveWordCloudLayoutConfig(options: IWordCloudLayoutOptions): IWordCloudLayoutConfig;
@@ -1,4 +1,3 @@
1
1
  import type { IWordCloudEncodedWord, IWordCloudLayoutOptions, IWordCloudLayoutResult } from '../../types';
2
- import type { IWordCloudLayoutRuntime } from './types';
2
+ import type { IWordCloudLayoutRuntime } from '../types/layout';
3
3
  export declare function layoutWordCloudGridWords(words: readonly IWordCloudEncodedWord[], options: IWordCloudLayoutOptions, runtime: IWordCloudLayoutRuntime): IWordCloudLayoutResult;
4
- export declare const layoutWordCloud: typeof layoutWordCloudGridWords;
@@ -1,6 +1,6 @@
1
1
  import type { IWordCloudEncodedWord, IWordCloudPlacedWord } from '../../types';
2
- import type { IPreparedWordCloudWord, IWordCloudLayoutConfig, IWordCloudLayoutGrid, IWordCloudLayoutRuntime } from './types';
3
2
  import type { IWordCloudShapeProfile } from '../shape/shape-profile';
3
+ import type { IPreparedWordCloudWord, IWordCloudLayoutConfig, IWordCloudLayoutGrid, IWordCloudLayoutRuntime } from '../types/layout';
4
4
  import { layoutWords } from './place-word';
5
5
  export interface IWordCloudLayoutPhasesResult {
6
6
  readonly prepared: IPreparedWordCloudWord[];
@@ -1,7 +1,7 @@
1
1
  import type { IWordCloudLayoutStats, IWordCloudPlacedWord } from '../../types';
2
+ import type { IPreparedWordCloudWord, IWordCloudPlacement } from '../types/layout';
2
3
  import type { IWordCloudPlacementContext, IWordCloudTryPlaceResult } from './placement-types';
3
4
  import type { PlacementSearchPlan } from './search-plan';
4
- import type { IPreparedWordCloudWord, IWordCloudPlacement } from './types';
5
5
  export declare function tryPlaceWord(context: IWordCloudPlacementContext, word: IPreparedWordCloudWord, phase: 1 | 2, rank: number, searchPlan?: Extract<PlacementSearchPlan, {
6
6
  action: 'process';
7
7
  }>): IWordCloudTryPlaceResult;
@@ -1,6 +1,6 @@
1
1
  import type { IWordCloudLayoutStats, IWordCloudPlacedWord } from '../../types';
2
+ import type { IPreparedWordCloudWord, IWordCloudLayoutConfig } from '../types/layout';
2
3
  import type { IWordCloudTryPlaceResult } from './placement-types';
3
- import type { IPreparedWordCloudWord, IWordCloudLayoutConfig } from './types';
4
4
  export declare function createPlacementStats(): IWordCloudLayoutStats;
5
5
  export declare function recordPlacementResult(stats: IWordCloudLayoutStats | undefined, result: IWordCloudTryPlaceResult): void;
6
6
  export declare function recordSkippedPlacementResult(stats: IWordCloudLayoutStats | undefined, count?: number): void;
@@ -2,8 +2,8 @@ import type { IWordCloudLayoutStats } from '../../types';
2
2
  import type { ICollisionCandidate, ICollisionEngine } from '../collision/engine';
3
3
  import type { WordCloudFailureCache } from '../collision/failure-cache';
4
4
  import type { IWordCloudShapeProfile } from '../shape/shape-profile';
5
+ import type { IWordCloudLayoutConfig, IWordCloudLayoutGrid, IWordCloudLayoutRuntime, IWordCloudPlacement } from '../types/layout';
5
6
  import type { PlacementWordManager } from './placement-word-manager';
6
- import type { IWordCloudLayoutConfig, IWordCloudLayoutGrid, IWordCloudLayoutRuntime, IWordCloudPlacement } from './types';
7
7
  export interface IWordCloudPlacementContext {
8
8
  readonly config: IWordCloudLayoutConfig;
9
9
  readonly runtime: IWordCloudLayoutRuntime;
@@ -1,6 +1,6 @@
1
1
  import type { IWordCloudEncodedWord } from '../../types';
2
2
  import type { ICollisionEngine, ICollisionFootprint } from '../collision/engine';
3
- import type { IPreparedWordCloudWord, IWordCloudLayoutConfig, IWordCloudLayoutRuntime } from './types';
3
+ import type { IPreparedWordCloudWord, IWordCloudLayoutConfig, IWordCloudLayoutRuntime } from '../types/layout';
4
4
  export interface IResolvedPlacementWord {
5
5
  readonly word: IWordCloudEncodedWord;
6
6
  readonly footprint: ICollisionFootprint;
@@ -1,6 +1,6 @@
1
1
  import type { IWordCloudBounds, IWordCloudEncodedWord } from '../../types';
2
2
  import type { ICollisionCandidate, ICollisionEngine, ICollisionFootprint } from '../collision/engine';
3
- import type { IWordCloudLayoutConfig, IWordCloudLayoutRuntime } from './types';
3
+ import type { IWordCloudLayoutConfig, IWordCloudLayoutRuntime } from '../types/layout';
4
4
  export declare function isCandidateInsideLayout(collisionEngine: ICollisionEngine, footprint: ICollisionFootprint, candidate: ICollisionCandidate, config: IWordCloudLayoutConfig): boolean;
5
5
  export declare function runtimeMaskNeedsBounds(word: IWordCloudEncodedWord, runtime: IWordCloudLayoutRuntime, config: IWordCloudLayoutConfig): boolean;
6
6
  export declare function isCandidateInsideRuntimeMask(word: IWordCloudEncodedWord, bounds: IWordCloudBounds, runtime: IWordCloudLayoutRuntime, config: IWordCloudLayoutConfig): boolean;
@@ -1,3 +1,3 @@
1
1
  import type { IWordCloudEncodedWord } from '../../types';
2
- import type { IPreparedWordCloudWord, IWordCloudLayoutConfig } from './types';
2
+ import type { IPreparedWordCloudWord, IWordCloudLayoutConfig } from '../types/layout';
3
3
  export declare function prepareWordCloudWords(words: readonly IWordCloudEncodedWord[], config: IWordCloudLayoutConfig): IPreparedWordCloudWord[];
@@ -1,5 +1,5 @@
1
1
  import type { IWordCloudLayoutOptions, IWordCloudMaskGrid, WordCloudShape } from '../../types';
2
- import type { IWordCloudLayoutGrid, IWordCloudLayoutRuntime } from './types';
2
+ import type { IWordCloudLayoutGrid, IWordCloudLayoutRuntime } from '../types/layout';
3
3
  export interface IWordCloudShapeGridOptions {
4
4
  sampleSize?: number;
5
5
  insideRatio?: number;
@@ -1,10 +1,11 @@
1
+ export { WORD_CLOUD_DEFAULT_OPTION, WORD_CLOUD_SERIES_TYPE } from './adapters/echarts/echarts-options';
2
+ export { registerWordCloudChart } from './adapters/echarts/install';
1
3
  export { layoutWordCloudChart, resolveLayoutOptions } from './canvas';
2
4
  export * from './core/layout/font-scale';
3
- export { createBuiltinMaskGrid, createMaskGridFromShape, createTextMaskGrid, normalizeMaskGrid, segmentMaskGrid } from './core/shape/built-in-shapes';
5
+ export { createBuiltinMaskGrid, createMaskGridFromShape, createTextMaskGrid, normalizeMaskGrid, segmentMaskGrid, } from './core/shape/built-in-shapes';
4
6
  export { encodeWordCloudWords } from './core/text/formatter';
5
7
  export { normalizeWordCloudData } from './core/text/normalize';
6
8
  export { DEFAULT_WORD_CLOUD_CHART_SPEC, resolveWordCloudSpec } from './defaults';
7
- export { registerWordCloudChart, WORD_CLOUD_DEFAULT_OPTION, WORD_CLOUD_SERIES_TYPE } from './echarts';
8
9
  export type { INormalizedWordCloudDatum, IResolvedWordCloudSpec, IWordCloudBounds, IWordCloudChartSpec, IWordCloudDataSource, IWordCloudEChartsMaskSource, IWordCloudEChartsSeriesDataItem, IWordCloudEChartsSeriesOption, IWordCloudEncodedWord, IWordCloudEncoding, IWordCloudFieldMapping, IWordCloudLayoutMask, IWordCloudLayoutOptions, IWordCloudLayoutResult, IWordCloudMaskGrid, IWordCloudMaskShapeSpec, IWordCloudPlacedWord, IWordCloudProtocolSpec, IWordCloudSegmentationRegion, IWordCloudSegmentationResult, IWordCloudSeriesDataItem, IWordCloudSeriesOption, IWordCloudSpecBase, IWordCloudTextMarkAttrs, IWordCloudTextMarkSpec, IWordCloudTextMeasurer, IWordCloudTextSprite, WordCloudFontSizeRange, WordCloudShape, } from './types';
9
10
  export { DEFAULT_WORD_CLOUD_SHAPE, normalizeWordCloudShape, SUPPORTED_WORD_CLOUD_SHAPES } from './types';
10
11
  export { DEFAULT_WORD_CLOUD_RENDER_CONFIG, resolveWordCloudRenderConfig, } from './word-cloud-render-config';
@@ -31,6 +31,8 @@ export type IWordCloudEChartsMaskSource = {
31
31
  };
32
32
  export interface IWordCloudEChartsSeriesOption {
33
33
  type: 'wordCloud';
34
+ /** Selected weight-measure name carried from the compact chart-model series. */
35
+ name?: string;
34
36
  data?: IWordCloudEChartsSeriesDataItem[];
35
37
  left?: number | string;
36
38
  top?: number | string;