@visactor/vchart 1.7.3 → 1.7.5

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 (221) hide show
  1. package/build/es5/index.js +1 -1
  2. package/build/index.js +29779 -32796
  3. package/build/index.min.js +1 -1
  4. package/build/tsconfig.tsbuildinfo +1 -1
  5. package/cjs/chart/base-chart.js +3 -2
  6. package/cjs/chart/base-chart.js.map +1 -1
  7. package/cjs/component/axis/base-axis.d.ts +5 -2
  8. package/cjs/component/axis/base-axis.js +41 -14
  9. package/cjs/component/axis/base-axis.js.map +1 -1
  10. package/cjs/component/axis/cartesian/axis.d.ts +2 -1
  11. package/cjs/component/axis/cartesian/axis.js +10 -28
  12. package/cjs/component/axis/cartesian/axis.js.map +1 -1
  13. package/cjs/component/axis/cartesian/time-axis.js +9 -17
  14. package/cjs/component/axis/cartesian/time-axis.js.map +1 -1
  15. package/cjs/component/axis/mixin/linear-axis-mixin.js +11 -15
  16. package/cjs/component/axis/mixin/linear-axis-mixin.js.map +1 -1
  17. package/cjs/component/axis/polar/axis.d.ts +2 -0
  18. package/cjs/component/axis/polar/axis.js +10 -26
  19. package/cjs/component/axis/polar/axis.js.map +1 -1
  20. package/cjs/component/brush/brush.js +2 -3
  21. package/cjs/component/brush/brush.js.map +1 -1
  22. package/cjs/component/data-zoom/data-zoom/data-zoom.js +26 -24
  23. package/cjs/component/data-zoom/data-zoom/data-zoom.js.map +1 -1
  24. package/cjs/component/geo/projection.js +10 -6
  25. package/cjs/component/geo/projection.js.map +1 -1
  26. package/cjs/component/label/label.d.ts +2 -1
  27. package/cjs/component/label/label.js +13 -8
  28. package/cjs/component/label/label.js.map +1 -1
  29. package/cjs/component/label/util.d.ts +1 -8
  30. package/cjs/component/label/util.js +6 -11
  31. package/cjs/component/label/util.js.map +1 -1
  32. package/cjs/component/marker/base-marker.js +4 -10
  33. package/cjs/component/marker/base-marker.js.map +1 -1
  34. package/cjs/component/marker/mark-area/mark-area.js +16 -15
  35. package/cjs/component/marker/mark-area/mark-area.js.map +1 -1
  36. package/cjs/component/marker/mark-line/mark-line.js +22 -21
  37. package/cjs/component/marker/mark-line/mark-line.js.map +1 -1
  38. package/cjs/component/marker/mark-point/mark-point.js +30 -26
  39. package/cjs/component/marker/mark-point/mark-point.js.map +1 -1
  40. package/cjs/constant/index.d.ts +2 -1
  41. package/cjs/constant/index.js +1 -1
  42. package/cjs/constant/index.js.map +1 -1
  43. package/cjs/core/index.d.ts +1 -1
  44. package/cjs/core/index.js +1 -1
  45. package/cjs/core/index.js.map +1 -1
  46. package/cjs/event/events/dimension/util/cartesian.js +5 -17
  47. package/cjs/event/events/dimension/util/cartesian.js.map +1 -1
  48. package/cjs/event/events/dimension/util/common.d.ts +1 -0
  49. package/cjs/event/events/dimension/util/common.js +9 -1
  50. package/cjs/event/events/dimension/util/common.js.map +1 -1
  51. package/cjs/event/events/dimension/util/polar.js +4 -17
  52. package/cjs/event/events/dimension/util/polar.js.map +1 -1
  53. package/cjs/event/events/index.d.ts +1 -0
  54. package/cjs/event/events/index.js +16 -1
  55. package/cjs/event/events/index.js.map +1 -1
  56. package/cjs/event/index.d.ts +2 -0
  57. package/cjs/event/index.js +21 -0
  58. package/cjs/event/index.js.map +1 -0
  59. package/cjs/index.d.ts +1 -0
  60. package/cjs/index.js +2 -1
  61. package/cjs/index.js.map +1 -1
  62. package/cjs/interaction/interface.js +1 -1
  63. package/cjs/region/interface.d.ts +1 -0
  64. package/cjs/region/interface.js.map +1 -1
  65. package/cjs/region/region.d.ts +3 -0
  66. package/cjs/region/region.js +26 -14
  67. package/cjs/region/region.js.map +1 -1
  68. package/cjs/series/area/area.js +8 -8
  69. package/cjs/series/area/area.js.map +1 -1
  70. package/cjs/series/area/interface.d.ts +2 -2
  71. package/cjs/series/area/interface.js.map +1 -1
  72. package/cjs/series/bar/bar.js +3 -3
  73. package/cjs/series/bar/bar.js.map +1 -1
  74. package/cjs/series/bar/interface.d.ts +2 -2
  75. package/cjs/series/bar/interface.js.map +1 -1
  76. package/cjs/series/base/base-series.js +2 -1
  77. package/cjs/series/base/base-series.js.map +1 -1
  78. package/cjs/series/circle-packing/circle-packing.js +2 -2
  79. package/cjs/series/circle-packing/circle-packing.js.map +1 -1
  80. package/cjs/series/correlation/correlation.js +30 -26
  81. package/cjs/series/correlation/correlation.js.map +1 -1
  82. package/cjs/series/dot/dot.js +2 -2
  83. package/cjs/series/dot/dot.js.map +1 -1
  84. package/cjs/series/funnel/funnel.js +8 -8
  85. package/cjs/series/funnel/funnel.js.map +1 -1
  86. package/cjs/series/line/interface.d.ts +2 -2
  87. package/cjs/series/line/interface.js.map +1 -1
  88. package/cjs/series/mixin/line-mixin.js +1 -0
  89. package/cjs/series/mixin/line-mixin.js.map +1 -1
  90. package/cjs/series/pie/pie.d.ts +2 -0
  91. package/cjs/series/pie/pie.js +29 -23
  92. package/cjs/series/pie/pie.js.map +1 -1
  93. package/cjs/series/rose/rose.d.ts +3 -0
  94. package/cjs/series/rose/rose.js +15 -2
  95. package/cjs/series/rose/rose.js.map +1 -1
  96. package/cjs/series/sankey/sankey.js +8 -7
  97. package/cjs/series/sankey/sankey.js.map +1 -1
  98. package/cjs/series/scatter/interface.d.ts +2 -2
  99. package/cjs/series/scatter/interface.js.map +1 -1
  100. package/cjs/series/waterfall/waterfall.js +2 -2
  101. package/cjs/series/waterfall/waterfall.js.map +1 -1
  102. package/cjs/series/word-cloud/base.d.ts +3 -0
  103. package/cjs/series/word-cloud/base.js +86 -73
  104. package/cjs/series/word-cloud/base.js.map +1 -1
  105. package/cjs/series/word-cloud/word-cloud-3d.d.ts +22 -1
  106. package/cjs/series/word-cloud/word-cloud-3d.js +29 -148
  107. package/cjs/series/word-cloud/word-cloud-3d.js.map +1 -1
  108. package/cjs/typings/spec/chart.d.ts +2 -1
  109. package/cjs/typings/spec/chart.js.map +1 -1
  110. package/cjs/util/model.d.ts +1 -0
  111. package/cjs/util/model.js +15 -1
  112. package/cjs/util/model.js.map +1 -1
  113. package/esm/chart/base-chart.js +3 -2
  114. package/esm/chart/base-chart.js.map +1 -1
  115. package/esm/component/axis/base-axis.d.ts +5 -2
  116. package/esm/component/axis/base-axis.js +47 -13
  117. package/esm/component/axis/base-axis.js.map +1 -1
  118. package/esm/component/axis/cartesian/axis.d.ts +2 -1
  119. package/esm/component/axis/cartesian/axis.js +9 -34
  120. package/esm/component/axis/cartesian/axis.js.map +1 -1
  121. package/esm/component/axis/cartesian/time-axis.js +9 -17
  122. package/esm/component/axis/cartesian/time-axis.js.map +1 -1
  123. package/esm/component/axis/mixin/linear-axis-mixin.js +7 -5
  124. package/esm/component/axis/mixin/linear-axis-mixin.js.map +1 -1
  125. package/esm/component/axis/polar/axis.d.ts +2 -0
  126. package/esm/component/axis/polar/axis.js +9 -32
  127. package/esm/component/axis/polar/axis.js.map +1 -1
  128. package/esm/component/brush/brush.js +2 -3
  129. package/esm/component/brush/brush.js.map +1 -1
  130. package/esm/component/data-zoom/data-zoom/data-zoom.js +26 -24
  131. package/esm/component/data-zoom/data-zoom/data-zoom.js.map +1 -1
  132. package/esm/component/geo/projection.js +10 -6
  133. package/esm/component/geo/projection.js.map +1 -1
  134. package/esm/component/label/label.d.ts +2 -1
  135. package/esm/component/label/label.js +12 -8
  136. package/esm/component/label/label.js.map +1 -1
  137. package/esm/component/label/util.d.ts +1 -8
  138. package/esm/component/label/util.js +2 -8
  139. package/esm/component/label/util.js.map +1 -1
  140. package/esm/component/marker/base-marker.js +5 -9
  141. package/esm/component/marker/base-marker.js.map +1 -1
  142. package/esm/component/marker/mark-area/mark-area.js +16 -15
  143. package/esm/component/marker/mark-area/mark-area.js.map +1 -1
  144. package/esm/component/marker/mark-line/mark-line.js +22 -21
  145. package/esm/component/marker/mark-line/mark-line.js.map +1 -1
  146. package/esm/component/marker/mark-point/mark-point.js +30 -26
  147. package/esm/component/marker/mark-point/mark-point.js.map +1 -1
  148. package/esm/constant/index.d.ts +2 -1
  149. package/esm/constant/index.js +1 -1
  150. package/esm/constant/index.js.map +1 -1
  151. package/esm/core/index.d.ts +1 -1
  152. package/esm/core/index.js +1 -1
  153. package/esm/core/index.js.map +1 -1
  154. package/esm/event/events/dimension/util/cartesian.js +7 -18
  155. package/esm/event/events/dimension/util/cartesian.js.map +1 -1
  156. package/esm/event/events/dimension/util/common.d.ts +1 -0
  157. package/esm/event/events/dimension/util/common.js +5 -0
  158. package/esm/event/events/dimension/util/common.js.map +1 -1
  159. package/esm/event/events/dimension/util/polar.js +6 -17
  160. package/esm/event/events/dimension/util/polar.js.map +1 -1
  161. package/esm/event/events/index.d.ts +1 -0
  162. package/esm/event/events/index.js +2 -0
  163. package/esm/event/events/index.js.map +1 -1
  164. package/esm/event/index.d.ts +2 -0
  165. package/esm/event/index.js +4 -0
  166. package/esm/event/index.js.map +1 -0
  167. package/esm/index.d.ts +1 -0
  168. package/esm/index.js +2 -0
  169. package/esm/index.js.map +1 -1
  170. package/esm/interaction/interface.js +1 -1
  171. package/esm/region/interface.d.ts +1 -0
  172. package/esm/region/interface.js.map +1 -1
  173. package/esm/region/region.d.ts +3 -0
  174. package/esm/region/region.js +26 -14
  175. package/esm/region/region.js.map +1 -1
  176. package/esm/series/area/area.js +8 -8
  177. package/esm/series/area/area.js.map +1 -1
  178. package/esm/series/area/interface.d.ts +2 -2
  179. package/esm/series/area/interface.js.map +1 -1
  180. package/esm/series/bar/bar.js +3 -3
  181. package/esm/series/bar/bar.js.map +1 -1
  182. package/esm/series/bar/interface.d.ts +2 -2
  183. package/esm/series/bar/interface.js.map +1 -1
  184. package/esm/series/base/base-series.js +2 -1
  185. package/esm/series/base/base-series.js.map +1 -1
  186. package/esm/series/circle-packing/circle-packing.js +2 -2
  187. package/esm/series/circle-packing/circle-packing.js.map +1 -1
  188. package/esm/series/correlation/correlation.js +30 -26
  189. package/esm/series/correlation/correlation.js.map +1 -1
  190. package/esm/series/dot/dot.js +2 -2
  191. package/esm/series/dot/dot.js.map +1 -1
  192. package/esm/series/funnel/funnel.js +8 -8
  193. package/esm/series/funnel/funnel.js.map +1 -1
  194. package/esm/series/line/interface.d.ts +2 -2
  195. package/esm/series/line/interface.js.map +1 -1
  196. package/esm/series/mixin/line-mixin.js +1 -0
  197. package/esm/series/mixin/line-mixin.js.map +1 -1
  198. package/esm/series/pie/pie.d.ts +2 -0
  199. package/esm/series/pie/pie.js +26 -19
  200. package/esm/series/pie/pie.js.map +1 -1
  201. package/esm/series/rose/rose.d.ts +3 -0
  202. package/esm/series/rose/rose.js +15 -2
  203. package/esm/series/rose/rose.js.map +1 -1
  204. package/esm/series/sankey/sankey.js +8 -7
  205. package/esm/series/sankey/sankey.js.map +1 -1
  206. package/esm/series/scatter/interface.d.ts +2 -2
  207. package/esm/series/scatter/interface.js.map +1 -1
  208. package/esm/series/waterfall/waterfall.js +1 -3
  209. package/esm/series/waterfall/waterfall.js.map +1 -1
  210. package/esm/series/word-cloud/base.d.ts +3 -0
  211. package/esm/series/word-cloud/base.js +86 -73
  212. package/esm/series/word-cloud/base.js.map +1 -1
  213. package/esm/series/word-cloud/word-cloud-3d.d.ts +22 -1
  214. package/esm/series/word-cloud/word-cloud-3d.js +29 -153
  215. package/esm/series/word-cloud/word-cloud-3d.js.map +1 -1
  216. package/esm/typings/spec/chart.d.ts +2 -1
  217. package/esm/typings/spec/chart.js.map +1 -1
  218. package/esm/util/model.d.ts +1 -0
  219. package/esm/util/model.js +12 -0
  220. package/esm/util/model.js.map +1 -1
  221. package/package.json +9 -9
@@ -21,6 +21,7 @@ export declare class BaseWordCloudSeries<T extends IBaseWordCloudSeriesSpec = IB
21
21
  protected _colorList: string[];
22
22
  protected _rotateAngles?: number[];
23
23
  protected _fontWeightRange?: [number, number];
24
+ protected _textField?: string;
24
25
  protected _fontSizeRange?: [number, number];
25
26
  setFontSizeRange(fontSizeRange: [number, number]): void;
26
27
  protected _maskShape?: string | WordCloudShapeType;
@@ -46,6 +47,8 @@ export declare class BaseWordCloudSeries<T extends IBaseWordCloudSeriesSpec = IB
46
47
  field: string;
47
48
  };
48
49
  compile(): void;
50
+ protected _wordCloudTransformOption(): Object;
51
+ protected _wordCloudShapeTransformOption(): Object;
49
52
  getStatisticFields(): {
50
53
  key: string;
51
54
  operations: Array<'max' | 'min' | 'values'>;
@@ -38,7 +38,7 @@ export class BaseWordCloudSeries extends BaseSeries {
38
38
  isValid(fontSizeRange) ? this._fontSizeRange = fontSizeRange : this._fontSizeRange = DEFAULT_FONTSIZE_RANGE;
39
39
  }
40
40
  setAttrFromSpec() {
41
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v;
41
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
42
42
  super.setAttrFromSpec(), this._padding = this._option.getChart().padding, this._nameField = this._spec.nameField,
43
43
  this._fontFamilyField = this._spec.fontFamilyField, this._fontWeightField = this._spec.fontWeightField,
44
44
  this._fontStyleField = this._spec.fontStyleField, this._colorHexField = this._spec.colorHexField,
@@ -48,7 +48,8 @@ export class BaseWordCloudSeries extends BaseSeries {
48
48
  this._rotateAngles = null !== (_c = this._spec.rotateAngles) && void 0 !== _c ? _c : DEFAULT_ROTATE_ANGLES,
49
49
  this.setFontSizeRange(this._spec.fontSizeRange), this._maskShape = null !== (_d = this._spec.maskShape) && void 0 !== _d ? _d : DEFAULT_MASK_SHAPE,
50
50
  this._keepAspect = this._spec.keepAspect, this._random = null !== (_e = this._spec.random) && void 0 !== _e ? _e : DEFAULT_RANDOM,
51
- this._fontPadding = null !== (_m = null !== (_h = null === (_g = null === (_f = this._spec) || void 0 === _f ? void 0 : _f.word) || void 0 === _g ? void 0 : _g.padding) && void 0 !== _h ? _h : null === (_l = null === (_k = null === (_j = this._theme) || void 0 === _j ? void 0 : _j.wordCloud) || void 0 === _k ? void 0 : _k.word) || void 0 === _l ? void 0 : _l.padding) && void 0 !== _m ? _m : DEFAULT_FONT_PADDING,
51
+ this._fontPadding = null !== (_g = null === (_f = this._spec.word) || void 0 === _f ? void 0 : _f.padding) && void 0 !== _g ? _g : DEFAULT_FONT_PADDING,
52
+ this._textField = (null === (_h = this._spec.word) || void 0 === _h ? void 0 : _h.formatMethod) ? WORD_CLOUD_TEXT : this._nameField,
52
53
  this._wordCloudConfig = Object.assign({
53
54
  drawOutOfBound: DEFAULT_DRAW_OUT_OF_BOUND,
54
55
  layoutMode: "default",
@@ -57,8 +58,7 @@ export class BaseWordCloudSeries extends BaseSeries {
57
58
  fillingSeriesField: this.getSeriesField(),
58
59
  fillingRotateAngles: DEFAULT_ROTATE_ANGLES,
59
60
  layoutMode: "default"
60
- }, null === (_o = this._spec) || void 0 === _o ? void 0 : _o.wordCloudShapeConfig),
61
- this._fillingFontPadding = null !== (_v = null !== (_r = null === (_q = null === (_p = this._spec) || void 0 === _p ? void 0 : _p.fillingWord) || void 0 === _q ? void 0 : _q.padding) && void 0 !== _r ? _r : null === (_u = null === (_t = null === (_s = this._theme) || void 0 === _s ? void 0 : _s.wordCloud) || void 0 === _t ? void 0 : _t.fillingWord) || void 0 === _u ? void 0 : _u.padding) && void 0 !== _v ? _v : DEFAULT_FONT_PADDING,
61
+ }, this._spec.wordCloudShapeConfig), this._fillingFontPadding = null !== (_k = null === (_j = this._spec.fillingWord) || void 0 === _j ? void 0 : _j.padding) && void 0 !== _k ? _k : DEFAULT_FONT_PADDING,
62
62
  this._isWordCloudShape = !SHAPE_TYPE.includes(this._maskShape), this._defaultFontFamily = this._option.getTheme().fontFamily;
63
63
  }
64
64
  initMark() {
@@ -69,11 +69,11 @@ export class BaseWordCloudSeries extends BaseSeries {
69
69
  }), this._isWordCloudShape && (this._fillingWordMark = this._createMark(BaseWordCloudSeries.mark.fillingWord));
70
70
  }
71
71
  initMarkStyle() {
72
- var _a, _b, _c, _d, _e, _f, _g;
73
- const wordMark = this._wordMark, fillingWordMark = this._fillingWordMark, textField = (null === (_a = this._spec.word) || void 0 === _a ? void 0 : _a.formatMethod) ? WORD_CLOUD_TEXT : this._nameField;
72
+ var _a, _b, _c, _d, _e;
73
+ const wordMark = this._wordMark, fillingWordMark = this._fillingWordMark, wordSpec = null !== (_a = this._spec.word) && void 0 !== _a ? _a : {};
74
74
  wordMark && (this.setMarkStyle(wordMark, {
75
75
  fill: this._colorHexField ? datum => datum[this._colorHexField] : this.getWordColorAttribute(this._seriesField, !1),
76
- text: datum => datum[textField],
76
+ text: datum => datum[this._textField],
77
77
  x: datum => datum.x,
78
78
  y: datum => datum.y,
79
79
  fontFamily: datum => datum.fontFamily,
@@ -83,10 +83,10 @@ export class BaseWordCloudSeries extends BaseSeries {
83
83
  angle: datum => datum.angle,
84
84
  visible: datum => !datum.isFillingWord
85
85
  }, "normal", AttributeLevel.Series), this.setMarkStyle(wordMark, {
86
- fontFamily: null !== (_d = null === (_c = null === (_b = this._spec.word) || void 0 === _b ? void 0 : _b.style) || void 0 === _c ? void 0 : _c.fontFamily) && void 0 !== _d ? _d : this._defaultFontFamily
86
+ fontFamily: null !== (_c = null === (_b = wordSpec.style) || void 0 === _b ? void 0 : _b.fontFamily) && void 0 !== _c ? _c : this._defaultFontFamily
87
87
  }, "normal", AttributeLevel.User_Mark)), fillingWordMark && (this.setMarkStyle(fillingWordMark, {
88
88
  fill: this._wordCloudShapeConfig.fillingColorHexField ? datum => datum[this._wordCloudShapeConfig.fillingColorHexField] : this.getWordColorAttribute(this._wordCloudShapeConfig.fillingSeriesField, !0),
89
- text: datum => datum[textField],
89
+ text: datum => datum[this._textField],
90
90
  x: datum => datum.x,
91
91
  y: datum => datum.y,
92
92
  fontFamily: datum => datum.fontFamily,
@@ -96,7 +96,7 @@ export class BaseWordCloudSeries extends BaseSeries {
96
96
  angle: datum => datum.angle,
97
97
  visible: datum => datum.isFillingWord
98
98
  }, "normal", AttributeLevel.Series), this.setMarkStyle(fillingWordMark, {
99
- fontFamily: null !== (_g = null === (_f = null === (_e = this._spec.word) || void 0 === _e ? void 0 : _e.style) || void 0 === _f ? void 0 : _f.fontFamily) && void 0 !== _g ? _g : this._defaultFontFamily
99
+ fontFamily: null !== (_e = null === (_d = wordSpec.style) || void 0 === _d ? void 0 : _d.fontFamily) && void 0 !== _e ? _e : this._defaultFontFamily
100
100
  }, "normal", AttributeLevel.User_Mark)), this._trigger.registerMark(wordMark), this._trigger.registerMark(fillingWordMark);
101
101
  }
102
102
  initTooltip() {
@@ -132,11 +132,11 @@ export class BaseWordCloudSeries extends BaseSeries {
132
132
  return 1 === colorList.length && (colorList = [ colorList[0], colorList[0] ]), datum => colorList[0];
133
133
  }
134
134
  compile() {
135
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26;
135
+ var _a, _b;
136
136
  super.compile();
137
137
  const {width: width, height: height} = this._region.getLayoutRect();
138
138
  if (!isValidNumber(width) || !isValidNumber(height) || !(height > 0 && width > 0)) return;
139
- const wordCloudTransforms = [], valueField = this._valueField, valueScale = new LinearScale, fontWeightRange = this._fontWeightRange, rotateAngles = this._rotateAngles, fontWeightField = this._fontWeightField, fillingRotateAngles = this._wordCloudShapeConfig.fillingRotateAngles;
139
+ const wordCloudTransforms = [], valueField = this._valueField, valueScale = new LinearScale, fontWeightRange = this._fontWeightRange, rotateAngles = this._rotateAngles, fillingRotateAngles = this._wordCloudShapeConfig.fillingRotateAngles;
140
140
  if (valueField) {
141
141
  const [minValue, maxValue] = extent(null === (_a = this.getViewData()) || void 0 === _a ? void 0 : _a.latestData.map((datum => +datum[valueField])));
142
142
  valueScale.domain([ minValue, maxValue ], !0).range(fontWeightRange), wordCloudTransforms.push({
@@ -153,82 +153,45 @@ export class BaseWordCloudSeries extends BaseSeries {
153
153
  type: "map",
154
154
  as: WORD_CLOUD_FILLING_ANGLE,
155
155
  callback: () => fillingRotateAngles[Math.floor(Math.random() * fillingRotateAngles.length)]
156
- }), (null === (_b = this._spec.word) || void 0 === _b ? void 0 : _b.formatMethod) && wordCloudTransforms.push({
156
+ });
157
+ const wordSpec = null !== (_b = this._spec.word) && void 0 !== _b ? _b : {};
158
+ wordSpec.formatMethod && wordCloudTransforms.push({
157
159
  type: "map",
158
160
  as: WORD_CLOUD_TEXT,
159
- callback: this._spec.word.formatMethod
160
- });
161
- const textField = (null === (_c = this._spec.word) || void 0 === _c ? void 0 : _c.formatMethod) ? WORD_CLOUD_TEXT : this._nameField;
162
- this._isWordCloudShape ? wordCloudTransforms.push({
163
- type: "wordcloudShape",
164
- dataIndexKey: DEFAULT_DATA_KEY,
165
- size: [ width, height ],
166
- shape: this._maskShape,
167
- text: {
168
- field: (null === (_l = this._spec.word) || void 0 === _l ? void 0 : _l.formatMethod) ? WORD_CLOUD_TEXT : this._nameField
169
- },
170
- fontSize: valueField ? {
171
- field: valueField
172
- } : this._fontSizeRange[0],
173
- fontSizeRange: this._fontSizeRange,
174
- padding: this._fontPadding,
175
- rotateList: rotateAngles,
176
- fontFamily: null !== (_q = null !== (_m = this._fontFamilyField) && void 0 !== _m ? _m : null === (_p = null === (_o = this._spec.word) || void 0 === _o ? void 0 : _o.style) || void 0 === _p ? void 0 : _p.fontFamily) && void 0 !== _q ? _q : this._defaultFontFamily,
177
- fontWeight: fontWeightField ? {
178
- field: fontWeightField
179
- } : valueField ? {
180
- field: WORD_CLOUD_WEIGHT
181
- } : null,
182
- fontStyle: null !== (_r = this._fontStyleField) && void 0 !== _r ? _r : null === (_t = null === (_s = this._spec.word) || void 0 === _s ? void 0 : _s.style) || void 0 === _t ? void 0 : _t.fontStyle,
183
- fillingFontFamily: null !== (_y = null !== (_v = null === (_u = this._wordCloudShapeConfig) || void 0 === _u ? void 0 : _u.fillingFontFamilyField) && void 0 !== _v ? _v : null === (_x = null === (_w = this._spec.word) || void 0 === _w ? void 0 : _w.style) || void 0 === _x ? void 0 : _x.fontFamily) && void 0 !== _y ? _y : this._defaultFontFamily,
184
- fillingPadding: this._fillingFontPadding,
185
- fillingFontStyle: null !== (_0 = null === (_z = this._wordCloudShapeConfig) || void 0 === _z ? void 0 : _z.fillingFontStyleField) && void 0 !== _0 ? _0 : null === (_2 = null === (_1 = this._spec.word) || void 0 === _1 ? void 0 : _1.style) || void 0 === _2 ? void 0 : _2.fontStyle,
186
- fillingFontWeight: null !== (_4 = null === (_3 = this._wordCloudShapeConfig) || void 0 === _3 ? void 0 : _3.fillingFontWeightField) && void 0 !== _4 ? _4 : null === (_6 = null === (_5 = this._spec.word) || void 0 === _5 ? void 0 : _5.style) || void 0 === _6 ? void 0 : _6.fontWeight,
187
- fillingRotateList: fillingRotateAngles,
188
- fillingTimes: null === (_7 = this._wordCloudShapeConfig) || void 0 === _7 ? void 0 : _7.fillingTimes,
189
- fillingXStep: null === (_8 = this._wordCloudShapeConfig) || void 0 === _8 ? void 0 : _8.fillingXStep,
190
- fillingYStep: null === (_9 = this._wordCloudShapeConfig) || void 0 === _9 ? void 0 : _9.fillingYStep,
191
- fillingXRatioStep: null === (_10 = this._wordCloudShapeConfig) || void 0 === _10 ? void 0 : _10.fillingXRatioStep,
192
- fillingYRatioStep: null === (_11 = this._wordCloudShapeConfig) || void 0 === _11 ? void 0 : _11.fillingYRatioStep,
193
- fillingInitialOpacity: null === (_12 = this._wordCloudShapeConfig) || void 0 === _12 ? void 0 : _12.fillingInitialOpacity,
194
- fillingDeltaOpacity: null === (_13 = this._wordCloudShapeConfig) || void 0 === _13 ? void 0 : _13.fillingDeltaOpacity,
195
- fillingInitialFontSize: null === (_14 = this._wordCloudShapeConfig) || void 0 === _14 ? void 0 : _14.fillingInitialFontSize,
196
- fillingDeltaFontSize: null === (_15 = this._wordCloudShapeConfig) || void 0 === _15 ? void 0 : _15.fillingDeltaFontSize,
197
- ratio: null === (_16 = this._wordCloudShapeConfig) || void 0 === _16 ? void 0 : _16.ratio,
198
- fillingRatio: null === (_17 = this._wordCloudShapeConfig) || void 0 === _17 ? void 0 : _17.fillingRatio,
199
- removeWhiteBorder: null === (_18 = this._wordCloudShapeConfig) || void 0 === _18 ? void 0 : _18.removeWhiteBorder,
200
- textLayoutTimes: null === (_19 = this._wordCloudShapeConfig) || void 0 === _19 ? void 0 : _19.textLayoutTimes,
201
- fontSizeShrinkFactor: null === (_20 = this._wordCloudShapeConfig) || void 0 === _20 ? void 0 : _20.fontSizeShrinkFactor,
202
- stepFactor: null === (_21 = this._wordCloudShapeConfig) || void 0 === _21 ? void 0 : _21.stepFactor,
203
- layoutMode: null === (_22 = this._wordCloudShapeConfig) || void 0 === _22 ? void 0 : _22.layoutMode,
204
- importantWordCount: null === (_23 = this._wordCloudShapeConfig) || void 0 === _23 ? void 0 : _23.importantWordCount,
205
- globalShinkLimit: null === (_24 = this._wordCloudShapeConfig) || void 0 === _24 ? void 0 : _24.globalShinkLimit,
206
- fontSizeEnlargeFactor: null === (_25 = this._wordCloudShapeConfig) || void 0 === _25 ? void 0 : _25.fontSizeEnlargeFactor,
207
- fillingDeltaFontSizeFactor: null === (_26 = this._wordCloudShapeConfig) || void 0 === _26 ? void 0 : _26.fillingDeltaFontSizeFactor
208
- }) : (wordCloudTransforms.push({
209
- type: "wordcloud",
161
+ callback: wordSpec.formatMethod
162
+ }), this._isWordCloudShape ? wordCloudTransforms.push(Object.assign({
163
+ type: "wordcloudShape"
164
+ }, this._wordCloudShapeTransformOption())) : (wordCloudTransforms.push(Object.assign({
165
+ type: "wordcloud"
166
+ }, this._wordCloudTransformOption())), this._wordMark.getProduct().transform(wordCloudTransforms)),
167
+ this._data.getProduct().transform(wordCloudTransforms);
168
+ }
169
+ _wordCloudTransformOption() {
170
+ var _a, _b, _c, _d, _e;
171
+ const {width: width, height: height} = this._region.getLayoutRect(), wordStyleSpec = null !== (_b = null === (_a = this._spec.word) || void 0 === _a ? void 0 : _a.style) && void 0 !== _b ? _b : {};
172
+ return {
210
173
  layoutType: isTrueBrowser(this._option.mode) ? this._wordCloudConfig.layoutMode : "fast",
211
174
  size: [ width, height ],
212
175
  shape: this._maskShape,
213
176
  dataIndexKey: DEFAULT_DATA_KEY,
214
177
  text: {
215
- field: textField
178
+ field: this._textField
216
179
  },
217
- fontSize: valueField ? {
218
- field: valueField
180
+ fontSize: this._valueField ? {
181
+ field: this._valueField
219
182
  } : this._fontSizeRange[0],
220
183
  fontSizeRange: this._fontSizeRange,
221
184
  padding: this._fontPadding,
222
185
  rotate: {
223
186
  field: WORD_CLOUD_ANGLE
224
187
  },
225
- fontFamily: null !== (_g = null !== (_d = this._fontFamilyField) && void 0 !== _d ? _d : null === (_f = null === (_e = this._spec.word) || void 0 === _e ? void 0 : _e.style) || void 0 === _f ? void 0 : _f.fontFamily) && void 0 !== _g ? _g : this._defaultFontFamily,
226
- fontWeight: fontWeightField ? {
227
- field: fontWeightField
228
- } : valueField ? {
188
+ fontFamily: null !== (_d = null !== (_c = this._fontFamilyField) && void 0 !== _c ? _c : wordStyleSpec.fontFamily) && void 0 !== _d ? _d : this._defaultFontFamily,
189
+ fontWeight: this._fontWeightField ? {
190
+ field: this._fontWeightField
191
+ } : this._valueField ? {
229
192
  field: WORD_CLOUD_WEIGHT
230
193
  } : null,
231
- fontStyle: null !== (_h = this._fontStyleField) && void 0 !== _h ? _h : null === (_k = null === (_j = this._spec.word) || void 0 === _j ? void 0 : _j.style) || void 0 === _k ? void 0 : _k.fontStyle,
194
+ fontStyle: null !== (_e = this._fontStyleField) && void 0 !== _e ? _e : wordStyleSpec.fontStyle,
232
195
  randomVisible: this._random,
233
196
  clip: "clip" === this._wordCloudConfig.drawOutOfBound,
234
197
  shrink: this._wordCloudConfig.zoomToFit.shrink,
@@ -236,7 +199,57 @@ export class BaseWordCloudSeries extends BaseSeries {
236
199
  minFontSize: this._wordCloudConfig.zoomToFit.fontSizeLimitMin,
237
200
  progressiveTime: this._wordCloudConfig.progressiveTime,
238
201
  progressiveStep: this._wordCloudConfig.progressiveStep
239
- }), this._wordMark.getProduct().transform(wordCloudTransforms)), this._data.getProduct().transform(wordCloudTransforms);
202
+ };
203
+ }
204
+ _wordCloudShapeTransformOption() {
205
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
206
+ const {width: width, height: height} = this._region.getLayoutRect(), wordStyleSpec = null !== (_b = null === (_a = this._spec.word) || void 0 === _a ? void 0 : _a.style) && void 0 !== _b ? _b : {}, wordCloudShapeConfig = null !== (_c = this._wordCloudShapeConfig) && void 0 !== _c ? _c : {}, fillingRotateAngles = this._wordCloudShapeConfig.fillingRotateAngles;
207
+ return {
208
+ dataIndexKey: DEFAULT_DATA_KEY,
209
+ size: [ width, height ],
210
+ shape: this._maskShape,
211
+ text: {
212
+ field: this._textField
213
+ },
214
+ fontSize: this._valueField ? {
215
+ field: this._valueField
216
+ } : this._fontSizeRange[0],
217
+ fontSizeRange: this._fontSizeRange,
218
+ padding: this._fontPadding,
219
+ rotateList: this._rotateAngles,
220
+ fontFamily: null !== (_e = null !== (_d = this._fontFamilyField) && void 0 !== _d ? _d : wordStyleSpec.fontFamily) && void 0 !== _e ? _e : this._defaultFontFamily,
221
+ fontWeight: this._fontWeightField ? {
222
+ field: this._fontWeightField
223
+ } : this._valueField ? {
224
+ field: WORD_CLOUD_WEIGHT
225
+ } : null,
226
+ fontStyle: null !== (_f = this._fontStyleField) && void 0 !== _f ? _f : wordStyleSpec.fontStyle,
227
+ fillingFontFamily: null !== (_h = null !== (_g = wordCloudShapeConfig.fillingFontFamilyField) && void 0 !== _g ? _g : wordStyleSpec.fontFamily) && void 0 !== _h ? _h : this._defaultFontFamily,
228
+ fillingPadding: this._fillingFontPadding,
229
+ fillingFontStyle: null !== (_j = wordCloudShapeConfig.fillingFontStyleField) && void 0 !== _j ? _j : wordStyleSpec.fontStyle,
230
+ fillingFontWeight: null !== (_k = wordCloudShapeConfig.fillingFontWeightField) && void 0 !== _k ? _k : wordStyleSpec.fontWeight,
231
+ fillingRotateList: fillingRotateAngles,
232
+ fillingTimes: wordCloudShapeConfig.fillingTimes,
233
+ fillingXStep: wordCloudShapeConfig.fillingXStep,
234
+ fillingYStep: wordCloudShapeConfig.fillingYStep,
235
+ fillingXRatioStep: wordCloudShapeConfig.fillingXRatioStep,
236
+ fillingYRatioStep: wordCloudShapeConfig.fillingYRatioStep,
237
+ fillingInitialOpacity: wordCloudShapeConfig.fillingInitialOpacity,
238
+ fillingDeltaOpacity: wordCloudShapeConfig.fillingDeltaOpacity,
239
+ fillingInitialFontSize: wordCloudShapeConfig.fillingInitialFontSize,
240
+ fillingDeltaFontSize: wordCloudShapeConfig.fillingDeltaFontSize,
241
+ ratio: wordCloudShapeConfig.ratio,
242
+ fillingRatio: wordCloudShapeConfig.fillingRatio,
243
+ removeWhiteBorder: wordCloudShapeConfig.removeWhiteBorder,
244
+ textLayoutTimes: wordCloudShapeConfig.textLayoutTimes,
245
+ fontSizeShrinkFactor: wordCloudShapeConfig.fontSizeShrinkFactor,
246
+ stepFactor: wordCloudShapeConfig.stepFactor,
247
+ layoutMode: wordCloudShapeConfig.layoutMode,
248
+ importantWordCount: wordCloudShapeConfig.importantWordCount,
249
+ globalShinkLimit: wordCloudShapeConfig.globalShinkLimit,
250
+ fontSizeEnlargeFactor: wordCloudShapeConfig.fontSizeEnlargeFactor,
251
+ fillingDeltaFontSizeFactor: wordCloudShapeConfig.fillingDeltaFontSizeFactor
252
+ };
240
253
  }
241
254
  getStatisticFields() {
242
255
  const fields = [];
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/series/word-cloud/base.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAC3C,OAAO,EAAE,cAAc,EAAE,gBAAgB,EAAE,yBAAyB,EAAE,MAAM,gBAAgB,CAAC;AAG7F,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AACvD,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,EACL,yBAAyB,EACzB,sBAAsB,EACtB,o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C;IACD,eAAe,CAAC,IAAS;QACvB,OAAO,IAAI,CAAC;IACd,CAAC;IACD,eAAe,CAAC,MAAW,EAAE,MAAY;QACvC,OAAO,IAAI,CAAC;IACd,CAAC;IAED,cAAc;QAEZ,OAAO,EAAE,CAAC;IACZ,CAAC;IAED,mBAAmB;QAEjB,OAAO,EAAE,CAAC;IACZ,CAAC;IAED,kBAAkB;QAEhB,OAAO,EAAE,CAAC;IACZ,CAAC;IAED,WAAW,CAAC,GAAQ;QAClB,KAAK,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC;QACvB,IAAI,CAAC,OAAO,EAAE,CAAC;IACjB,CAAC;IAED,cAAc;QACZ,OAAO,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,gBAAgB,CAAC,CAAC;IACjD,CAAC;;AAzZe,wBAAI,GAAkB,mBAAmB,CAAC","file":"base.js","sourcesContent":["/* eslint-disable no-duplicate-imports */\nimport type { IPadding } from '@visactor/vutils';\nimport { isValidNumber } from '@visactor/vutils';\nimport { isValid } from '@visactor/vutils';\nimport { AttributeLevel, DEFAULT_DATA_KEY, DEFAULT_DATA_SERIES_FIELD } from '../../constant';\nimport type { ITextMark } from '../../mark/text';\nimport type { SeriesMarkMap } from '../interface';\nimport { SeriesMarkNameEnum } from '../interface/type';\nimport { isTrueBrowser } from '../../util/env';\nimport {\n DEFAULT_DRAW_OUT_OF_BOUND,\n DEFAULT_FONTSIZE_RANGE,\n DEFAULT_FONT_PADDING,\n DEFAULT_FONT_WEIGHT_RANGE,\n DEFAULT_MASK_SHAPE,\n DEFAULT_MIN_FONT_SIZE,\n DEFAULT_RANDOM,\n DEFAULT_ROTATE_ANGLES,\n DEFAULT_ZOOM_TO_FIT,\n SHAPE_TYPE\n} from './config';\nimport type {\n IWordCloudSeriesSpec,\n WordCloudConfigType,\n WordCloudShapeConfigType,\n WordCloudShapeType\n} from './interface';\nimport type { Datum, IPoint } from '../../typings';\nimport { animationConfig, userAnimationConfig } from '../../animation/utils';\nimport { LinearScale } from '@visactor/vscale';\nimport { extent } from '@visactor/vgrammar-util';\nimport {\n WORD_CLOUD_ANGLE,\n WORD_CLOUD_FILLING_ANGLE,\n WORD_CLOUD_TEXT,\n WORD_CLOUD_WEIGHT\n} from '../../constant/word-cloud';\nimport type { ICompilableMark } from '../../compile/mark';\nimport { BaseSeries } from '../base/base-series';\nimport { ColorOrdinalScale } from '../../scale/color-ordinal-scale';\nimport { wordCloudSeriesMark } from './constant';\nimport type { IStateAnimateSpec } from '../../animation/spec';\nimport { Factory } from '../../core/factory';\nimport type { IMark } from '../../mark/interface';\n\nexport type IBaseWordCloudSeriesSpec = Omit<IWordCloudSeriesSpec, 'type'> & { type: string };\n\nexport class BaseWordCloudSeries<T extends IBaseWordCloudSeriesSpec = IBaseWordCloudSeriesSpec> extends BaseSeries<T> {\n static readonly mark: SeriesMarkMap = wordCloudSeriesMark;\n\n protected _nameField: string;\n protected _valueField?: string;\n setValueField(field: string) {\n if (isValid(field)) {\n this._valueField = field;\n }\n }\n\n protected _fontFamilyField: string;\n protected _fontWeightField: string;\n protected _fontStyleField: string;\n protected _colorHexField: string;\n protected _colorMode: 'linear' | 'ordinal';\n protected _colorList: string[];\n protected _rotateAngles?: number[];\n protected _fontWeightRange?: [number, number];\n\n protected _fontSizeRange?: [number, number] = [DEFAULT_MIN_FONT_SIZE, DEFAULT_MIN_FONT_SIZE];\n setFontSizeRange(fontSizeRange: [number, number]) {\n if (isValid(fontSizeRange)) {\n this._fontSizeRange = fontSizeRange;\n } else {\n this._fontSizeRange = DEFAULT_FONTSIZE_RANGE;\n }\n }\n\n protected _maskShape?: string | WordCloudShapeType;\n protected _isWordCloudShape: boolean = false;\n\n protected _keepAspect?: boolean;\n protected _random?: boolean;\n protected _fontPadding?: number;\n protected _fillingFontPadding?: number;\n protected _wordCloudConfig?: WordCloudConfigType;\n protected _wordCloudShapeConfig?: WordCloudShapeConfigType;\n\n protected _padding?: IPadding;\n protected _defaultFontFamily: string;\n\n /**\n * @override\n */\n setAttrFromSpec() {\n super.setAttrFromSpec();\n // series布局相关\n this._padding = this._option.getChart().padding;\n\n // 普通词云 & 形状词云 共有spec相关\n this._nameField = this._spec.nameField;\n this._fontFamilyField = this._spec.fontFamilyField;\n this._fontWeightField = this._spec.fontWeightField;\n this._fontStyleField = this._spec.fontStyleField;\n this._colorHexField = this._spec.colorHexField;\n this._colorMode = this._spec.colorMode ?? 'ordinal';\n this._colorList = this._spec.colorList;\n this.setValueField(this._spec.valueField);\n this._fontWeightRange = this._spec.fontWeightRange ?? DEFAULT_FONT_WEIGHT_RANGE;\n this._rotateAngles = this._spec.rotateAngles ?? DEFAULT_ROTATE_ANGLES;\n this.setFontSizeRange(this._spec.fontSizeRange);\n this._maskShape = this._spec.maskShape ?? DEFAULT_MASK_SHAPE;\n this._keepAspect = this._spec.keepAspect;\n this._random = this._spec.random ?? DEFAULT_RANDOM;\n this._fontPadding = this._spec?.word?.padding ?? this._theme?.wordCloud?.word?.padding ?? DEFAULT_FONT_PADDING;\n\n // 普通词云spec相关\n this._wordCloudConfig = {\n drawOutOfBound: DEFAULT_DRAW_OUT_OF_BOUND,\n layoutMode: 'default',\n zoomToFit: DEFAULT_ZOOM_TO_FIT,\n ...this._spec.wordCloudConfig\n };\n\n // 形状词云spec相关\n this._wordCloudShapeConfig = {\n fillingSeriesField: this.getSeriesField(),\n fillingRotateAngles: DEFAULT_ROTATE_ANGLES,\n layoutMode: 'default',\n ...this._spec?.wordCloudShapeConfig\n };\n this._fillingFontPadding =\n this._spec?.fillingWord?.padding ?? this._theme?.wordCloud?.fillingWord?.padding ?? DEFAULT_FONT_PADDING;\n\n this._isWordCloudShape = !SHAPE_TYPE.includes(this._maskShape);\n this._defaultFontFamily = this._option.getTheme().fontFamily;\n }\n\n protected _wordMark: ITextMark;\n protected _fillingWordMark: ITextMark;\n initMark(): void {\n this._wordMark = this._createMark(BaseWordCloudSeries.mark.word, {\n defaultMorphElementKey: this._seriesField,\n groupKey: this._seriesField,\n isSeriesMark: true\n }) as ITextMark;\n if (this._isWordCloudShape) {\n this._fillingWordMark = this._createMark(BaseWordCloudSeries.mark.fillingWord) as ITextMark;\n }\n }\n\n initMarkStyle() {\n const wordMark = this._wordMark;\n const fillingWordMark = this._fillingWordMark;\n const textField = this._spec.word?.formatMethod ? WORD_CLOUD_TEXT : this._nameField;\n if (wordMark) {\n this.setMarkStyle(\n wordMark,\n {\n fill: this._colorHexField\n ? (datum: Datum) => datum[this._colorHexField]\n : this.getWordColorAttribute(this._seriesField, false),\n text: (datum: Datum) => datum[textField],\n x: (datum: Datum) => datum.x,\n y: (datum: Datum) => datum.y,\n fontFamily: (datum: Datum) => datum.fontFamily,\n fontSize: (datum: Datum) => datum.fontSize,\n fontStyle: (datum: Datum) => datum.fontStyle,\n fontWeight: (datum: Datum) => datum.fontWeight,\n angle: (datum: Datum) => datum.angle,\n visible: (datum: Datum) => !datum.isFillingWord\n },\n 'normal',\n AttributeLevel.Series\n );\n this.setMarkStyle(\n wordMark,\n {\n fontFamily: this._spec.word?.style?.fontFamily ?? this._defaultFontFamily\n },\n 'normal',\n AttributeLevel.User_Mark\n );\n }\n if (fillingWordMark) {\n this.setMarkStyle(\n fillingWordMark,\n {\n fill: this._wordCloudShapeConfig.fillingColorHexField\n ? (datum: Datum) => datum[this._wordCloudShapeConfig.fillingColorHexField]\n : this.getWordColorAttribute(this._wordCloudShapeConfig.fillingSeriesField, true),\n text: (datum: Datum) => datum[textField],\n x: (datum: Datum) => datum.x,\n y: (datum: Datum) => datum.y,\n fontFamily: (datum: Datum) => datum.fontFamily,\n fontSize: (datum: Datum) => datum.fontSize,\n fontStyle: (datum: Datum) => datum.fontStyle,\n fontWeight: (datum: Datum) => datum.fontWeight,\n angle: (datum: Datum) => datum.angle,\n visible: (datum: Datum) => datum.isFillingWord\n },\n 'normal',\n AttributeLevel.Series\n );\n\n this.setMarkStyle(\n fillingWordMark,\n {\n fontFamily: this._spec.word?.style?.fontFamily ?? this._defaultFontFamily\n },\n 'normal',\n AttributeLevel.User_Mark\n );\n }\n this._trigger.registerMark(wordMark);\n this._trigger.registerMark(fillingWordMark);\n }\n\n protected initTooltip() {\n super.initTooltip();\n\n this._wordMark && this._tooltipHelper.activeTriggerSet.mark.add(this._wordMark);\n this._fillingWordMark && this._tooltipHelper.activeTriggerSet.mark.add(this._fillingWordMark);\n }\n\n initAnimation() {\n [this._wordMark, this._fillingWordMark].forEach(mark => {\n if (mark) {\n const appearPreset = (this._spec?.animationAppear as IStateAnimateSpec<any>)?.preset;\n const params = {\n animationConfig: () => mark.getAnimationConfig()?.appear?.[0]\n };\n mark.setAnimationConfig(\n animationConfig(\n Factory.getAnimationInKey('wordCloud')(params, appearPreset),\n userAnimationConfig(SeriesMarkNameEnum.word, this._spec, this._markAttributeContext)\n )\n );\n }\n });\n }\n\n protected getWordOrdinalColorScale(field: string, isFillingWord: boolean) {\n const colorList = isFillingWord ? this._wordCloudShapeConfig.fillingColorList : this._colorList;\n const colorDomain = field ? this.getViewData()?.latestData.map((datum: Datum) => datum[field]) : [];\n const colorRange = colorList ?? this._option.globalScale.getScale('color')?.range() ?? this._getDataScheme();\n return new ColorOrdinalScale().domain(colorDomain).range?.(colorRange);\n }\n\n getWordColorAttribute(field: string, isFillingWord: boolean) {\n if (this._colorMode === 'ordinal') {\n return {\n scale: this.getWordOrdinalColorScale(field, isFillingWord),\n field: this._seriesField ?? DEFAULT_DATA_SERIES_FIELD\n };\n }\n // const valueScale = new LinearScale()\n // .domain(extent(this.getViewData()?.latestData.map((datum: Datum) => datum[field])), true)\n // .range([0, 1]);\n let colorList =\n (isFillingWord ? this._colorList : this._wordCloudShapeConfig.fillingColorList) ??\n this._option.globalScale.getScale('color').range();\n // 如果用户只输入了一个 color,无法构成 colorRange,则进行兜底\n if (colorList.length === 1) {\n colorList = [colorList[0], colorList[0]];\n }\n // 颜色插值 todo@chensiji\n // const interpolate = interpolateColors(colorList)\n // return (datum: Datum) => interpolate(valueScale.scale(datum[field]))\n return (datum: Datum) => colorList[0];\n }\n\n compile(): void {\n super.compile();\n const { width, height } = this._region.getLayoutRect();\n // 非正常尺寸下不进行布局\n if (!isValidNumber(width) || !isValidNumber(height) || !(height > 0 && width > 0)) {\n return;\n }\n\n const wordCloudTransforms: any[] = [];\n const valueField = this._valueField;\n const valueScale = new LinearScale();\n const fontWeightRange = this._fontWeightRange;\n const rotateAngles = this._rotateAngles;\n const fontWeightField = this._fontWeightField;\n const fillingRotateAngles = this._wordCloudShapeConfig.fillingRotateAngles;\n\n // fontWeight处理\n if (valueField) {\n const [minValue, maxValue] = extent(this.getViewData()?.latestData.map((datum: any) => +datum[valueField]));\n valueScale.domain([minValue, maxValue], true).range(fontWeightRange);\n wordCloudTransforms.push({\n type: 'map',\n as: WORD_CLOUD_WEIGHT,\n callback: (datum: any) => {\n if (minValue === maxValue) {\n return valueScale.scale(maxValue);\n }\n return valueScale.scale(datum[valueField]);\n }\n });\n }\n\n // rotateAngles处理\n wordCloudTransforms.push({\n type: 'map',\n as: WORD_CLOUD_ANGLE,\n callback: () => {\n return rotateAngles[Math.floor(Math.random() * rotateAngles.length)];\n }\n });\n wordCloudTransforms.push({\n type: 'map',\n as: WORD_CLOUD_FILLING_ANGLE,\n callback: () => {\n return fillingRotateAngles[Math.floor(Math.random() * fillingRotateAngles.length)];\n }\n });\n\n // text fromat method 处理\n if (this._spec.word?.formatMethod) {\n wordCloudTransforms.push({\n type: 'map',\n as: WORD_CLOUD_TEXT,\n callback: this._spec.word.formatMethod\n });\n }\n\n const textField = this._spec.word?.formatMethod ? WORD_CLOUD_TEXT : this._nameField;\n\n // 词云 transform\n if (!this._isWordCloudShape) {\n wordCloudTransforms.push({\n type: 'wordcloud',\n // TIP: 非浏览器环境下,使用 fast 布局,否则会出现兼容问题\n layoutType: !isTrueBrowser(this._option.mode) ? 'fast' : this._wordCloudConfig.layoutMode,\n size: [width, height],\n shape: this._maskShape,\n dataIndexKey: DEFAULT_DATA_KEY,\n text: { field: textField },\n fontSize: valueField ? { field: valueField } : this._fontSizeRange[0],\n fontSizeRange: this._fontSizeRange,\n padding: this._fontPadding,\n rotate: { field: WORD_CLOUD_ANGLE },\n fontFamily: this._fontFamilyField ?? this._spec.word?.style?.fontFamily ?? this._defaultFontFamily,\n fontWeight: fontWeightField ? { field: fontWeightField } : valueField ? { field: WORD_CLOUD_WEIGHT } : null,\n fontStyle: this._fontStyleField ?? this._spec.word?.style?.fontStyle,\n\n randomVisible: this._random,\n clip: this._wordCloudConfig.drawOutOfBound === 'clip',\n shrink: this._wordCloudConfig.zoomToFit.shrink,\n enlarge: this._wordCloudConfig.zoomToFit.enlarge,\n minFontSize: this._wordCloudConfig.zoomToFit.fontSizeLimitMin,\n progressiveTime: this._wordCloudConfig.progressiveTime,\n progressiveStep: this._wordCloudConfig.progressiveStep\n });\n // 挂到mark的transform上\n (this._wordMark as ICompilableMark).getProduct().transform(wordCloudTransforms);\n }\n // 形状词云 transform\n else {\n wordCloudTransforms.push({\n type: 'wordcloudShape',\n // 形状词云中必须要传入dataIndexKey, 否则填充词无法绘制\n dataIndexKey: DEFAULT_DATA_KEY,\n\n size: [width, height],\n shape: this._maskShape,\n\n text: { field: this._spec.word?.formatMethod ? WORD_CLOUD_TEXT : this._nameField },\n fontSize: valueField ? { field: valueField } : this._fontSizeRange[0],\n fontSizeRange: this._fontSizeRange,\n padding: this._fontPadding,\n rotateList: rotateAngles,\n fontFamily: this._fontFamilyField ?? this._spec.word?.style?.fontFamily ?? this._defaultFontFamily,\n fontWeight: fontWeightField ? { field: fontWeightField } : valueField ? { field: WORD_CLOUD_WEIGHT } : null,\n fontStyle: this._fontStyleField ?? this._spec.word?.style?.fontStyle,\n\n fillingFontFamily:\n this._wordCloudShapeConfig?.fillingFontFamilyField ??\n this._spec.word?.style?.fontFamily ??\n this._defaultFontFamily,\n fillingPadding: this._fillingFontPadding,\n fillingFontStyle: this._wordCloudShapeConfig?.fillingFontStyleField ?? this._spec.word?.style?.fontStyle,\n fillingFontWeight: this._wordCloudShapeConfig?.fillingFontWeightField ?? this._spec.word?.style?.fontWeight, // 填充词fontWeight默认不跟随valueField\n fillingRotateList: fillingRotateAngles,\n\n fillingTimes: this._wordCloudShapeConfig?.fillingTimes,\n fillingXStep: this._wordCloudShapeConfig?.fillingXStep,\n fillingYStep: this._wordCloudShapeConfig?.fillingYStep,\n fillingXRatioStep: this._wordCloudShapeConfig?.fillingXRatioStep,\n fillingYRatioStep: this._wordCloudShapeConfig?.fillingYRatioStep,\n fillingInitialOpacity: this._wordCloudShapeConfig?.fillingInitialOpacity,\n fillingDeltaOpacity: this._wordCloudShapeConfig?.fillingDeltaOpacity,\n fillingInitialFontSize: this._wordCloudShapeConfig?.fillingInitialFontSize,\n fillingDeltaFontSize: this._wordCloudShapeConfig?.fillingDeltaFontSize,\n\n ratio: this._wordCloudShapeConfig?.ratio,\n fillingRatio: this._wordCloudShapeConfig?.fillingRatio,\n removeWhiteBorder: this._wordCloudShapeConfig?.removeWhiteBorder,\n textLayoutTimes: this._wordCloudShapeConfig?.textLayoutTimes,\n fontSizeShrinkFactor: this._wordCloudShapeConfig?.fontSizeShrinkFactor,\n stepFactor: this._wordCloudShapeConfig?.stepFactor,\n layoutMode: this._wordCloudShapeConfig?.layoutMode,\n importantWordCount: this._wordCloudShapeConfig?.importantWordCount,\n globalShinkLimit: this._wordCloudShapeConfig?.globalShinkLimit,\n fontSizeEnlargeFactor: this._wordCloudShapeConfig?.fontSizeEnlargeFactor,\n fillingDeltaFontSizeFactor: this._wordCloudShapeConfig?.fillingDeltaFontSizeFactor\n });\n }\n // 把transform挂载到data的product上\n this._data.getProduct().transform(wordCloudTransforms);\n }\n\n getStatisticFields() {\n const fields: { key: string; operations: Array<'max' | 'min' | 'values'> }[] = [];\n fields.push({ key: this._nameField, operations: ['values'] });\n fields.push({ key: this._valueField, operations: ['max', 'min'] });\n return fields;\n }\n dataToPosition(data: Datum): IPoint {\n return null;\n }\n dataToPositionX(data: any): number {\n return null;\n }\n dataToPositionY(data: any): number {\n return null;\n }\n dataToPositionZ(data: any): number {\n return null;\n }\n valueToPosition(value1: any, value2?: any): IPoint {\n return null;\n }\n\n getGroupFields(): string[] {\n // do nothing\n return [];\n }\n\n getStackGroupFields(): string[] {\n // do nothing\n return [];\n }\n\n getStackValueField(): string {\n // do nothing\n return '';\n }\n\n onLayoutEnd(ctx: any): void {\n super.onLayoutEnd(ctx);\n this.compile();\n }\n\n getActiveMarks(): IMark[] {\n return [this._wordMark, this._fillingWordMark];\n }\n}\n"]}
1
+ {"version":3,"sources":["../src/series/word-cloud/base.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAC3C,OAAO,EAAE,cAAc,EAAE,gBAAgB,EAAE,yBAAyB,EAAE,MAAM,gBAAgB,CAAC;AAG7F,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AACvD,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,EACL,yBAAyB,EACzB,sBAAsB,EACtB,oBAAoB,EACpB,yBAAyB,EACzB,kBAAkB,EAClB,qBAAqB,EACrB,cAAc,EACd,qBAAqB,EACrB,mBAAmB,EACnB,UAAU,EACX,MAAM,UAAU,CAAC;AAQlB,OAAO,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC7E,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AACjD,OAAO,EACL,gBAAgB,EAChB,wBAAwB,EACxB,eAAe,EACf,iBAAiB,EAClB,MAAM,2BAA2B,CAAC;AAEnC,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AACpE,OAAO,EAAE,mBAAmB,EAAE,MAAM,YAAY,CA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AAK,EAAE,KAAK,CAAC,EAAE,CAAC,CAAC;QACnE,OAAO,MAAM,CAAC;IAChB,CAAC;IACD,cAAc,CAAC,IAAW;QACxB,OAAO,IAAI,CAAC;IACd,CAAC;IACD,eAAe,CAAC,IAAS;QACvB,OAAO,IAAI,CAAC;IACd,CAAC;IACD,eAAe,CAAC,IAAS;QACvB,OAAO,IAAI,CAAC;IACd,CAAC;IACD,eAAe,CAAC,IAAS;QACvB,OAAO,IAAI,CAAC;IACd,CAAC;IACD,eAAe,CAAC,MAAW,EAAE,MAAY;QACvC,OAAO,IAAI,CAAC;IACd,CAAC;IAED,cAAc;QAEZ,OAAO,EAAE,CAAC;IACZ,CAAC;IAED,mBAAmB;QAEjB,OAAO,EAAE,CAAC;IACZ,CAAC;IAED,kBAAkB;QAEhB,OAAO,EAAE,CAAC;IACZ,CAAC;IAED,WAAW,CAAC,GAAQ;QAClB,KAAK,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC;QACvB,IAAI,CAAC,OAAO,EAAE,CAAC;IACjB,CAAC;IAED,cAAc;QACZ,OAAO,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,gBAAgB,CAAC,CAAC;IACjD,CAAC;;AAjbe,wBAAI,GAAkB,mBAAmB,CAAC","file":"base.js","sourcesContent":["/* eslint-disable no-duplicate-imports */\nimport type { IPadding } from '@visactor/vutils';\nimport { isValidNumber } from '@visactor/vutils';\nimport { isValid } from '@visactor/vutils';\nimport { AttributeLevel, DEFAULT_DATA_KEY, DEFAULT_DATA_SERIES_FIELD } from '../../constant';\nimport type { ITextMark } from '../../mark/text';\nimport type { SeriesMarkMap } from '../interface';\nimport { SeriesMarkNameEnum } from '../interface/type';\nimport { isTrueBrowser } from '../../util/env';\nimport {\n DEFAULT_DRAW_OUT_OF_BOUND,\n DEFAULT_FONTSIZE_RANGE,\n DEFAULT_FONT_PADDING,\n DEFAULT_FONT_WEIGHT_RANGE,\n DEFAULT_MASK_SHAPE,\n DEFAULT_MIN_FONT_SIZE,\n DEFAULT_RANDOM,\n DEFAULT_ROTATE_ANGLES,\n DEFAULT_ZOOM_TO_FIT,\n SHAPE_TYPE\n} from './config';\nimport type {\n IWordCloudSeriesSpec,\n WordCloudConfigType,\n WordCloudShapeConfigType,\n WordCloudShapeType\n} from './interface';\nimport type { Datum, IPoint } from '../../typings';\nimport { animationConfig, userAnimationConfig } from '../../animation/utils';\nimport { LinearScale } from '@visactor/vscale';\nimport { extent } from '@visactor/vgrammar-util';\nimport {\n WORD_CLOUD_ANGLE,\n WORD_CLOUD_FILLING_ANGLE,\n WORD_CLOUD_TEXT,\n WORD_CLOUD_WEIGHT\n} from '../../constant/word-cloud';\nimport type { ICompilableMark } from '../../compile/mark';\nimport { BaseSeries } from '../base/base-series';\nimport { ColorOrdinalScale } from '../../scale/color-ordinal-scale';\nimport { wordCloudSeriesMark } from './constant';\nimport type { IStateAnimateSpec } from '../../animation/spec';\nimport { Factory } from '../../core/factory';\nimport type { IMark } from '../../mark/interface';\n\nexport type IBaseWordCloudSeriesSpec = Omit<IWordCloudSeriesSpec, 'type'> & { type: string };\n\nexport class BaseWordCloudSeries<T extends IBaseWordCloudSeriesSpec = IBaseWordCloudSeriesSpec> extends BaseSeries<T> {\n static readonly mark: SeriesMarkMap = wordCloudSeriesMark;\n\n protected _nameField: string;\n protected _valueField?: string;\n setValueField(field: string) {\n if (isValid(field)) {\n this._valueField = field;\n }\n }\n\n protected _fontFamilyField: string;\n protected _fontWeightField: string;\n protected _fontStyleField: string;\n protected _colorHexField: string;\n protected _colorMode: 'linear' | 'ordinal';\n protected _colorList: string[];\n protected _rotateAngles?: number[];\n protected _fontWeightRange?: [number, number];\n protected _textField?: string;\n\n protected _fontSizeRange?: [number, number] = [DEFAULT_MIN_FONT_SIZE, DEFAULT_MIN_FONT_SIZE];\n setFontSizeRange(fontSizeRange: [number, number]) {\n if (isValid(fontSizeRange)) {\n this._fontSizeRange = fontSizeRange;\n } else {\n this._fontSizeRange = DEFAULT_FONTSIZE_RANGE;\n }\n }\n\n protected _maskShape?: string | WordCloudShapeType;\n protected _isWordCloudShape: boolean = false;\n\n protected _keepAspect?: boolean;\n protected _random?: boolean;\n protected _fontPadding?: number;\n protected _fillingFontPadding?: number;\n protected _wordCloudConfig?: WordCloudConfigType;\n protected _wordCloudShapeConfig?: WordCloudShapeConfigType;\n\n protected _padding?: IPadding;\n protected _defaultFontFamily: string;\n\n /**\n * @override\n */\n setAttrFromSpec() {\n super.setAttrFromSpec();\n // series布局相关\n this._padding = this._option.getChart().padding;\n\n // 普通词云 & 形状词云 共有spec相关\n this._nameField = this._spec.nameField;\n this._fontFamilyField = this._spec.fontFamilyField;\n this._fontWeightField = this._spec.fontWeightField;\n this._fontStyleField = this._spec.fontStyleField;\n this._colorHexField = this._spec.colorHexField;\n this._colorMode = this._spec.colorMode ?? 'ordinal';\n this._colorList = this._spec.colorList;\n this.setValueField(this._spec.valueField);\n this._fontWeightRange = this._spec.fontWeightRange ?? DEFAULT_FONT_WEIGHT_RANGE;\n this._rotateAngles = this._spec.rotateAngles ?? DEFAULT_ROTATE_ANGLES;\n this.setFontSizeRange(this._spec.fontSizeRange);\n this._maskShape = this._spec.maskShape ?? DEFAULT_MASK_SHAPE;\n this._keepAspect = this._spec.keepAspect;\n this._random = this._spec.random ?? DEFAULT_RANDOM;\n this._fontPadding = this._spec.word?.padding ?? DEFAULT_FONT_PADDING;\n this._textField = this._spec.word?.formatMethod ? WORD_CLOUD_TEXT : this._nameField;\n // 普通词云spec相关\n this._wordCloudConfig = {\n drawOutOfBound: DEFAULT_DRAW_OUT_OF_BOUND,\n layoutMode: 'default',\n zoomToFit: DEFAULT_ZOOM_TO_FIT,\n ...this._spec.wordCloudConfig\n };\n\n // 形状词云spec相关\n this._wordCloudShapeConfig = {\n fillingSeriesField: this.getSeriesField(),\n fillingRotateAngles: DEFAULT_ROTATE_ANGLES,\n layoutMode: 'default',\n ...this._spec.wordCloudShapeConfig\n };\n this._fillingFontPadding = this._spec.fillingWord?.padding ?? DEFAULT_FONT_PADDING;\n\n this._isWordCloudShape = !SHAPE_TYPE.includes(this._maskShape);\n this._defaultFontFamily = this._option.getTheme().fontFamily;\n }\n\n protected _wordMark: ITextMark;\n protected _fillingWordMark: ITextMark;\n initMark(): void {\n this._wordMark = this._createMark(BaseWordCloudSeries.mark.word, {\n defaultMorphElementKey: this._seriesField,\n groupKey: this._seriesField,\n isSeriesMark: true\n }) as ITextMark;\n if (this._isWordCloudShape) {\n this._fillingWordMark = this._createMark(BaseWordCloudSeries.mark.fillingWord) as ITextMark;\n }\n }\n\n initMarkStyle() {\n const wordMark = this._wordMark;\n const fillingWordMark = this._fillingWordMark;\n const wordSpec = this._spec.word ?? {};\n if (wordMark) {\n this.setMarkStyle(\n wordMark,\n {\n fill: this._colorHexField\n ? (datum: Datum) => datum[this._colorHexField]\n : this.getWordColorAttribute(this._seriesField, false),\n text: (datum: Datum) => datum[this._textField],\n x: (datum: Datum) => datum.x,\n y: (datum: Datum) => datum.y,\n fontFamily: (datum: Datum) => datum.fontFamily,\n fontSize: (datum: Datum) => datum.fontSize,\n fontStyle: (datum: Datum) => datum.fontStyle,\n fontWeight: (datum: Datum) => datum.fontWeight,\n angle: (datum: Datum) => datum.angle,\n visible: (datum: Datum) => !datum.isFillingWord\n },\n 'normal',\n AttributeLevel.Series\n );\n this.setMarkStyle(\n wordMark,\n {\n fontFamily: wordSpec.style?.fontFamily ?? this._defaultFontFamily\n },\n 'normal',\n AttributeLevel.User_Mark\n );\n }\n if (fillingWordMark) {\n this.setMarkStyle(\n fillingWordMark,\n {\n fill: this._wordCloudShapeConfig.fillingColorHexField\n ? (datum: Datum) => datum[this._wordCloudShapeConfig.fillingColorHexField]\n : this.getWordColorAttribute(this._wordCloudShapeConfig.fillingSeriesField, true),\n text: (datum: Datum) => datum[this._textField],\n x: (datum: Datum) => datum.x,\n y: (datum: Datum) => datum.y,\n fontFamily: (datum: Datum) => datum.fontFamily,\n fontSize: (datum: Datum) => datum.fontSize,\n fontStyle: (datum: Datum) => datum.fontStyle,\n fontWeight: (datum: Datum) => datum.fontWeight,\n angle: (datum: Datum) => datum.angle,\n visible: (datum: Datum) => datum.isFillingWord\n },\n 'normal',\n AttributeLevel.Series\n );\n\n this.setMarkStyle(\n fillingWordMark,\n {\n fontFamily: wordSpec.style?.fontFamily ?? this._defaultFontFamily\n },\n 'normal',\n AttributeLevel.User_Mark\n );\n }\n this._trigger.registerMark(wordMark);\n this._trigger.registerMark(fillingWordMark);\n }\n\n protected initTooltip() {\n super.initTooltip();\n\n this._wordMark && this._tooltipHelper.activeTriggerSet.mark.add(this._wordMark);\n this._fillingWordMark && this._tooltipHelper.activeTriggerSet.mark.add(this._fillingWordMark);\n }\n\n initAnimation() {\n [this._wordMark, this._fillingWordMark].forEach(mark => {\n if (mark) {\n const appearPreset = (this._spec?.animationAppear as IStateAnimateSpec<any>)?.preset;\n const params = {\n animationConfig: () => mark.getAnimationConfig()?.appear?.[0]\n };\n mark.setAnimationConfig(\n animationConfig(\n Factory.getAnimationInKey('wordCloud')(params, appearPreset),\n userAnimationConfig(SeriesMarkNameEnum.word, this._spec, this._markAttributeContext)\n )\n );\n }\n });\n }\n\n protected getWordOrdinalColorScale(field: string, isFillingWord: boolean) {\n const colorList = isFillingWord ? this._wordCloudShapeConfig.fillingColorList : this._colorList;\n const colorDomain = field ? this.getViewData()?.latestData.map((datum: Datum) => datum[field]) : [];\n const colorRange = colorList ?? this._option.globalScale.getScale('color')?.range() ?? this._getDataScheme();\n return new ColorOrdinalScale().domain(colorDomain).range?.(colorRange);\n }\n\n getWordColorAttribute(field: string, isFillingWord: boolean) {\n if (this._colorMode === 'ordinal') {\n return {\n scale: this.getWordOrdinalColorScale(field, isFillingWord),\n field: this._seriesField ?? DEFAULT_DATA_SERIES_FIELD\n };\n }\n // const valueScale = new LinearScale()\n // .domain(extent(this.getViewData()?.latestData.map((datum: Datum) => datum[field])), true)\n // .range([0, 1]);\n let colorList =\n (isFillingWord ? this._colorList : this._wordCloudShapeConfig.fillingColorList) ??\n this._option.globalScale.getScale('color').range();\n // 如果用户只输入了一个 color,无法构成 colorRange,则进行兜底\n if (colorList.length === 1) {\n colorList = [colorList[0], colorList[0]];\n }\n // 颜色插值 todo@chensiji\n // const interpolate = interpolateColors(colorList)\n // return (datum: Datum) => interpolate(valueScale.scale(datum[field]))\n return (datum: Datum) => colorList[0];\n }\n\n compile(): void {\n super.compile();\n const { width, height } = this._region.getLayoutRect();\n // 非正常尺寸下不进行布局\n if (!isValidNumber(width) || !isValidNumber(height) || !(height > 0 && width > 0)) {\n return;\n }\n\n const wordCloudTransforms: any[] = [];\n const valueField = this._valueField;\n const valueScale = new LinearScale();\n const fontWeightRange = this._fontWeightRange;\n const rotateAngles = this._rotateAngles;\n const fillingRotateAngles = this._wordCloudShapeConfig.fillingRotateAngles;\n\n // fontWeight处理\n if (valueField) {\n const [minValue, maxValue] = extent(this.getViewData()?.latestData.map((datum: any) => +datum[valueField]));\n valueScale.domain([minValue, maxValue], true).range(fontWeightRange);\n wordCloudTransforms.push({\n type: 'map',\n as: WORD_CLOUD_WEIGHT,\n callback: (datum: any) => {\n if (minValue === maxValue) {\n return valueScale.scale(maxValue);\n }\n return valueScale.scale(datum[valueField]);\n }\n });\n }\n\n // rotateAngles处理\n wordCloudTransforms.push({\n type: 'map',\n as: WORD_CLOUD_ANGLE,\n callback: () => {\n return rotateAngles[Math.floor(Math.random() * rotateAngles.length)];\n }\n });\n wordCloudTransforms.push({\n type: 'map',\n as: WORD_CLOUD_FILLING_ANGLE,\n callback: () => {\n return fillingRotateAngles[Math.floor(Math.random() * fillingRotateAngles.length)];\n }\n });\n const wordSpec = this._spec.word ?? {};\n\n // text fromat method 处理\n if (wordSpec.formatMethod) {\n wordCloudTransforms.push({\n type: 'map',\n as: WORD_CLOUD_TEXT,\n callback: wordSpec.formatMethod\n });\n }\n\n // 词云 transform\n if (!this._isWordCloudShape) {\n wordCloudTransforms.push({\n type: 'wordcloud',\n ...this._wordCloudTransformOption()\n });\n // 挂到mark的transform上\n (this._wordMark as ICompilableMark).getProduct().transform(wordCloudTransforms);\n }\n // 形状词云 transform\n else {\n wordCloudTransforms.push({\n type: 'wordcloudShape',\n // 形状词云中必须要传入dataIndexKey, 否则填充词无法绘制\n ...this._wordCloudShapeTransformOption()\n });\n }\n // 把transform挂载到data的product上\n this._data.getProduct().transform(wordCloudTransforms);\n }\n\n protected _wordCloudTransformOption(): Object {\n const { width, height } = this._region.getLayoutRect();\n const wordStyleSpec = this._spec.word?.style ?? {};\n\n return {\n // TIP: 非浏览器环境下,使用 fast 布局,否则会出现兼容问题\n layoutType: !isTrueBrowser(this._option.mode) ? 'fast' : this._wordCloudConfig.layoutMode,\n size: [width, height],\n shape: this._maskShape,\n dataIndexKey: DEFAULT_DATA_KEY,\n text: { field: this._textField },\n fontSize: this._valueField ? { field: this._valueField } : this._fontSizeRange[0],\n fontSizeRange: this._fontSizeRange,\n padding: this._fontPadding,\n rotate: { field: WORD_CLOUD_ANGLE },\n fontFamily: this._fontFamilyField ?? wordStyleSpec.fontFamily ?? this._defaultFontFamily,\n fontWeight: this._fontWeightField\n ? { field: this._fontWeightField }\n : this._valueField\n ? { field: WORD_CLOUD_WEIGHT }\n : null,\n fontStyle: this._fontStyleField ?? wordStyleSpec.fontStyle,\n\n randomVisible: this._random,\n clip: this._wordCloudConfig.drawOutOfBound === 'clip',\n shrink: this._wordCloudConfig.zoomToFit.shrink,\n enlarge: this._wordCloudConfig.zoomToFit.enlarge,\n minFontSize: this._wordCloudConfig.zoomToFit.fontSizeLimitMin,\n progressiveTime: this._wordCloudConfig.progressiveTime,\n progressiveStep: this._wordCloudConfig.progressiveStep\n };\n }\n\n protected _wordCloudShapeTransformOption(): Object {\n const { width, height } = this._region.getLayoutRect();\n const wordStyleSpec = this._spec.word?.style ?? {};\n const wordCloudShapeConfig = this._wordCloudShapeConfig ?? {};\n const fillingRotateAngles = this._wordCloudShapeConfig.fillingRotateAngles;\n\n return {\n dataIndexKey: DEFAULT_DATA_KEY,\n\n size: [width, height],\n shape: this._maskShape,\n\n text: { field: this._textField },\n fontSize: this._valueField ? { field: this._valueField } : this._fontSizeRange[0],\n fontSizeRange: this._fontSizeRange,\n padding: this._fontPadding,\n rotateList: this._rotateAngles,\n fontFamily: this._fontFamilyField ?? wordStyleSpec.fontFamily ?? this._defaultFontFamily,\n fontWeight: this._fontWeightField\n ? { field: this._fontWeightField }\n : this._valueField\n ? { field: WORD_CLOUD_WEIGHT }\n : null,\n fontStyle: this._fontStyleField ?? wordStyleSpec.fontStyle,\n\n fillingFontFamily:\n wordCloudShapeConfig.fillingFontFamilyField ?? wordStyleSpec.fontFamily ?? this._defaultFontFamily,\n fillingPadding: this._fillingFontPadding,\n fillingFontStyle: wordCloudShapeConfig.fillingFontStyleField ?? wordStyleSpec.fontStyle,\n fillingFontWeight: wordCloudShapeConfig.fillingFontWeightField ?? wordStyleSpec.fontWeight, // 填充词fontWeight默认不跟随valueField\n fillingRotateList: fillingRotateAngles,\n\n fillingTimes: wordCloudShapeConfig.fillingTimes,\n fillingXStep: wordCloudShapeConfig.fillingXStep,\n fillingYStep: wordCloudShapeConfig.fillingYStep,\n fillingXRatioStep: wordCloudShapeConfig.fillingXRatioStep,\n fillingYRatioStep: wordCloudShapeConfig.fillingYRatioStep,\n fillingInitialOpacity: wordCloudShapeConfig.fillingInitialOpacity,\n fillingDeltaOpacity: wordCloudShapeConfig.fillingDeltaOpacity,\n fillingInitialFontSize: wordCloudShapeConfig.fillingInitialFontSize,\n fillingDeltaFontSize: wordCloudShapeConfig.fillingDeltaFontSize,\n\n ratio: wordCloudShapeConfig.ratio,\n fillingRatio: wordCloudShapeConfig.fillingRatio,\n removeWhiteBorder: wordCloudShapeConfig.removeWhiteBorder,\n textLayoutTimes: wordCloudShapeConfig.textLayoutTimes,\n fontSizeShrinkFactor: wordCloudShapeConfig.fontSizeShrinkFactor,\n stepFactor: wordCloudShapeConfig.stepFactor,\n layoutMode: wordCloudShapeConfig.layoutMode,\n importantWordCount: wordCloudShapeConfig.importantWordCount,\n globalShinkLimit: wordCloudShapeConfig.globalShinkLimit,\n fontSizeEnlargeFactor: wordCloudShapeConfig.fontSizeEnlargeFactor,\n fillingDeltaFontSizeFactor: wordCloudShapeConfig.fillingDeltaFontSizeFactor\n };\n }\n\n getStatisticFields() {\n const fields: { key: string; operations: Array<'max' | 'min' | 'values'> }[] = [];\n fields.push({ key: this._nameField, operations: ['values'] });\n fields.push({ key: this._valueField, operations: ['max', 'min'] });\n return fields;\n }\n dataToPosition(data: Datum): IPoint {\n return null;\n }\n dataToPositionX(data: any): number {\n return null;\n }\n dataToPositionY(data: any): number {\n return null;\n }\n dataToPositionZ(data: any): number {\n return null;\n }\n valueToPosition(value1: any, value2?: any): IPoint {\n return null;\n }\n\n getGroupFields(): string[] {\n // do nothing\n return [];\n }\n\n getStackGroupFields(): string[] {\n // do nothing\n return [];\n }\n\n getStackValueField(): string {\n // do nothing\n return '';\n }\n\n onLayoutEnd(ctx: any): void {\n super.onLayoutEnd(ctx);\n this.compile();\n }\n\n getActiveMarks(): IMark[] {\n return [this._wordMark, this._fillingWordMark];\n }\n}\n"]}
@@ -4,7 +4,28 @@ import { BaseWordCloudSeries } from './base';
4
4
  export declare class WordCloud3dSeries<T extends IWordCloud3dSeriesSpec = IWordCloud3dSeriesSpec> extends BaseWordCloudSeries<T> {
5
5
  static readonly type: string;
6
6
  type: SeriesTypeEnum;
7
- compile(): void;
7
+ protected _wordCloudTransformOption(): {
8
+ postProjection: "StereographicProjection";
9
+ depth_3d: number;
10
+ constructor: Function;
11
+ toString(): string;
12
+ toLocaleString(): string;
13
+ valueOf(): Object;
14
+ hasOwnProperty(v: PropertyKey): boolean;
15
+ isPrototypeOf(v: Object): boolean;
16
+ propertyIsEnumerable(v: PropertyKey): boolean;
17
+ };
18
+ protected _wordCloudShapeTransformOption(): {
19
+ postProjection: "StereographicProjection";
20
+ depth_3d: number;
21
+ constructor: Function;
22
+ toString(): string;
23
+ toLocaleString(): string;
24
+ valueOf(): Object;
25
+ hasOwnProperty(v: PropertyKey): boolean;
26
+ isPrototypeOf(v: Object): boolean;
27
+ propertyIsEnumerable(v: PropertyKey): boolean;
28
+ };
8
29
  initMark(): void;
9
30
  initMarkStyle(): void;
10
31
  initAnimation(): void;