@visactor/vchart 2.1.0-alpha.5 → 2.1.0-alpha.7

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 (208) hide show
  1. package/build/es5/index.js +1 -1
  2. package/build/index.es.js +395 -246
  3. package/build/index.js +395 -246
  4. package/build/index.min.js +2 -2
  5. package/build/tsconfig.tsbuildinfo +1 -1
  6. package/cjs/chart/base/base-chart.d.ts +2 -0
  7. package/cjs/chart/base/base-chart.js +27 -15
  8. package/cjs/chart/base/base-chart.js.map +1 -1
  9. package/cjs/chart/gauge/gauge-transformer.js +3 -2
  10. package/cjs/chart/gauge/gauge-transformer.js.map +1 -1
  11. package/cjs/chart/polar/polar-transformer.js +1 -1
  12. package/cjs/chart/polar/polar-transformer.js.map +1 -1
  13. package/cjs/chart/polar/progress-like/progress-like-transformer.js +1 -1
  14. package/cjs/chart/polar/progress-like/progress-like-transformer.js.map +1 -1
  15. package/cjs/chart/progress/circular/circular-progress-transformer.js +3 -2
  16. package/cjs/chart/progress/circular/circular-progress-transformer.js.map +1 -1
  17. package/cjs/chart/progress/linear/linear-progress-transformer.js +1 -1
  18. package/cjs/chart/progress/linear/linear-progress-transformer.js.map +1 -1
  19. package/cjs/chart/radar/radar-transformer.js +3 -2
  20. package/cjs/chart/radar/radar-transformer.js.map +1 -1
  21. package/cjs/chart/range-area/range-area-transformer.js +2 -2
  22. package/cjs/chart/range-area/range-area-transformer.js.map +1 -1
  23. package/cjs/chart/rose/rose-transformer.js +2 -1
  24. package/cjs/chart/rose/rose-transformer.js.map +1 -1
  25. package/cjs/component/axis/polar/band-axis.d.ts +2 -0
  26. package/cjs/component/axis/polar/band-axis.js +3 -0
  27. package/cjs/component/axis/polar/band-axis.js.map +1 -1
  28. package/cjs/component/axis/polar/linear-axis.js +3 -0
  29. package/cjs/component/axis/polar/linear-axis.js.map +1 -1
  30. package/cjs/component/index.js +2 -1
  31. package/cjs/component/indicator/indicator.js +2 -2
  32. package/cjs/component/indicator/indicator.js.map +1 -1
  33. package/cjs/component/indicator/util.d.ts +4 -3
  34. package/cjs/component/indicator/util.js +1 -1
  35. package/cjs/component/indicator/util.js.map +1 -1
  36. package/cjs/component/marker/base-marker.js +16 -6
  37. package/cjs/component/marker/base-marker.js.map +1 -1
  38. package/cjs/component/marker/mark-point/base-mark-point.js +19 -6
  39. package/cjs/component/marker/mark-point/base-mark-point.js.map +1 -1
  40. package/cjs/constant/attribute.js +1 -2
  41. package/cjs/constant/scatter.js +2 -1
  42. package/cjs/constant/waterfall.js +1 -2
  43. package/cjs/data/transforms/box-plot.d.ts +4 -1
  44. package/cjs/data/transforms/box-plot.js +3 -3
  45. package/cjs/data/transforms/box-plot.js.map +1 -1
  46. package/cjs/data/transforms/correlation-center.d.ts +11 -4
  47. package/cjs/data/transforms/correlation-center.js +3 -2
  48. package/cjs/data/transforms/correlation-center.js.map +1 -1
  49. package/cjs/data/transforms/correlation.d.ts +18 -15
  50. package/cjs/data/transforms/correlation.js +22 -17
  51. package/cjs/data/transforms/correlation.js.map +1 -1
  52. package/cjs/data/transforms/funnel.d.ts +10 -8
  53. package/cjs/data/transforms/funnel.js +4 -3
  54. package/cjs/data/transforms/funnel.js.map +1 -1
  55. package/cjs/data/transforms/lookup.d.ts +3 -3
  56. package/cjs/data/transforms/lookup.js +12 -7
  57. package/cjs/data/transforms/lookup.js.map +1 -1
  58. package/cjs/data/transforms/map.d.ts +8 -2
  59. package/cjs/data/transforms/map.js +9 -6
  60. package/cjs/data/transforms/map.js.map +1 -1
  61. package/cjs/data/transforms/sankey.d.ts +12 -4
  62. package/cjs/data/transforms/sankey.js +18 -13
  63. package/cjs/data/transforms/sankey.js.map +1 -1
  64. package/cjs/data/transforms/stack-split.d.ts +2 -1
  65. package/cjs/data/transforms/stack-split.js +1 -1
  66. package/cjs/data/transforms/stack-split.js.map +1 -1
  67. package/cjs/data/transforms/treemap.d.ts +5 -3
  68. package/cjs/data/transforms/treemap.js +7 -6
  69. package/cjs/data/transforms/treemap.js.map +1 -1
  70. package/cjs/data/transforms/venn.d.ts +4 -2
  71. package/cjs/data/transforms/venn.js +4 -4
  72. package/cjs/data/transforms/venn.js.map +1 -1
  73. package/cjs/data/transforms/waterfall.d.ts +4 -2
  74. package/cjs/data/transforms/waterfall.js +7 -7
  75. package/cjs/data/transforms/waterfall.js.map +1 -1
  76. package/cjs/series/base/base-series.js +2 -2
  77. package/cjs/series/base/base-series.js.map +1 -1
  78. package/cjs/series/box-plot/box-plot.js +2 -2
  79. package/cjs/series/box-plot/box-plot.js.map +1 -1
  80. package/cjs/series/correlation/correlation.js +13 -11
  81. package/cjs/series/correlation/correlation.js.map +1 -1
  82. package/cjs/series/dot/dot.d.ts +11 -0
  83. package/cjs/series/dot/dot.js +16 -1
  84. package/cjs/series/dot/dot.js.map +1 -1
  85. package/cjs/series/funnel/funnel.js +5 -8
  86. package/cjs/series/funnel/funnel.js.map +1 -1
  87. package/cjs/series/map/map.js +3 -3
  88. package/cjs/series/map/map.js.map +1 -1
  89. package/cjs/series/polar/progress-like/progress-like.d.ts +2 -0
  90. package/cjs/series/polar/progress-like/progress-like.js +16 -1
  91. package/cjs/series/polar/progress-like/progress-like.js.map +1 -1
  92. package/cjs/series/polar/rose-like/rose-like.d.ts +2 -0
  93. package/cjs/series/polar/rose-like/rose-like.js +15 -1
  94. package/cjs/series/polar/rose-like/rose-like.js.map +1 -1
  95. package/cjs/series/progress/circular/circular.js +2 -1
  96. package/cjs/series/progress/circular/circular.js.map +1 -1
  97. package/cjs/series/progress/linear/linear.js +3 -1
  98. package/cjs/series/progress/linear/linear.js.map +1 -1
  99. package/cjs/series/sankey/sankey.js +35 -33
  100. package/cjs/series/sankey/sankey.js.map +1 -1
  101. package/cjs/series/treemap/treemap.js +23 -20
  102. package/cjs/series/treemap/treemap.js.map +1 -1
  103. package/cjs/series/venn/venn.js +2 -2
  104. package/cjs/series/venn/venn.js.map +1 -1
  105. package/cjs/series/waterfall/waterfall.js +26 -20
  106. package/cjs/series/waterfall/waterfall.js.map +1 -1
  107. package/esm/chart/base/base-chart.d.ts +2 -0
  108. package/esm/chart/base/base-chart.js +25 -15
  109. package/esm/chart/base/base-chart.js.map +1 -1
  110. package/esm/chart/gauge/gauge-transformer.js +3 -2
  111. package/esm/chart/gauge/gauge-transformer.js.map +1 -1
  112. package/esm/chart/polar/polar-transformer.js +1 -1
  113. package/esm/chart/polar/polar-transformer.js.map +1 -1
  114. package/esm/chart/polar/progress-like/progress-like-transformer.js +1 -1
  115. package/esm/chart/polar/progress-like/progress-like-transformer.js.map +1 -1
  116. package/esm/chart/progress/circular/circular-progress-transformer.js +3 -2
  117. package/esm/chart/progress/circular/circular-progress-transformer.js.map +1 -1
  118. package/esm/chart/progress/linear/linear-progress-transformer.js +1 -1
  119. package/esm/chart/progress/linear/linear-progress-transformer.js.map +1 -1
  120. package/esm/chart/radar/radar-transformer.js +3 -2
  121. package/esm/chart/radar/radar-transformer.js.map +1 -1
  122. package/esm/chart/range-area/range-area-transformer.js +2 -2
  123. package/esm/chart/range-area/range-area-transformer.js.map +1 -1
  124. package/esm/chart/rose/rose-transformer.js +2 -1
  125. package/esm/chart/rose/rose-transformer.js.map +1 -1
  126. package/esm/component/axis/polar/band-axis.d.ts +2 -0
  127. package/esm/component/axis/polar/band-axis.js +3 -0
  128. package/esm/component/axis/polar/band-axis.js.map +1 -1
  129. package/esm/component/axis/polar/linear-axis.js +3 -0
  130. package/esm/component/axis/polar/linear-axis.js.map +1 -1
  131. package/esm/component/index.js +2 -1
  132. package/esm/component/indicator/indicator.js +2 -2
  133. package/esm/component/indicator/indicator.js.map +1 -1
  134. package/esm/component/indicator/util.d.ts +4 -3
  135. package/esm/component/indicator/util.js +2 -2
  136. package/esm/component/indicator/util.js.map +1 -1
  137. package/esm/component/marker/base-marker.js +16 -6
  138. package/esm/component/marker/base-marker.js.map +1 -1
  139. package/esm/component/marker/mark-point/base-mark-point.js +19 -6
  140. package/esm/component/marker/mark-point/base-mark-point.js.map +1 -1
  141. package/esm/constant/attribute.js +1 -2
  142. package/esm/constant/scatter.js +2 -1
  143. package/esm/constant/waterfall.js +1 -2
  144. package/esm/data/transforms/box-plot.d.ts +4 -1
  145. package/esm/data/transforms/box-plot.js +4 -4
  146. package/esm/data/transforms/box-plot.js.map +1 -1
  147. package/esm/data/transforms/correlation-center.d.ts +11 -4
  148. package/esm/data/transforms/correlation-center.js +4 -2
  149. package/esm/data/transforms/correlation-center.js.map +1 -1
  150. package/esm/data/transforms/correlation.d.ts +18 -15
  151. package/esm/data/transforms/correlation.js +13 -8
  152. package/esm/data/transforms/correlation.js.map +1 -1
  153. package/esm/data/transforms/funnel.d.ts +10 -8
  154. package/esm/data/transforms/funnel.js +5 -3
  155. package/esm/data/transforms/funnel.js.map +1 -1
  156. package/esm/data/transforms/lookup.d.ts +3 -3
  157. package/esm/data/transforms/lookup.js +12 -6
  158. package/esm/data/transforms/lookup.js.map +1 -1
  159. package/esm/data/transforms/map.d.ts +8 -2
  160. package/esm/data/transforms/map.js +11 -6
  161. package/esm/data/transforms/map.js.map +1 -1
  162. package/esm/data/transforms/sankey.d.ts +12 -4
  163. package/esm/data/transforms/sankey.js +19 -14
  164. package/esm/data/transforms/sankey.js.map +1 -1
  165. package/esm/data/transforms/stack-split.d.ts +2 -1
  166. package/esm/data/transforms/stack-split.js +2 -2
  167. package/esm/data/transforms/stack-split.js.map +1 -1
  168. package/esm/data/transforms/treemap.d.ts +5 -3
  169. package/esm/data/transforms/treemap.js +8 -5
  170. package/esm/data/transforms/treemap.js.map +1 -1
  171. package/esm/data/transforms/venn.d.ts +4 -2
  172. package/esm/data/transforms/venn.js +5 -3
  173. package/esm/data/transforms/venn.js.map +1 -1
  174. package/esm/data/transforms/waterfall.d.ts +4 -2
  175. package/esm/data/transforms/waterfall.js +7 -8
  176. package/esm/data/transforms/waterfall.js.map +1 -1
  177. package/esm/series/base/base-series.js +2 -2
  178. package/esm/series/base/base-series.js.map +1 -1
  179. package/esm/series/box-plot/box-plot.js +2 -2
  180. package/esm/series/box-plot/box-plot.js.map +1 -1
  181. package/esm/series/correlation/correlation.js +13 -11
  182. package/esm/series/correlation/correlation.js.map +1 -1
  183. package/esm/series/dot/dot.d.ts +11 -0
  184. package/esm/series/dot/dot.js +17 -0
  185. package/esm/series/dot/dot.js.map +1 -1
  186. package/esm/series/funnel/funnel.js +5 -8
  187. package/esm/series/funnel/funnel.js.map +1 -1
  188. package/esm/series/map/map.js +3 -3
  189. package/esm/series/map/map.js.map +1 -1
  190. package/esm/series/polar/progress-like/progress-like.d.ts +2 -0
  191. package/esm/series/polar/progress-like/progress-like.js +17 -0
  192. package/esm/series/polar/progress-like/progress-like.js.map +1 -1
  193. package/esm/series/polar/rose-like/rose-like.d.ts +2 -0
  194. package/esm/series/polar/rose-like/rose-like.js +16 -0
  195. package/esm/series/polar/rose-like/rose-like.js.map +1 -1
  196. package/esm/series/progress/circular/circular.js +2 -1
  197. package/esm/series/progress/circular/circular.js.map +1 -1
  198. package/esm/series/progress/linear/linear.js +3 -1
  199. package/esm/series/progress/linear/linear.js.map +1 -1
  200. package/esm/series/sankey/sankey.js +35 -33
  201. package/esm/series/sankey/sankey.js.map +1 -1
  202. package/esm/series/treemap/treemap.js +23 -20
  203. package/esm/series/treemap/treemap.js.map +1 -1
  204. package/esm/series/venn/venn.js +2 -2
  205. package/esm/series/venn/venn.js.map +1 -1
  206. package/esm/series/waterfall/waterfall.js +26 -20
  207. package/esm/series/waterfall/waterfall.js.map +1 -1
  208. package/package.json +10 -10
package/build/index.js CHANGED
@@ -15775,13 +15775,11 @@
15775
15775
  };
15776
15776
  }
15777
15777
  recomputeCurrentStatePatch() {
15778
- var _a, _b, _c, _d;
15778
+ var _a, _b;
15779
15779
  if (!(null === (_a = this.currentStates) || void 0 === _a ? void 0 : _a.length)) return this.effectiveStates = [], this.resolvedStatePatch = void 0, void this.syncSharedStateActiveRegistrations();
15780
- const stateResolveBaseAttrs = null !== (_b = this.baseAttributes) && void 0 !== _b ? _b : this.attribute,
15781
- stateModel = this.createStateModel();
15782
- null === (_c = this.stateEngine) || void 0 === _c || _c.setResolveContext(this, stateResolveBaseAttrs);
15783
- const transition = stateModel.useStates(this.currentStates),
15784
- effectiveStates = null !== (_d = transition.effectiveStates) && void 0 !== _d ? _d : transition.states,
15780
+ const stateResolveBaseAttrs = this.getStateResolveBaseAttrs(),
15781
+ transition = this.createStateModel(stateResolveBaseAttrs).useStates(this.currentStates),
15782
+ effectiveStates = null !== (_b = transition.effectiveStates) && void 0 !== _b ? _b : transition.states,
15785
15783
  resolvedStateAttrs = this.stateEngine && this.compiledStateDefinitions ? Object.assign({}, this.stateEngine.resolvedPatch) : this.getStateStyleResolver(this.stateMergeMode).resolve(stateResolveBaseAttrs, this.states, this.stateProxy, transition.states, this.stateSort);
15786
15784
  this.currentStates = transition.states, this.effectiveStates = [...effectiveStates], this.resolvedStatePatch = resolvedStateAttrs, this.syncSharedStateActiveRegistrations();
15787
15785
  }
@@ -16374,7 +16372,15 @@
16374
16372
  var _a;
16375
16373
  return null === (_a = this.states) || void 0 === _a ? void 0 : _a[stateName];
16376
16374
  }
16377
- createStateModel() {
16375
+ getStateResolveBaseAttrs() {
16376
+ var _a;
16377
+ return null !== (_a = this.baseAttributes) && void 0 !== _a ? _a : this.attribute;
16378
+ }
16379
+ syncStateResolveContext(stateResolveBaseAttrs = this.getStateResolveBaseAttrs()) {
16380
+ var _a;
16381
+ return null === (_a = this.stateEngine) || void 0 === _a || _a.setResolveContext(this, stateResolveBaseAttrs), stateResolveBaseAttrs;
16382
+ }
16383
+ createStateModel(stateResolveBaseAttrs = this.getStateResolveBaseAttrs()) {
16378
16384
  const {
16379
16385
  compiledDefinitions: compiledDefinitions,
16380
16386
  stateProxyEligibility: stateProxyEligibility,
@@ -16387,7 +16393,7 @@
16387
16393
  stateProxyEligibility: stateProxyEligibility,
16388
16394
  states: this.states,
16389
16395
  mergeMode: this.stateMergeMode
16390
- }), this.stateEngineCompiledDefinitions = compiledDefinitions, this.stateEngineStateProxy = this.stateProxy, this.stateEngineStateSort = this.stateSort, this.stateEngineMergeMode = this.stateMergeMode, this.stateEngineStateProxyModeKey = stateProxyModeKey) : (this.stateEngine = void 0, this.stateEngineCompiledDefinitions = void 0, this.stateEngineStateProxyModeKey = void 0), new StateModel({
16396
+ }), this.stateEngineCompiledDefinitions = compiledDefinitions, this.stateEngineStateProxy = this.stateProxy, this.stateEngineStateSort = this.stateSort, this.stateEngineMergeMode = this.stateMergeMode, this.stateEngineStateProxyModeKey = stateProxyModeKey) : (this.stateEngine = void 0, this.stateEngineCompiledDefinitions = void 0, this.stateEngineStateProxyModeKey = void 0), this.syncStateResolveContext(stateResolveBaseAttrs), new StateModel({
16391
16397
  states: this.states,
16392
16398
  currentStates: this.currentStates,
16393
16399
  stateSort: this.stateSort,
@@ -16457,18 +16463,18 @@
16457
16463
  };
16458
16464
  }
16459
16465
  resolveGraphicStateTransition(states, previousStates, forceResolverRefresh = !1) {
16460
- var _a, _b, _c, _d;
16466
+ var _a, _b;
16461
16467
  let transition = this.resolveSimpleLocalStateTransition(states, previousStates);
16462
16468
  const isSimpleLocalTransition = !!transition;
16463
16469
  let resolvedStateAttrs;
16464
16470
  if (transition) resolvedStateAttrs = transition.resolvedStateAttrs;else {
16465
- const stateResolveBaseAttrs = null !== (_a = this.baseAttributes) && void 0 !== _a ? _a : this.attribute,
16466
- stateModel = this.createStateModel();
16467
- null === (_b = this.stateEngine) || void 0 === _b || _b.setResolveContext(this, stateResolveBaseAttrs), forceResolverRefresh && (null === (_c = this.stateEngine) || void 0 === _c || _c.invalidateResolverCache()), transition = stateModel.useStates(states), resolvedStateAttrs = this.stateEngine && this.compiledStateDefinitions ? Object.assign({}, this.stateEngine.resolvedPatch) : this.getStateStyleResolver(this.stateMergeMode).resolve(stateResolveBaseAttrs, this.states, this.stateProxy, transition.states, this.stateSort);
16471
+ const stateResolveBaseAttrs = this.getStateResolveBaseAttrs(),
16472
+ stateModel = this.createStateModel(stateResolveBaseAttrs);
16473
+ forceResolverRefresh && (null === (_a = this.stateEngine) || void 0 === _a || _a.invalidateResolverCache()), transition = stateModel.useStates(states), resolvedStateAttrs = this.stateEngine && this.compiledStateDefinitions ? Object.assign({}, this.stateEngine.resolvedPatch) : this.getStateStyleResolver(this.stateMergeMode).resolve(stateResolveBaseAttrs, this.states, this.stateProxy, transition.states, this.stateSort);
16468
16474
  }
16469
16475
  return {
16470
16476
  transition: transition,
16471
- effectiveStates: null !== (_d = transition.effectiveStates) && void 0 !== _d ? _d : transition.states,
16477
+ effectiveStates: null !== (_b = transition.effectiveStates) && void 0 !== _b ? _b : transition.states,
16472
16478
  resolvedStateAttrs: resolvedStateAttrs,
16473
16479
  isSimpleLocalTransition: isSimpleLocalTransition
16474
16480
  };
@@ -16639,10 +16645,10 @@
16639
16645
  }
16640
16646
  }
16641
16647
  invalidateResolver() {
16642
- var _a, _b, _c;
16648
+ var _a, _b;
16643
16649
  if (!this.stateEngine || !(null === (_a = this.currentStates) || void 0 === _a ? void 0 : _a.length) || !this.compiledStateDefinitions) return;
16644
- const stateResolveBaseAttrs = null !== (_b = this.baseAttributes) && void 0 !== _b ? _b : this.attribute;
16645
- this.stateEngine.setResolveContext(this, stateResolveBaseAttrs), this.resolverEpoch = (null !== (_c = this.resolverEpoch) && void 0 !== _c ? _c : 0) + 1, this.stateEngine.invalidateResolverCache();
16650
+ this.syncStateResolveContext();
16651
+ this.resolverEpoch = (null !== (_b = this.resolverEpoch) && void 0 !== _b ? _b : 0) + 1, this.stateEngine.invalidateResolverCache();
16646
16652
  const transition = this.stateEngine.applyStates(this.currentStates),
16647
16653
  resolvedStateAttrs = Object.assign({}, this.stateEngine.resolvedPatch);
16648
16654
  this.effectiveStates = [...transition.effectiveStates], this.resolvedStatePatch = resolvedStateAttrs, this.sharedStateDirty = !1, this.syncSharedStateActiveRegistrations(), this.stopStateAnimates(), this._restoreAttributeFromStaticTruth({
@@ -67808,32 +67814,35 @@
67808
67814
  return specInfos;
67809
67815
  };
67810
67816
 
67817
+ const resolveOptionValue$3 = (option) => (isFunction$1(option) ? option() : option);
67811
67818
  const lookup = (data, opt) => {
67812
- if (!opt.from || !opt.from()) {
67819
+ var _a;
67820
+ const fromData = (_a = opt.from) === null || _a === void 0 ? void 0 : _a.call(opt);
67821
+ if (!fromData) {
67813
67822
  return data;
67814
67823
  }
67815
- const fields = opt.fields;
67824
+ const fields = resolveOptionValue$3(opt.fields);
67816
67825
  const key = opt.key;
67817
67826
  const values = opt.values;
67818
67827
  const defaultValue = opt.default;
67819
67828
  const as = opt.as || [fields];
67820
- const index = opt.from().reduce(function (map, obj) {
67829
+ const index = fromData.reduce(function (map, obj) {
67821
67830
  if (obj[fields]) {
67822
- map.set(obj[fields], obj);
67831
+ map.set(`${obj[fields]}`, obj);
67823
67832
  }
67824
67833
  return map;
67825
67834
  }, new Map());
67826
67835
  let set;
67827
67836
  if (isFunction$1(opt.set)) {
67828
67837
  set = function (d) {
67829
- const v = index.get(d[key]);
67838
+ const v = index.get(`${d[key]}`);
67830
67839
  opt.set(d, v);
67831
67840
  };
67832
67841
  }
67833
67842
  else if (values) {
67834
67843
  const m = values.length;
67835
67844
  set = function (d) {
67836
- const v = index.get(d[key]);
67845
+ const v = index.get(`${d[key]}`);
67837
67846
  if (isNil$1(v)) {
67838
67847
  for (let i = 0; i < m; ++i) {
67839
67848
  d[as[i]] = defaultValue;
@@ -67848,7 +67857,7 @@
67848
67857
  }
67849
67858
  else {
67850
67859
  set = function (d) {
67851
- const v = index.get(d[key]);
67860
+ const v = index.get(`${d[key]}`);
67852
67861
  d[as[0]] = isValid$1(v) ? v : defaultValue;
67853
67862
  };
67854
67863
  }
@@ -69149,9 +69158,9 @@
69149
69158
  });
69150
69159
  this._viewStackData.transform({
69151
69160
  type: 'stackSplit',
69152
- options: {
69161
+ options: () => ({
69153
69162
  fields: this.getStackGroupFields()
69154
- }
69163
+ })
69155
69164
  }, false);
69156
69165
  }
69157
69166
  _noAnimationDataKey(datum, index) {
@@ -75974,17 +75983,10 @@
75974
75983
  [ComponentTypeEnum.markArea]: true
75975
75984
  };
75976
75985
  const MARKER_ADDITION_REMAKE_SPEC_KEYS = {
75977
- autoRange: true,
75978
75986
  regionId: true,
75979
75987
  regionIndex: true,
75980
75988
  seriesId: true,
75981
75989
  seriesIndex: true,
75982
- relativeSeriesId: true,
75983
- relativeSeriesIndex: true,
75984
- startRelativeSeriesId: true,
75985
- startRelativeSeriesIndex: true,
75986
- endRelativeSeriesId: true,
75987
- endRelativeSeriesIndex: true,
75988
75990
  specifiedDataSeriesId: true,
75989
75991
  specifiedDataSeriesIndex: true
75990
75992
  };
@@ -76163,10 +76165,14 @@
76163
76165
  return this._components.filter(c => c.type === type);
76164
76166
  };
76165
76167
  this._isMarkerAdditionSpecSafeWithoutRemake = (spec) => {
76166
- if (!spec || typeof spec !== 'object' || spec.visible === false) {
76168
+ if (!spec || typeof spec !== 'object') {
76169
+ return false;
76170
+ }
76171
+ const markerSpec = spec;
76172
+ if (markerSpec.visible === false) {
76167
76173
  return false;
76168
76174
  }
76169
- return !Object.keys(MARKER_ADDITION_REMAKE_SPEC_KEYS).some(key => !isNil$1(spec[key]));
76175
+ return !Object.keys(MARKER_ADDITION_REMAKE_SPEC_KEYS).some(key => !isNil$1(markerSpec[key]));
76170
76176
  };
76171
76177
  this._paddingSpec = normalizeLayoutPaddingSpec((_a = spec.padding) !== null && _a !== void 0 ? _a : option.getTheme('padding'));
76172
76178
  this._event = new Event$1(option.eventDispatcher, option.mode);
@@ -76603,6 +76609,9 @@
76603
76609
  const onlyMarkerComponentsRemoved = this._isOnlyMarkerComponentsRemoved(this._spec, spec, currentKeys);
76604
76610
  const onlyComponentSpecsChanged = this._isOnlyComponentSpecsChanged(this._spec, spec, currentKeys);
76605
76611
  const onlySeriesSpecsChanged = this._isOnlySeriesSpecsChanged(this._spec, spec, currentKeys);
76612
+ const onlyComponentOrSeriesSpecsChanged = onlyComponentSpecsChanged || onlySeriesSpecsChanged
76613
+ ? true
76614
+ : this._isOnlyComponentOrSeriesSpecsChanged(this._spec, spec, currentKeys);
76606
76615
  this._spec = spec;
76607
76616
  if (onlyMarkerComponentsRemoved) {
76608
76617
  this._removeMarkerComponentsForEmptySpecs(result);
@@ -76651,7 +76660,7 @@
76651
76660
  return result;
76652
76661
  }
76653
76662
  this.reInit();
76654
- if (!onlySeriesSpecsChanged || !this._canSkipChartDataStages(result)) {
76663
+ if (!onlyComponentOrSeriesSpecsChanged || !this._canSkipChartDataStages(result)) {
76655
76664
  this.updateDataSpec();
76656
76665
  this.reDataFlow();
76657
76666
  this._reRunStackDataFlow();
@@ -76784,6 +76793,9 @@
76784
76793
  }
76785
76794
  return nextSpec.slice(currentSpec.length).every(this._isMarkerAdditionSpecSafeWithoutRemake);
76786
76795
  }
76796
+ _isAutoRangeMarkerSpec(spec) {
76797
+ return !!spec && typeof spec === 'object' && spec.autoRange === true;
76798
+ }
76787
76799
  _canRemoveMarkerComponentsWithoutRemake(key, currentSpec, nextSpec) {
76788
76800
  return (MARKER_COMPONENT_SPEC_KEYS[key] &&
76789
76801
  isArray$1(currentSpec) &&
@@ -76844,6 +76856,24 @@
76844
76856
  });
76845
76857
  return hasSeriesSpecChange && onlySeriesSpecChange;
76846
76858
  }
76859
+ _isOnlyComponentOrSeriesSpecsChanged(currentSpec, nextSpec, specKeys) {
76860
+ var _a, _b;
76861
+ let hasComponentOrSeriesSpecChange = false;
76862
+ const currentSpecRecord = currentSpec;
76863
+ const nextSpecRecord = nextSpec;
76864
+ const seriesRelatedSpecKeys = (_b = (_a = this._specTransformer) === null || _a === void 0 ? void 0 : _a.getSeriesRelatedSpecKeys()) !== null && _b !== void 0 ? _b : {};
76865
+ const onlyComponentOrSeriesSpecChange = specKeys.every(key => {
76866
+ if (isEqual(currentSpecRecord[key], nextSpecRecord[key])) {
76867
+ return true;
76868
+ }
76869
+ if (this._isComponentSpecKey(key) || seriesRelatedSpecKeys[key]) {
76870
+ hasComponentOrSeriesSpecChange = true;
76871
+ return true;
76872
+ }
76873
+ return false;
76874
+ });
76875
+ return hasComponentOrSeriesSpecChange && onlyComponentOrSeriesSpecChange;
76876
+ }
76847
76877
  _canSkipChartDataStages(result) {
76848
76878
  const effects = result.effects;
76849
76879
  return !!(effects === null || effects === void 0 ? void 0 : effects.series) && !effects.remake && !effects.data && !effects.scaleDomain && !result.reMake;
@@ -76892,6 +76922,7 @@
76892
76922
  _createMissingMarkerComponentsForSpecs(result, componentCache) {
76893
76923
  var _a;
76894
76924
  let createdCount = 0;
76925
+ let hasAutoRangeMarker = false;
76895
76926
  (_a = this._specTransformer) === null || _a === void 0 ? void 0 : _a.forEachComponentInSpec(this._spec, (constructor, specInfo) => {
76896
76927
  if (result.reMake) {
76897
76928
  return;
@@ -76909,12 +76940,13 @@
76909
76940
  componentCache[compSpecKey].componentCount++;
76910
76941
  }
76911
76942
  createdCount++;
76943
+ hasAutoRangeMarker = hasAutoRangeMarker || this._isAutoRangeMarkerSpec(specInfo.spec);
76912
76944
  }, this._option.getSpecInfo());
76913
76945
  if (!createdCount) {
76914
76946
  return;
76915
76947
  }
76916
76948
  result.change = true;
76917
- result.effects = Object.assign(Object.assign({}, result.effects), { component: true, layout: true, render: true });
76949
+ result.effects = Object.assign(Object.assign(Object.assign(Object.assign({}, result.effects), { component: true }), (hasAutoRangeMarker ? { scaleDomain: true } : null)), { layout: true, render: true });
76918
76950
  }
76919
76951
  _removeMarkerComponentsForEmptySpecs(result) {
76920
76952
  const removedComponents = this._components.filter(component => {
@@ -77745,7 +77777,7 @@
77745
77777
  const result = {
77746
77778
  nodes: {}
77747
77779
  };
77748
- const { fields } = op;
77780
+ const { fields } = isFunction$1(op) ? op() : op;
77749
77781
  if (!(fields === null || fields === void 0 ? void 0 : fields.length)) {
77750
77782
  return result;
77751
77783
  }
@@ -80603,20 +80635,23 @@
80603
80635
  }
80604
80636
 
80605
80637
  const map$1 = (data, opt) => {
80606
- if (data.features) {
80607
- data.features.forEach((f, index) => {
80608
- var _a;
80638
+ const options = isFunction$1(opt) ? opt() : opt;
80639
+ const features = data.features;
80640
+ if (features) {
80641
+ features.forEach((f, index) => {
80642
+ var _a, _b;
80609
80643
  f[DEFAULT_DATA_INDEX] = index;
80610
- const name = (_a = f.properties) === null || _a === void 0 ? void 0 : _a[opt.nameProperty];
80611
- if (opt.nameMap && opt.nameMap[name]) {
80612
- f[DEFAULT_MAP_LOOK_UP_KEY] = opt.nameMap[name];
80644
+ const name = (_a = f.properties) === null || _a === void 0 ? void 0 : _a[options.nameProperty];
80645
+ const mappedName = (_b = options.nameMap) === null || _b === void 0 ? void 0 : _b[`${name}`];
80646
+ if (mappedName) {
80647
+ f[DEFAULT_MAP_LOOK_UP_KEY] = mappedName;
80613
80648
  }
80614
80649
  else {
80615
80650
  f[DEFAULT_MAP_LOOK_UP_KEY] = name;
80616
80651
  }
80617
80652
  });
80618
80653
  }
80619
- return data.features;
80654
+ return features;
80620
80655
  };
80621
80656
 
80622
80657
  class MapSeriesTooltipHelper extends BaseSeriesTooltipHelper {
@@ -81523,17 +81558,17 @@
81523
81558
  .transform({ type: 'copyDataView', options: { deep: true }, level: exports.TransformLevel.copyDataView })
81524
81559
  .transform({
81525
81560
  type: 'map',
81526
- options: {
81561
+ options: () => ({
81527
81562
  nameMap: this._nameMap,
81528
81563
  nameProperty: this._nameProperty
81529
- }
81564
+ })
81530
81565
  })
81531
81566
  .transform({
81532
81567
  type: 'lookup',
81533
81568
  options: {
81534
81569
  from: () => { var _a; return (_a = this._data) === null || _a === void 0 ? void 0 : _a.getLatestData(); },
81535
81570
  key: DEFAULT_MAP_LOOK_UP_KEY,
81536
- fields: this._nameField,
81571
+ fields: () => this._nameField,
81537
81572
  set: (feature, datum) => {
81538
81573
  if (datum) {
81539
81574
  Object.keys(datum).forEach(key => {
@@ -81752,7 +81787,8 @@
81752
81787
  if (!lastData || lastData.length === 0) {
81753
81788
  return lastData;
81754
81789
  }
81755
- const { indexField, total: totalSpec, groupData, calculationMode } = op;
81790
+ const options = isFunction$1(op) ? op() : op;
81791
+ const { indexField, total: totalSpec, groupData, calculationMode } = options;
81756
81792
  const totalData = [];
81757
81793
  const { dimensionValues, dimensionData } = groupData().latestData;
81758
81794
  let indexValues = Array.from(dimensionValues[indexField]);
@@ -81777,7 +81813,7 @@
81777
81813
  positive: temp.end,
81778
81814
  negative: temp.end
81779
81815
  };
81780
- const indexData = op.stackInverse === true ? dimensionData[key].reverse() : dimensionData[key];
81816
+ const indexData = options.stackInverse === true ? dimensionData[key].reverse() : dimensionData[key];
81781
81817
  indexData === null || indexData === void 0 ? void 0 : indexData.forEach((d, i) => {
81782
81818
  if (i === indexData.length - 1) {
81783
81819
  d[STACK_FIELD_TOTAL_TOP] = true;
@@ -81801,12 +81837,12 @@
81801
81837
  };
81802
81838
  const isTotalTag = indexData.some(d => isTotalCheck(d));
81803
81839
  if (isTotalTag) {
81804
- temp = computeTotalWithMultipleData(indexData, key, total, totalData, temp, indexValues, index, op, isTotalCheck);
81840
+ temp = computeTotalWithMultipleData(indexData, key, total, totalData, temp, indexValues, index, options, isTotalCheck);
81805
81841
  totalData.push(total);
81806
81842
  return;
81807
81843
  }
81808
81844
  }
81809
- temp = computeNormalData(indexData, key, total, totalData, temp, indexValues, index, op);
81845
+ temp = computeNormalData(indexData, key, total, totalData, temp, indexValues, index, options);
81810
81846
  totalData.push(total);
81811
81847
  });
81812
81848
  return totalData;
@@ -81977,7 +82013,7 @@
81977
82013
  if (!data) {
81978
82014
  return data;
81979
82015
  }
81980
- const { indexField, valueField, total, seriesField, calculationMode } = op;
82016
+ const { indexField, valueField, total, seriesField, calculationMode } = isFunction$1(op) ? op() : op;
81981
82017
  const totalData = {
81982
82018
  [indexField]: (total === null || total === void 0 ? void 0 : total.text) || 'total',
81983
82019
  [valueField]: data.reduce((pre, cur) => precisionAdd(pre, +cur[valueField]), 0)
@@ -81986,12 +82022,9 @@
81986
82022
  totalData[seriesField] = 'total';
81987
82023
  }
81988
82024
  if (calculationMode === 'decrease') {
81989
- data.unshift(totalData);
82025
+ return [totalData, ...data];
81990
82026
  }
81991
- else {
81992
- data.push(totalData);
81993
- }
81994
- return data;
82027
+ return [...data, totalData];
81995
82028
  };
81996
82029
 
81997
82030
  const Appear_FadeIn$6 = {
@@ -82654,21 +82687,24 @@
82654
82687
  return super.getSeriesKeys();
82655
82688
  }
82656
82689
  initData() {
82657
- var _a, _b, _c;
82690
+ var _a;
82658
82691
  super.initData();
82659
82692
  registerDataSetInstanceTransform(this._dataSet, 'waterfallFillTotal', waterfallFillTotal);
82660
82693
  registerDataSetInstanceTransform(this._dataSet, 'waterfall', waterfall$1);
82661
82694
  if (isNil$1(this._spec.total) || this._spec.total.type === 'end') {
82662
82695
  (_a = this._rawData) === null || _a === void 0 ? void 0 : _a.transform({
82663
82696
  type: 'waterfallFillTotal',
82664
- options: {
82665
- indexField: this.getGroupFields()[0],
82666
- valueField: this.getStackValueField(),
82667
- seriesField: this.getSeriesField(),
82668
- seriesFieldName: this._theme.seriesFieldName,
82669
- total: this._spec.total,
82670
- calculationMode: (_b = this._spec.calculationMode) !== null && _b !== void 0 ? _b : 'increase',
82671
- stackInverse: this.getRegion().getStackInverse()
82697
+ options: () => {
82698
+ var _a;
82699
+ return ({
82700
+ indexField: this.getGroupFields()[0],
82701
+ valueField: this.getStackValueField(),
82702
+ seriesField: this.getSeriesField(),
82703
+ seriesFieldName: this._theme.seriesFieldName,
82704
+ total: this._spec.total,
82705
+ calculationMode: (_a = this._spec.calculationMode) !== null && _a !== void 0 ? _a : 'increase',
82706
+ stackInverse: this.getRegion().getStackInverse()
82707
+ });
82672
82708
  }
82673
82709
  }, false);
82674
82710
  }
@@ -82679,17 +82715,20 @@
82679
82715
  this._totalData = new CompilableData(this._option, totalData);
82680
82716
  totalData.transform({
82681
82717
  type: 'waterfall',
82682
- options: {
82683
- indexField: this.getGroupFields()[0],
82684
- valueField: this.getStackValueField(),
82685
- seriesField: this.getSeriesField(),
82686
- seriesFieldName: this._theme.seriesFieldName,
82687
- startAs: STACK_FIELD_START,
82688
- endAs: STACK_FIELD_END,
82689
- total: this._spec.total,
82690
- calculationMode: (_c = this._spec.calculationMode) !== null && _c !== void 0 ? _c : 'increase',
82691
- groupData: () => this.getGroups().groupData,
82692
- stackInverse: this.getRegion().getStackInverse()
82718
+ options: () => {
82719
+ var _a;
82720
+ return ({
82721
+ indexField: this.getGroupFields()[0],
82722
+ valueField: this.getStackValueField(),
82723
+ seriesField: this.getSeriesField(),
82724
+ seriesFieldName: this._theme.seriesFieldName,
82725
+ startAs: STACK_FIELD_START,
82726
+ endAs: STACK_FIELD_END,
82727
+ total: this._spec.total,
82728
+ calculationMode: (_a = this._spec.calculationMode) !== null && _a !== void 0 ? _a : 'increase',
82729
+ groupData: () => this.getGroups().groupData,
82730
+ stackInverse: this.getRegion().getStackInverse()
82731
+ });
82693
82732
  }
82694
82733
  }, false);
82695
82734
  totalData.target.addListener('change', this._reStackTotal);
@@ -82880,13 +82919,12 @@
82880
82919
 
82881
82920
  const foldOutlierData = (data, op) => {
82882
82921
  const result = [];
82883
- const { outliersField, dimensionField, seriesField } = op;
82922
+ const options = isFunction$1(op) ? op() : op;
82923
+ const { outliersField, dimensionField, seriesField } = options;
82884
82924
  const latestData = data[0].latestData || [];
82885
- latestData.forEach((d) => {
82886
- let outlierValues = d[outliersField];
82887
- if (!isArray$1(outlierValues)) {
82888
- outlierValues = [outlierValues];
82889
- }
82925
+ latestData.forEach(d => {
82926
+ const rawOutlierValues = d[outliersField];
82927
+ const outlierValues = isArray$1(rawOutlierValues) ? rawOutlierValues : [rawOutlierValues];
82890
82928
  result.push(...outlierValues.map((v) => {
82891
82929
  const resData = {
82892
82930
  [BOX_PLOT_OUTLIER_VALUE_FIELD]: v
@@ -83875,11 +83913,11 @@
83875
83913
  outlierDataView.name = `${PREFIX}_series_${this.id}_outlierData`;
83876
83914
  outlierDataView.transform({
83877
83915
  type: 'foldOutlierData',
83878
- options: {
83916
+ options: () => ({
83879
83917
  dimensionField: this._direction === "horizontal" ? this._fieldY : this._fieldX,
83880
83918
  outliersField: this._outliersField,
83881
83919
  seriesField: this._seriesField
83882
- }
83920
+ })
83883
83921
  });
83884
83922
  outlierDataView.transform({
83885
83923
  type: 'addVChartProperty',
@@ -85566,7 +85604,20 @@
85566
85604
  });
85567
85605
  };
85568
85606
 
85607
+ const ROSE_LIKE_SERIES_COMPILE_ONLY_KEYS = {
85608
+ radius: true,
85609
+ outerRadius: true,
85610
+ innerRadius: true,
85611
+ startAngle: true,
85612
+ endAngle: true,
85613
+ centerX: true,
85614
+ centerY: true
85615
+ };
85569
85616
  class RoseLikeSeries extends PolarSeries {
85617
+ _getSpecUpdatePolicy() {
85618
+ const policy = super._getSpecUpdatePolicy();
85619
+ return Object.assign(Object.assign({}, policy), { compileOnlyKeys: Object.assign(Object.assign({}, policy.compileOnlyKeys), ROSE_LIKE_SERIES_COMPILE_ONLY_KEYS) });
85620
+ }
85570
85621
  getStackGroupFields() {
85571
85622
  return this._angleField;
85572
85623
  }
@@ -86034,8 +86085,11 @@
86034
86085
  this._scale = new LinearScale();
86035
86086
  }
86036
86087
  setAttrFromSpec() {
86088
+ var _a, _b;
86037
86089
  super.setAttrFromSpec();
86038
86090
  this.setExtraAttrFromSpec();
86091
+ const tickTransform = (_b = (_a = this._tickData) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.getDataView().transformsArr.find(t => t.type === this.registerTicksTransform());
86092
+ tickTransform && (tickTransform.options = this._tickTransformOption());
86039
86093
  }
86040
86094
  initScales() {
86041
86095
  super.initScales();
@@ -86106,6 +86160,10 @@
86106
86160
  super.initScales();
86107
86161
  this.calcScales(this._defaultBandInnerPadding, this._defaultBandOuterPadding);
86108
86162
  }
86163
+ reInit(spec) {
86164
+ super.reInit(spec);
86165
+ this._updateData();
86166
+ }
86109
86167
  registerTicksTransform() {
86110
86168
  const name = `${this.type}-ticks`;
86111
86169
  registerDataSetInstanceTransform(this._option.dataSet, name, polarAngleAxisDiscreteTicks);
@@ -86791,6 +86849,16 @@
86791
86849
  }
86792
86850
  };
86793
86851
 
86852
+ const DOT_SERIES_COMPILE_ONLY_KEYS = {
86853
+ highLightSeriesGroup: true,
86854
+ titleField: true,
86855
+ subTitleField: true
86856
+ };
86857
+ const DOT_SERIES_COMPILE_ONLY_SUB_KEYS = {
86858
+ grid: {
86859
+ background: true
86860
+ }
86861
+ };
86794
86862
  class DotSeries extends CartesianSeries {
86795
86863
  constructor() {
86796
86864
  super(...arguments);
@@ -86841,6 +86909,10 @@
86841
86909
  this._gridBackground = gridBackground;
86842
86910
  }
86843
86911
  }
86912
+ _getSpecUpdatePolicy() {
86913
+ const policy = super._getSpecUpdatePolicy();
86914
+ return Object.assign(Object.assign({}, policy), { compileOnlyKeys: Object.assign(Object.assign({}, policy.compileOnlyKeys), DOT_SERIES_COMPILE_ONLY_KEYS), compileOnlySubKeys: Object.assign(Object.assign({}, policy.compileOnlySubKeys), DOT_SERIES_COMPILE_ONLY_SUB_KEYS) });
86915
+ }
86844
86916
  initData() {
86845
86917
  var _a;
86846
86918
  super.initData();
@@ -87440,6 +87512,16 @@
87440
87512
 
87441
87513
  const progressLikeSeriesMark = Object.assign(Object.assign({}, baseSeriesMark), { ["group"]: { name: "group", type: "group" } });
87442
87514
 
87515
+ const PROGRESS_LIKE_SERIES_COMPILE_ONLY_KEYS = {
87516
+ radius: true,
87517
+ outerRadius: true,
87518
+ innerRadius: true,
87519
+ startAngle: true,
87520
+ endAngle: true,
87521
+ centerX: true,
87522
+ centerY: true,
87523
+ clamp: true
87524
+ };
87443
87525
  class ProgressLikeSeries extends PolarSeries {
87444
87526
  constructor() {
87445
87527
  super(...arguments);
@@ -87505,6 +87587,10 @@
87505
87587
  return this._getAngleValueEndWithoutMask(datum);
87506
87588
  };
87507
87589
  }
87590
+ _getSpecUpdatePolicy() {
87591
+ const policy = super._getSpecUpdatePolicy();
87592
+ return Object.assign(Object.assign({}, policy), { compileOnlyKeys: Object.assign(Object.assign({}, policy.compileOnlyKeys), PROGRESS_LIKE_SERIES_COMPILE_ONLY_KEYS) });
87593
+ }
87508
87594
  setAttrFromSpec() {
87509
87595
  var _a, _b, _c;
87510
87596
  super.setAttrFromSpec();
@@ -87720,7 +87806,8 @@
87720
87806
  };
87721
87807
 
87722
87808
  const CIRCULAR_PROGRESS_SERIES_COMPILE_ONLY_KEYS = {
87723
- cornerRadius: true
87809
+ cornerRadius: true,
87810
+ roundCap: true
87724
87811
  };
87725
87812
  class CircularProgressSeries extends ProgressLikeSeries {
87726
87813
  constructor() {
@@ -87947,7 +88034,9 @@
87947
88034
  };
87948
88035
 
87949
88036
  const LINEAR_PROGRESS_SERIES_COMPILE_ONLY_KEYS = {
87950
- bandWidth: true
88037
+ bandWidth: true,
88038
+ cornerRadius: true,
88039
+ clamp: true
87951
88040
  };
87952
88041
  const LINEAR_PROGRESS_SERIES_COMPILE_ONLY_SUB_KEYS = {
87953
88042
  progress: {
@@ -94018,16 +94107,21 @@
94018
94107
  registerWordCloudSeries();
94019
94108
  };
94020
94109
 
94110
+ const resolveOptionValue$2 = (option) => (isFunction$1(option) ? option() : option);
94021
94111
  const funnel = (originData, op) => {
94022
- var _a, _b;
94112
+ var _a, _b, _c, _d;
94023
94113
  const data = originData.map(datum => (Object.assign({}, datum)));
94024
94114
  if (!data || data.length === 0) {
94025
94115
  return data;
94026
94116
  }
94027
- const { valueField, asTransformRatio, asReachRatio, asHeightRatio, asValueRatio, asNextValueRatio, asLastValueRatio, asLastValue, asCurrentValue, asNextValue, heightVisual = false, isCone = true, range } = op;
94117
+ const { asTransformRatio, asReachRatio, asHeightRatio, asValueRatio, asNextValueRatio, asLastValueRatio, asLastValue, asCurrentValue, asNextValue, } = op;
94118
+ const valueField = resolveOptionValue$2(op.valueField);
94119
+ const heightVisual = (_a = resolveOptionValue$2(op.heightVisual)) !== null && _a !== void 0 ? _a : false;
94120
+ const isCone = (_b = resolveOptionValue$2(op.isCone)) !== null && _b !== void 0 ? _b : true;
94121
+ const range = resolveOptionValue$2(op.range);
94028
94122
  const max = data.reduce((m, d) => Math.max(m, Number.parseFloat(d[valueField]) || -Infinity), -Infinity);
94029
94123
  const min = data.reduce((m, d) => Math.min(m, Number.parseFloat(d[valueField]) || Infinity), Infinity);
94030
- const rangeArr = [(_a = range === null || range === void 0 ? void 0 : range.min) !== null && _a !== void 0 ? _a : min, (_b = range === null || range === void 0 ? void 0 : range.max) !== null && _b !== void 0 ? _b : max];
94124
+ const rangeArr = [(_c = range === null || range === void 0 ? void 0 : range.min) !== null && _c !== void 0 ? _c : min, (_d = range === null || range === void 0 ? void 0 : range.max) !== null && _d !== void 0 ? _d : max];
94031
94125
  data.forEach((d, i) => {
94032
94126
  var _a, _b;
94033
94127
  const currentValue = Number.parseFloat(d[valueField]);
@@ -94055,7 +94149,7 @@
94055
94149
  return data;
94056
94150
  }
94057
94151
  data.shift();
94058
- data.forEach((d) => {
94152
+ data.forEach(d => {
94059
94153
  d[op.asIsTransformLevel] = true;
94060
94154
  });
94061
94155
  return data;
@@ -94233,13 +94327,13 @@
94233
94327
  return fields;
94234
94328
  }
94235
94329
  _statisticViewData() {
94236
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
94330
+ var _a;
94237
94331
  super._statisticViewData();
94238
94332
  this._data.getDataView().transform({
94239
94333
  type: 'funnel',
94240
94334
  options: {
94241
- valueField: this.getValueField(),
94242
- isCone: this._spec.isCone,
94335
+ valueField: () => this.getValueField(),
94336
+ isCone: () => this._spec.isCone,
94243
94337
  asCurrentValue: FUNNEL_CURRENT_VALUE,
94244
94338
  asTransformRatio: FUNNEL_TRANSFORM_RATIO,
94245
94339
  asReachRatio: FUNNEL_REACH_RATIO,
@@ -94249,13 +94343,10 @@
94249
94343
  asLastValueRatio: FUNNEL_LAST_VALUE_RATIO,
94250
94344
  asLastValue: FUNNEL_LAST_VALUE,
94251
94345
  asNextValue: FUNNEL_NEXT_VALUE,
94252
- range: {
94253
- min: (_b = (_a = this._spec.range) === null || _a === void 0 ? void 0 : _a.min) !== null && _b !== void 0 ? _b : (_d = (_c = this.getViewDataStatistics().latestData) === null || _c === void 0 ? void 0 : _c[this.getValueField()]) === null || _d === void 0 ? void 0 : _d.min,
94254
- max: (_f = (_e = this._spec.range) === null || _e === void 0 ? void 0 : _e.max) !== null && _f !== void 0 ? _f : (_h = (_g = this.getViewDataStatistics().latestData) === null || _g === void 0 ? void 0 : _g[this.getValueField()]) === null || _h === void 0 ? void 0 : _h.max
94255
- }
94346
+ range: () => this._spec.range
94256
94347
  }
94257
94348
  });
94258
- (_j = this._viewDataTransform.getDataView()) === null || _j === void 0 ? void 0 : _j.transform({
94349
+ (_a = this._viewDataTransform.getDataView()) === null || _a === void 0 ? void 0 : _a.transform({
94259
94350
  type: 'funnelTransform',
94260
94351
  options: { asIsTransformLevel: FUNNEL_TRANSFORM_LEVEL }
94261
94352
  });
@@ -95674,7 +95765,7 @@
95674
95765
  };
95675
95766
 
95676
95767
  const collectHierarchyField = (set, data, field) => {
95677
- data.forEach((obj) => {
95768
+ data.forEach(obj => {
95678
95769
  if (!isNil$1(obj[field])) {
95679
95770
  set.add(obj[field]);
95680
95771
  }
@@ -95693,7 +95784,7 @@
95693
95784
  links: [],
95694
95785
  nodes: []
95695
95786
  };
95696
- data.forEach((datum) => {
95787
+ data.forEach(datum => {
95697
95788
  if (datum.id === 'links' || datum.id === 'nodes') {
95698
95789
  updateData[datum.id] = datum.values;
95699
95790
  }
@@ -95706,10 +95797,11 @@
95706
95797
  return data;
95707
95798
  };
95708
95799
  const sankeyLayout = (data, op) => {
95709
- if (!data || !(op === null || op === void 0 ? void 0 : op.view) || !data.length) {
95800
+ const options = isFunction$1(op) ? op() : op;
95801
+ if (!data || !(options === null || options === void 0 ? void 0 : options.view) || !data.length) {
95710
95802
  return [];
95711
95803
  }
95712
- const view = op.view();
95804
+ const view = options.view();
95713
95805
  if (view.x1 - view.x0 === 0 ||
95714
95806
  view.y1 - view.y0 === 0 ||
95715
95807
  view.x1 - view.x0 === -Infinity ||
@@ -95719,35 +95811,41 @@
95719
95811
  return [];
95720
95812
  }
95721
95813
  const originalData = data[0];
95722
- if (op.sourceField !== 'source' || op.targetField !== 'target' || op.valueField !== 'value') {
95723
- if (originalData.links) {
95724
- const updatedData = [];
95725
- originalData.links.forEach((datum) => {
95726
- const updatedDatum = {};
95727
- for (const key in datum) {
95728
- if (key === op.sourceField) {
95729
- updatedDatum.source = datum[op.sourceField];
95730
- }
95731
- else if (key === op.targetField) {
95732
- updatedDatum.target = datum[op.targetField];
95733
- }
95734
- else if (key === op.valueField) {
95735
- updatedDatum.value = datum[op.valueField];
95736
- }
95737
- else {
95738
- updatedDatum[key] = datum[key];
95739
- }
95740
- }
95741
- updatedData.push(updatedDatum);
95742
- });
95743
- originalData.links = updatedData;
95744
- }
95745
- }
95746
- const layout = new SankeyLayout(op);
95814
+ const layoutData = normalizeSankeyData(originalData, options);
95815
+ const layout = new SankeyLayout(options);
95747
95816
  const result = [];
95748
- result.push(layout.layout(originalData, view));
95817
+ result.push(layout.layout(layoutData, view));
95749
95818
  return result;
95750
95819
  };
95820
+ const normalizeSankeyData = (data, options) => {
95821
+ if (options.sourceField === 'source' &&
95822
+ options.targetField === 'target' &&
95823
+ options.valueField === 'value') {
95824
+ return data;
95825
+ }
95826
+ const links = data.links;
95827
+ if (!links) {
95828
+ return data;
95829
+ }
95830
+ return Object.assign(Object.assign({}, data), { links: links.map(link => {
95831
+ const updatedLink = {};
95832
+ Object.keys(link).forEach(key => {
95833
+ if (key === options.sourceField) {
95834
+ updatedLink.source = link[options.sourceField];
95835
+ }
95836
+ else if (key === options.targetField) {
95837
+ updatedLink.target = link[options.targetField];
95838
+ }
95839
+ else if (key === options.valueField) {
95840
+ updatedLink.value = link[options.valueField];
95841
+ }
95842
+ else {
95843
+ updatedLink[key] = link[key];
95844
+ }
95845
+ });
95846
+ return updatedLink;
95847
+ }) });
95848
+ };
95751
95849
 
95752
95850
  const sankeyNodes = (data) => {
95753
95851
  var _a, _b;
@@ -96597,7 +96695,6 @@
96597
96695
  this.setSeriesField((_a = this._spec.seriesField) !== null && _a !== void 0 ? _a : this._spec.categoryField);
96598
96696
  }
96599
96697
  initData() {
96600
- var _a, _b, _c, _d;
96601
96698
  super.initData();
96602
96699
  const viewData = this.getViewData();
96603
96700
  const rawData = this.getRawData();
@@ -96609,40 +96706,43 @@
96609
96706
  }, false);
96610
96707
  viewData.transform({
96611
96708
  type: 'sankeyLayout',
96612
- options: {
96613
- view: () => {
96614
- return {
96615
- x0: this._viewBox.x1,
96616
- x1: this._viewBox.x2,
96617
- y0: this._viewBox.y1,
96618
- y1: this._viewBox.y2
96619
- };
96620
- },
96621
- sourceField: this._spec.sourceField,
96622
- targetField: this._spec.targetField,
96623
- valueField: this._spec.valueField,
96624
- direction: this.direction,
96625
- crossNodeAlign: this._spec.crossNodeAlign,
96626
- nodeAlign: (_a = this._spec.nodeAlign) !== null && _a !== void 0 ? _a : 'justify',
96627
- nodeGap: (_b = this._spec.nodeGap) !== null && _b !== void 0 ? _b : 8,
96628
- nodeWidth: (_c = this._spec.nodeWidth) !== null && _c !== void 0 ? _c : 10,
96629
- linkWidth: this._spec.linkWidth,
96630
- minStepWidth: this._spec.minStepWidth,
96631
- minNodeHeight: (_d = this._spec.minNodeHeight) !== null && _d !== void 0 ? _d : 4,
96632
- maxNodeHeight: this._spec.maxNodeHeight,
96633
- minLinkHeight: this._spec.minLinkHeight,
96634
- maxLinkHeight: this._spec.maxLinkHeight,
96635
- iterations: this._spec.iterations,
96636
- nodeKey: this._spec.nodeKey,
96637
- linkSortBy: this._spec.linkSortBy,
96638
- nodeSortBy: this._spec.nodeSortBy,
96639
- setNodeLayer: this._spec.setNodeLayer,
96640
- dropIsolatedNode: this._spec.dropIsolatedNode,
96641
- nodeHeight: this._spec.nodeHeight,
96642
- linkHeight: this._spec.linkHeight,
96643
- equalNodeHeight: this._spec.equalNodeHeight,
96644
- linkOverlap: this._spec.linkOverlap,
96645
- inverse: this._spec.inverse
96709
+ options: () => {
96710
+ var _a, _b, _c, _d;
96711
+ return ({
96712
+ view: () => {
96713
+ return {
96714
+ x0: this._viewBox.x1,
96715
+ x1: this._viewBox.x2,
96716
+ y0: this._viewBox.y1,
96717
+ y1: this._viewBox.y2
96718
+ };
96719
+ },
96720
+ sourceField: this._spec.sourceField,
96721
+ targetField: this._spec.targetField,
96722
+ valueField: this._spec.valueField,
96723
+ direction: this.direction,
96724
+ crossNodeAlign: this._spec.crossNodeAlign,
96725
+ nodeAlign: (_a = this._spec.nodeAlign) !== null && _a !== void 0 ? _a : 'justify',
96726
+ nodeGap: (_b = this._spec.nodeGap) !== null && _b !== void 0 ? _b : 8,
96727
+ nodeWidth: (_c = this._spec.nodeWidth) !== null && _c !== void 0 ? _c : 10,
96728
+ linkWidth: this._spec.linkWidth,
96729
+ minStepWidth: this._spec.minStepWidth,
96730
+ minNodeHeight: (_d = this._spec.minNodeHeight) !== null && _d !== void 0 ? _d : 4,
96731
+ maxNodeHeight: this._spec.maxNodeHeight,
96732
+ minLinkHeight: this._spec.minLinkHeight,
96733
+ maxLinkHeight: this._spec.maxLinkHeight,
96734
+ iterations: this._spec.iterations,
96735
+ nodeKey: this._spec.nodeKey,
96736
+ linkSortBy: this._spec.linkSortBy,
96737
+ nodeSortBy: this._spec.nodeSortBy,
96738
+ setNodeLayer: this._spec.setNodeLayer,
96739
+ dropIsolatedNode: this._spec.dropIsolatedNode,
96740
+ nodeHeight: this._spec.nodeHeight,
96741
+ linkHeight: this._spec.linkHeight,
96742
+ equalNodeHeight: this._spec.equalNodeHeight,
96743
+ linkOverlap: this._spec.linkOverlap,
96744
+ inverse: this._spec.inverse
96745
+ });
96646
96746
  },
96647
96747
  level: exports.TransformLevel.sankeyLayout
96648
96748
  });
@@ -97141,16 +97241,17 @@
97141
97241
  };
97142
97242
 
97143
97243
  const treemapLayout = (data, op) => {
97144
- const viewBox = op.getViewBox();
97244
+ const options = isFunction$1(op) ? op() : op;
97245
+ const viewBox = options.getViewBox();
97145
97246
  if (viewBox) {
97146
- const layout = new TreemapLayout(op);
97147
- const res = layout.layout(data, op.getViewBox());
97247
+ const layout = new TreemapLayout(options);
97248
+ const res = layout.layout(data, viewBox);
97148
97249
  const nodes = [];
97149
- flattenNodes(res, nodes, { maxDepth: op === null || op === void 0 ? void 0 : op.maxDepth });
97150
- nodes.forEach((datum, i) => {
97250
+ flattenNodes(res, nodes, { maxDepth: options === null || options === void 0 ? void 0 : options.maxDepth });
97251
+ nodes.forEach(datum => {
97151
97252
  if (datum) {
97152
97253
  [DEFAULT_HIERARCHY_ROOT, 'name'].forEach(key => {
97153
- datum[key] = datum.datum[datum.depth][op.nameField];
97254
+ datum[key] = datum.datum[datum.depth][options.nameField];
97154
97255
  });
97155
97256
  }
97156
97257
  });
@@ -97241,34 +97342,37 @@
97241
97342
  }
97242
97343
  }
97243
97344
  initData() {
97244
- var _a, _b, _c, _d, _e;
97345
+ var _a;
97245
97346
  super.initData();
97246
97347
  registerDataSetInstanceTransform(this._dataSet, 'treemap', treemapLayout);
97247
97348
  (_a = this._data.getDataView()) === null || _a === void 0 ? void 0 : _a.transform({
97248
97349
  type: 'treemap',
97249
- options: {
97250
- nameField: this._categoryField,
97251
- valueField: this._valueField,
97252
- getViewBox: () => {
97253
- return this._viewBox.empty()
97254
- ? null
97255
- : {
97256
- x0: this._viewBox.x1,
97257
- x1: this._viewBox.x2,
97258
- y0: this._viewBox.y1,
97259
- y1: this._viewBox.y2
97260
- };
97261
- },
97262
- maxDepth: this._maxDepth,
97263
- gapWidth: this._spec.gapWidth,
97264
- padding: this._spec.nodePadding,
97265
- splitType: this._spec.splitType,
97266
- aspectRatio: this._spec.aspectRatio,
97267
- labelPadding: ((_b = this._spec.nonLeafLabel) === null || _b === void 0 ? void 0 : _b.visible) ? (_c = this._spec.nonLeafLabel) === null || _c === void 0 ? void 0 : _c.padding : 0,
97268
- labelPosition: (_d = this._spec.nonLeafLabel) === null || _d === void 0 ? void 0 : _d.position,
97269
- minVisibleArea: (_e = this._spec.minVisibleArea) !== null && _e !== void 0 ? _e : 10,
97270
- minChildrenVisibleArea: this._spec.minChildrenVisibleArea,
97271
- minChildrenVisibleSize: this._spec.minChildrenVisibleSize
97350
+ options: () => {
97351
+ var _a, _b, _c, _d;
97352
+ return ({
97353
+ nameField: this._categoryField,
97354
+ valueField: this._valueField,
97355
+ getViewBox: () => {
97356
+ return this._viewBox.empty()
97357
+ ? null
97358
+ : {
97359
+ x0: this._viewBox.x1,
97360
+ x1: this._viewBox.x2,
97361
+ y0: this._viewBox.y1,
97362
+ y1: this._viewBox.y2
97363
+ };
97364
+ },
97365
+ maxDepth: this._maxDepth,
97366
+ gapWidth: this._spec.gapWidth,
97367
+ padding: this._spec.nodePadding,
97368
+ splitType: this._spec.splitType,
97369
+ aspectRatio: this._spec.aspectRatio,
97370
+ labelPadding: ((_a = this._spec.nonLeafLabel) === null || _a === void 0 ? void 0 : _a.visible) ? (_b = this._spec.nonLeafLabel) === null || _b === void 0 ? void 0 : _b.padding : 0,
97371
+ labelPosition: (_c = this._spec.nonLeafLabel) === null || _c === void 0 ? void 0 : _c.position,
97372
+ minVisibleArea: (_d = this._spec.minVisibleArea) !== null && _d !== void 0 ? _d : 10,
97373
+ minChildrenVisibleArea: this._spec.minChildrenVisibleArea,
97374
+ minChildrenVisibleSize: this._spec.minChildrenVisibleSize
97375
+ });
97272
97376
  }
97273
97377
  });
97274
97378
  if (this.getViewData()) {
@@ -98232,11 +98336,13 @@
98232
98336
  const CORRELATION_Y = `${PREFIX}_CORRELATION_Y`;
98233
98337
  const CORRELATION_SIZE = `${PREFIX}_CORRELATION_SIZE`;
98234
98338
 
98339
+ const resolveOptionValue$1 = (option) => (isFunction$1(option) ? option() : option);
98235
98340
  const correlation$1 = (data, options) => {
98236
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
98341
+ var _a, _b, _c, _d, _e, _f, _g, _h;
98237
98342
  if (!data || !(options === null || options === void 0 ? void 0 : options.view) || !isArray$1(data)) {
98238
98343
  return data;
98239
98344
  }
98345
+ const dataList = data;
98240
98346
  const viewBox = options.view();
98241
98347
  if (viewBox.x1 - viewBox.x0 === 0 ||
98242
98348
  viewBox.y1 - viewBox.y0 === 0 ||
@@ -98246,43 +98352,46 @@
98246
98352
  viewBox.y1 - viewBox.y0 === Infinity) {
98247
98353
  return data;
98248
98354
  }
98249
- const startAngle = degreeToRadian((_a = options.startAngle) !== null && _a !== void 0 ? _a : -90);
98250
- const endAngle = degreeToRadian((_b = options.endAngle) !== null && _b !== void 0 ? _b : 270);
98355
+ const startAngle = degreeToRadian((_a = resolveOptionValue$1(options.startAngle)) !== null && _a !== void 0 ? _a : -90);
98356
+ const endAngle = degreeToRadian((_b = resolveOptionValue$1(options.endAngle)) !== null && _b !== void 0 ? _b : 270);
98251
98357
  const maxRadius = Math.max((viewBox.x1 - viewBox.x0) / 2, (viewBox.y1 - viewBox.y0) / 2);
98252
- const innerRadius = toPercent((_c = options.innerRadius) !== null && _c !== void 0 ? _c : 0, maxRadius);
98253
- const outerRadius = toPercent(options.outerRadius, maxRadius);
98358
+ const innerRadius = toPercent((_c = resolveOptionValue$1(options.innerRadius)) !== null && _c !== void 0 ? _c : 0, maxRadius);
98359
+ const outerRadius = toPercent(resolveOptionValue$1(options.outerRadius), maxRadius);
98360
+ const centerOption = resolveOptionValue$1(options.center);
98254
98361
  const center = [
98255
- isNumber$2((_d = options.center) === null || _d === void 0 ? void 0 : _d[0])
98256
- ? options.center[0]
98257
- : viewBox.x0 + toPercent((_f = (_e = options.center) === null || _e === void 0 ? void 0 : _e[0]) !== null && _f !== void 0 ? _f : '50%', viewBox.x1 - viewBox.x0),
98258
- isNumber$2((_g = options.center) === null || _g === void 0 ? void 0 : _g[1])
98259
- ? options.center[1]
98260
- : viewBox.y0 + toPercent((_j = (_h = options.center) === null || _h === void 0 ? void 0 : _h[1]) !== null && _j !== void 0 ? _j : '50%', viewBox.y1 - viewBox.y0)
98362
+ isNumber$2(centerOption === null || centerOption === void 0 ? void 0 : centerOption[0])
98363
+ ? centerOption[0]
98364
+ : viewBox.x0 + toPercent((_d = centerOption === null || centerOption === void 0 ? void 0 : centerOption[0]) !== null && _d !== void 0 ? _d : '50%', viewBox.x1 - viewBox.x0),
98365
+ isNumber$2(centerOption === null || centerOption === void 0 ? void 0 : centerOption[1])
98366
+ ? centerOption[1]
98367
+ : viewBox.y0 + toPercent((_e = centerOption === null || centerOption === void 0 ? void 0 : centerOption[1]) !== null && _e !== void 0 ? _e : '50%', viewBox.y1 - viewBox.y0)
98261
98368
  ];
98262
- const fieldAccessor = field$2(options.field);
98263
- const values = data.map(fieldAccessor);
98369
+ const fieldAccessor = field$2(resolveOptionValue$1(options.field));
98370
+ const values = dataList.map(fieldAccessor);
98264
98371
  const [min, max] = extent$2(values);
98265
98372
  const radiusScale = min === max
98266
98373
  ? (val) => (innerRadius + outerRadius) / 2
98267
98374
  : (val) => innerRadius + ((outerRadius - innerRadius) * (val - min)) / (max - min);
98268
- const sizeAccessor = !isNil$1(options.radiusField) ? field$2(options.radiusField) : fieldAccessor;
98269
- const defaultSize = (_l = (_k = options === null || options === void 0 ? void 0 : options.radiusRange) === null || _k === void 0 ? void 0 : _k[1]) !== null && _l !== void 0 ? _l : 5;
98375
+ const radiusField = resolveOptionValue$1(options.radiusField);
98376
+ const radiusRange = resolveOptionValue$1(options.radiusRange);
98377
+ const sizeAccessor = !isNil$1(radiusField) ? field$2(radiusField) : fieldAccessor;
98378
+ const defaultSize = (_f = radiusRange === null || radiusRange === void 0 ? void 0 : radiusRange[1]) !== null && _f !== void 0 ? _f : 5;
98270
98379
  let sizeScale = (datum) => defaultSize;
98271
98380
  if (sizeAccessor) {
98272
- const [minSize, maxSize] = sizeAccessor !== fieldAccessor ? extent$2(data.map(sizeAccessor)) : [min, max];
98273
- const minR = (_o = (_m = options.radiusRange) === null || _m === void 0 ? void 0 : _m[0]) !== null && _o !== void 0 ? _o : 5;
98274
- const maxR = (_q = (_p = options.radiusRange) === null || _p === void 0 ? void 0 : _p[1]) !== null && _q !== void 0 ? _q : 5;
98381
+ const [minSize, maxSize] = sizeAccessor !== fieldAccessor ? extent$2(dataList.map(sizeAccessor)) : [min, max];
98382
+ const minR = (_g = radiusRange === null || radiusRange === void 0 ? void 0 : radiusRange[0]) !== null && _g !== void 0 ? _g : 5;
98383
+ const maxR = (_h = radiusRange === null || radiusRange === void 0 ? void 0 : radiusRange[1]) !== null && _h !== void 0 ? _h : 5;
98275
98384
  if (minSize !== maxSize) {
98276
98385
  sizeScale = (datum) => minR + ((maxR - minR) * (sizeAccessor(datum) - minSize)) / (maxSize - minSize);
98277
98386
  }
98278
98387
  }
98279
98388
  const minAngle = Math.min(startAngle, endAngle);
98280
98389
  const maxAngle = Math.max(startAngle, endAngle);
98281
- const angles = getPartialAngles(minAngle, maxAngle, data.length);
98390
+ const angles = getPartialAngles(minAngle, maxAngle, dataList.length);
98282
98391
  const res = [];
98283
98392
  const searchStep = 60;
98284
98393
  const searchAngle = (maxAngle - minAngle) / searchStep;
98285
- data.forEach((datum, index) => {
98394
+ dataList.forEach((datum, index) => {
98286
98395
  const radius = radiusScale(values[index]);
98287
98396
  const size = sizeScale(datum);
98288
98397
  let x;
@@ -98355,15 +98464,20 @@
98355
98464
  return false;
98356
98465
  }
98357
98466
  return arr.some(entry => {
98358
- return Math.pow(item.x - entry.x, 2) + Math.pow(item.y - entry.y, 2) < Math.pow(item.size + entry.size, 2);
98467
+ const x = entry.x;
98468
+ const y = entry.y;
98469
+ const size = entry.size;
98470
+ return Math.pow(item.x - x, 2) + Math.pow(item.y - y, 2) < Math.pow(item.size + size, 2);
98359
98471
  });
98360
98472
  };
98361
98473
 
98474
+ const resolveOptionValue = (option) => (isFunction$1(option) ? option() : option);
98362
98475
  const correlationCenter = (data, options) => {
98363
98476
  if (!data || !isArray$1(data)) {
98364
98477
  return [];
98365
98478
  }
98366
- const { keyword, categoryField } = options;
98479
+ const keyword = resolveOptionValue(options.keyword);
98480
+ const categoryField = resolveOptionValue(options.categoryField);
98367
98481
  const nodeInfo = data[0].latestData[0];
98368
98482
  const centerInfo = {
98369
98483
  [categoryField]: keyword,
@@ -98524,7 +98638,6 @@
98524
98638
  this.setSizeRange(this._spec.sizeRange);
98525
98639
  }
98526
98640
  initData() {
98527
- var _a, _b, _c;
98528
98641
  super.initData();
98529
98642
  if (!this._data) {
98530
98643
  return;
@@ -98540,8 +98653,8 @@
98540
98653
  centerDataView.transform({
98541
98654
  type: 'correlationCenter',
98542
98655
  options: {
98543
- keyword: (_c = (_b = (_a = this._spec.centerLabel) === null || _a === void 0 ? void 0 : _a.style) === null || _b === void 0 ? void 0 : _b.text) !== null && _c !== void 0 ? _c : '',
98544
- categoryField: this._spec.categoryField
98656
+ keyword: () => { var _a, _b, _c; return (_c = (_b = (_a = this._spec.centerLabel) === null || _a === void 0 ? void 0 : _a.style) === null || _b === void 0 ? void 0 : _b.text) !== null && _c !== void 0 ? _c : ''; },
98657
+ categoryField: () => this._spec.categoryField
98545
98658
  }
98546
98659
  });
98547
98660
  this._centerSeriesData = new CompilableData(this._option, centerDataView);
@@ -98564,14 +98677,14 @@
98564
98677
  y1: this._viewBox.y2
98565
98678
  };
98566
98679
  },
98567
- field: this._spec.valueField,
98568
- radiusRange: this._spec.sizeRange,
98569
- radiusField: this._spec.sizeField,
98570
- center: [this._spec.centerX, this._spec.centerY],
98571
- innerRadius: this._spec.innerRadius,
98572
- outerRadius: this._spec.outerRadius,
98573
- startAngle: this._spec.startAngle,
98574
- endAngle: this._spec.endAngle
98680
+ field: () => this._spec.valueField,
98681
+ radiusRange: () => this._spec.sizeRange,
98682
+ radiusField: () => this._spec.sizeField,
98683
+ center: () => [this._spec.centerX, this._spec.centerY],
98684
+ innerRadius: () => this._spec.innerRadius,
98685
+ outerRadius: () => this._spec.outerRadius,
98686
+ startAngle: () => this._spec.startAngle,
98687
+ endAngle: () => this._spec.endAngle
98575
98688
  }
98576
98689
  });
98577
98690
  }
@@ -99349,9 +99462,10 @@
99349
99462
  }
99350
99463
 
99351
99464
  const vennLayout = (data, op) => {
99352
- const viewBox = op.getViewBox();
99465
+ const options = isFunction$1(op) ? op() : op;
99466
+ const viewBox = options.getViewBox();
99353
99467
  if (viewBox && (data === null || data === void 0 ? void 0 : data.length)) {
99354
- return vennTransform(Object.assign({ setField: op.setField, valueField: op.valueField }, viewBox), data);
99468
+ return vennTransform(Object.assign({ setField: options.setField, valueField: options.valueField }, viewBox), data);
99355
99469
  }
99356
99470
  return [];
99357
99471
  };
@@ -99434,7 +99548,7 @@
99434
99548
  registerDataSetInstanceTransform(this._dataSet, 'venn', vennLayout);
99435
99549
  (_a = this._data.getDataView()) === null || _a === void 0 ? void 0 : _a.transform({
99436
99550
  type: 'venn',
99437
- options: {
99551
+ options: () => ({
99438
99552
  getViewBox: () => {
99439
99553
  return this._viewBox.empty()
99440
99554
  ? null
@@ -99447,7 +99561,7 @@
99447
99561
  },
99448
99562
  setField: this._categoryField,
99449
99563
  valueField: this._valueField
99450
- }
99564
+ })
99451
99565
  });
99452
99566
  }
99453
99567
  compile() {
@@ -99867,7 +99981,7 @@
99867
99981
  return indicatorSpec;
99868
99982
  }
99869
99983
  _getDefaultSeriesSpec(spec, pickKeys) {
99870
- const series = super._getDefaultSeriesSpec(spec, ['radius', 'outerRadius', 'innerRadius', 'startAngle', 'endAngle', 'sortDataByAxis'], pickKeys);
99984
+ const series = super._getDefaultSeriesSpec(spec, ['radius', 'outerRadius', 'innerRadius', 'startAngle', 'endAngle', 'centerX', 'centerY', 'sortDataByAxis'], pickKeys);
99871
99985
  return series;
99872
99986
  }
99873
99987
  transformSpec(spec) {
@@ -99891,7 +100005,7 @@
99891
100005
  return false;
99892
100006
  }
99893
100007
  _getDefaultSeriesSpec(spec) {
99894
- const series = super._getDefaultSeriesSpec(spec, ['startAngle', 'endAngle', 'centerX', 'centerY']);
100008
+ const series = super._getDefaultSeriesSpec(spec, ['startAngle', 'endAngle', 'centerX', 'centerY', 'clamp']);
99895
100009
  series.categoryField = spec.categoryField || spec.radiusField;
99896
100010
  series.valueField = spec.valueField || spec.angleField;
99897
100011
  return series;
@@ -100029,6 +100143,7 @@
100029
100143
  _getDefaultSeriesSpec(spec) {
100030
100144
  var _a, _b, _c;
100031
100145
  const series = super._getDefaultSeriesSpec(spec);
100146
+ this._addSeriesRelatedSpecKeys(['radius', 'outerRadius', 'innerRadius']);
100032
100147
  series.radius = (_a = spec.radius) !== null && _a !== void 0 ? _a : POLAR_DEFAULT_RADIUS;
100033
100148
  series.outerRadius = (_b = spec.outerRadius) !== null && _b !== void 0 ? _b : POLAR_DEFAULT_RADIUS;
100034
100149
  series.innerRadius = (_c = spec.innerRadius) !== null && _c !== void 0 ? _c : 0;
@@ -100192,6 +100307,7 @@
100192
100307
  var _a, _b, _c, _d;
100193
100308
  const series = super._getDefaultSeriesSpec(spec);
100194
100309
  const areaTheme = (_b = (_a = this._option).getTheme) === null || _b === void 0 ? void 0 : _b.call(_a, 'series', 'radar', 'area');
100310
+ this._addSeriesRelatedSpecKeys(['line', 'point', 'area']);
100195
100311
  series.line = spec.line;
100196
100312
  series.point = spec.point;
100197
100313
  series.stack = spec.stack;
@@ -100697,7 +100813,7 @@
100697
100813
  _getDefaultSeriesSpec(spec) {
100698
100814
  var _a, _b;
100699
100815
  const series = super._getDefaultSeriesSpec(spec);
100700
- this._addSeriesRelatedSpecKeys(['cornerRadius']);
100816
+ this._addSeriesRelatedSpecKeys(['cornerRadius', 'progress', 'track', 'roundCap']);
100701
100817
  series.progress = spec.progress;
100702
100818
  series.track = spec.track;
100703
100819
  series.tickMask = spec.tickMask;
@@ -100746,6 +100862,7 @@
100746
100862
  class GaugeChartSpecTransformer extends ProgressLikeChartSpecTransformer {
100747
100863
  _getDefaultSeriesSpec(spec) {
100748
100864
  const series = super._getDefaultSeriesSpec(spec);
100865
+ this._addSeriesRelatedSpecKeys(['pin', 'pinBackground', 'pointer']);
100749
100866
  series.radiusField = spec.radiusField;
100750
100867
  series.pin = spec.pin;
100751
100868
  series.pinBackground = spec.pinBackground;
@@ -100987,6 +101104,7 @@
100987
101104
  var _a, _b;
100988
101105
  const series = super._getDefaultSeriesSpec(spec, ['bandWidth', 'progress', 'track', 'clamp']);
100989
101106
  series.direction = (_a = spec.direction) !== null && _a !== void 0 ? _a : 'horizontal';
101107
+ this._addSeriesRelatedSpecKeys(['cornerRadius']);
100990
101108
  series.cornerRadius = (_b = spec.cornerRadius) !== null && _b !== void 0 ? _b : 0;
100991
101109
  return series;
100992
101110
  }
@@ -101502,6 +101620,7 @@
101502
101620
  _getDefaultSeriesSpec(spec) {
101503
101621
  var _a, _b;
101504
101622
  const series = super._getDefaultSeriesSpec(spec);
101623
+ this._addSeriesRelatedSpecKeys(['area', 'point', 'line']);
101505
101624
  series.area = spec.area;
101506
101625
  series.point = spec.point;
101507
101626
  series.line = spec.line;
@@ -106682,7 +106801,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
106682
106801
  };
106683
106802
 
106684
106803
  const indicatorMapper = (data, op) => {
106685
- const { datum, title, content } = op;
106804
+ const { datum, title, content } = isFunction$1(op) ? op() : op;
106686
106805
  const mappedData = [];
106687
106806
  const datumResult = datum.call(null);
106688
106807
  if (title.visible) {
@@ -106814,11 +106933,11 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
106814
106933
  const displayData = new DataView(this._option.dataSet, { name: `${this.type}_${this.id}_data` });
106815
106934
  displayData.transform({
106816
106935
  type: 'indicatorFilter',
106817
- options: {
106936
+ options: () => ({
106818
106937
  title: this._title,
106819
106938
  content: this._content,
106820
106939
  datum: () => this._activeDatum
106821
- }
106940
+ })
106822
106941
  });
106823
106942
  displayData.target.addListener('change', this.updateDatum.bind(this));
106824
106943
  this._displayData = new CompilableData(this._option, displayData);
@@ -107775,6 +107894,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
107775
107894
  const MARKER_COORDINATE_PLACEHOLDER = '__vchart_marker_coordinate__';
107776
107895
  const MARKER_TEXT_PLACEHOLDER = '__vchart_marker_text__';
107777
107896
  const MARKER_AUTO_RANGE_PLACEHOLDER = '__vchart_marker_auto_range__';
107897
+ const MARKER_STYLE_PLACEHOLDER = '__vchart_marker_style__';
107778
107898
  const MARKER_DOMAIN_POSITION_SPEC_KEYS = [
107779
107899
  'coordinate',
107780
107900
  'coordinates',
@@ -107800,6 +107920,24 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
107800
107920
  }
107801
107921
  return Object.assign(Object.assign({}, label), { formatMethod: MARKER_FORMAT_METHOD_PLACEHOLDER });
107802
107922
  };
107923
+ const normalizeMarkerStyles = (value) => {
107924
+ if (Array.isArray(value)) {
107925
+ return value.map(normalizeMarkerStyles);
107926
+ }
107927
+ if (!value || typeof value !== 'object') {
107928
+ return value;
107929
+ }
107930
+ const normalized = Object.assign({}, value);
107931
+ Object.keys(normalized).forEach(key => {
107932
+ if (key === 'style' || key.endsWith('Style')) {
107933
+ normalized[key] = MARKER_STYLE_PLACEHOLDER;
107934
+ }
107935
+ else {
107936
+ normalized[key] = normalizeMarkerStyles(normalized[key]);
107937
+ }
107938
+ });
107939
+ return normalized;
107940
+ };
107803
107941
  const normalizeMarkerSpecForComponentOnlyUpdate = (spec, options) => {
107804
107942
  var _a;
107805
107943
  if (!spec || typeof spec !== 'object') {
@@ -107808,9 +107946,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
107808
107946
  const normalized = Object.assign({}, spec);
107809
107947
  if (options.normalizeDomainPosition) {
107810
107948
  MARKER_DOMAIN_POSITION_SPEC_KEYS.forEach(key => {
107811
- if (key in normalized) {
107812
- normalized[key] = MARKER_COORDINATE_PLACEHOLDER;
107813
- }
107949
+ normalized[key] = MARKER_COORDINATE_PLACEHOLDER;
107814
107950
  });
107815
107951
  }
107816
107952
  if (options.normalizeAutoRange && 'autoRange' in normalized) {
@@ -107824,6 +107960,9 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
107824
107960
  if ('label' in normalized) {
107825
107961
  normalized.label = normalizeMarkerLabelFormatMethod(normalized.label);
107826
107962
  }
107963
+ Object.keys(normalized).forEach(key => {
107964
+ normalized[key] = normalizeMarkerStyles(normalized[key]);
107965
+ });
107827
107966
  const text = (_a = normalized.itemContent) === null || _a === void 0 ? void 0 : _a.text;
107828
107967
  if (text && typeof text === 'object') {
107829
107968
  normalized.itemContent = Object.assign(Object.assign({}, normalized.itemContent), { text: Object.assign(Object.assign({}, normalizeMarkerLabelFormatMethod(text)), { text: MARKER_TEXT_PLACEHOLDER }) });
@@ -108081,6 +108220,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
108081
108220
  }
108082
108221
  reInit(spec) {
108083
108222
  super.reInit(spec);
108223
+ this._releaseMarkerData();
108084
108224
  this._bindSeries();
108085
108225
  this._initDataView();
108086
108226
  this._buildMarkerAttributeContext();
@@ -110343,7 +110483,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
110343
110483
  return markPoint;
110344
110484
  }
110345
110485
  _markerLayout() {
110346
- var _a, _b, _c, _d, _e, _f;
110486
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
110347
110487
  const spec = this._spec;
110348
110488
  const data = this._markerData;
110349
110489
  const relativeSeries = this._relativeSeries;
@@ -110354,8 +110494,16 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
110354
110494
  ? data.latestData[0].latestData
110355
110495
  : data.latestData
110356
110496
  : seriesData;
110497
+ const { itemLine = {}, itemContent = {} } = this._spec;
110498
+ const { visible: itemLineVisible, line = {} } = itemLine, restItemLine = __rest$f(itemLine, ["visible", "line"]);
110499
+ const itemLineAttrs = itemLineVisible !== false
110500
+ ? Object.assign(Object.assign({}, restItemLine), { visible: true, lineStyle: transformToGraphic(line.style) })
110501
+ : {
110502
+ visible: false
110503
+ };
110504
+ const labelAttrs = transformLabelAttributes(Object.assign(Object.assign({}, itemContent.text), { style: merge$1({ dx: 0, dy: 0 }, (_b = (_a = itemContent.text) === null || _a === void 0 ? void 0 : _a.style) !== null && _b !== void 0 ? _b : itemContent.style) }), data, this._markAttributeContext);
110357
110505
  let limitRect;
110358
- if (spec.clip || ((_a = spec.itemContent) === null || _a === void 0 ? void 0 : _a.confine)) {
110506
+ if (spec.clip || ((_c = spec.itemContent) === null || _c === void 0 ? void 0 : _c.confine)) {
110359
110507
  const { minX, maxX, minY, maxY } = computeClipRange([relativeSeries.getRegion()]);
110360
110508
  limitRect = {
110361
110509
  x: minX,
@@ -110365,17 +110513,18 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
110365
110513
  };
110366
110514
  }
110367
110515
  if (this._markerComponent) {
110368
- const attribute = (_b = this._markerComponent.attribute) !== null && _b !== void 0 ? _b : {};
110369
- const textStyle = (_d = (_c = attribute.itemContent) === null || _c === void 0 ? void 0 : _c.textStyle) !== null && _d !== void 0 ? _d : {};
110370
- const specText = (_e = this._spec.itemContent.text) === null || _e === void 0 ? void 0 : _e.text;
110516
+ const attribute = (_d = this._markerComponent.attribute) !== null && _d !== void 0 ? _d : {};
110517
+ const textStyle = (_f = (_e = attribute.itemContent) === null || _e === void 0 ? void 0 : _e.textStyle) !== null && _f !== void 0 ? _f : {};
110518
+ const specText = (_g = this._spec.itemContent.text) === null || _g === void 0 ? void 0 : _g.text;
110371
110519
  this._markerComponent.setAttributes({
110372
110520
  position: point === undefined ? { x: null, y: null } : point,
110373
- itemContent: Object.assign(Object.assign({}, attribute.itemContent), { textStyle: Object.assign(Object.assign({}, textStyle), { text: ((_f = this._spec.itemContent.text) === null || _f === void 0 ? void 0 : _f.formatMethod)
110521
+ itemContent: Object.assign(Object.assign({}, attribute.itemContent), { panel: (_h = labelAttrs.panel) !== null && _h !== void 0 ? _h : (_j = attribute.itemContent) === null || _j === void 0 ? void 0 : _j.panel, padding: (_k = labelAttrs.padding) !== null && _k !== void 0 ? _k : (_l = attribute.itemContent) === null || _l === void 0 ? void 0 : _l.padding, textStyle: Object.assign(Object.assign(Object.assign({}, textStyle), ((_m = labelAttrs.textStyle) !== null && _m !== void 0 ? _m : {})), { text: ((_o = this._spec.itemContent.text) === null || _o === void 0 ? void 0 : _o.formatMethod)
110374
110522
  ?
110375
110523
  this._spec.itemContent.text.formatMethod(dataPoints, seriesData)
110376
110524
  : isValid$1(specText)
110377
110525
  ? specText
110378
110526
  : textStyle.text }), offsetX: computeOffsetFromRegion(point, attribute.itemContent.offsetX, this._relativeSeries.getRegion()), offsetY: computeOffsetFromRegion(point, attribute.itemContent.offsetY, this._relativeSeries.getRegion()) }),
110527
+ itemLine: itemLineAttrs,
110379
110528
  limitRect,
110380
110529
  dx: this._layoutOffsetX,
110381
110530
  dy: this._layoutOffsetY