@visactor/vchart 2.1.0-alpha.4 → 2.1.0-alpha.6

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 (216) hide show
  1. package/build/es5/index.js +1 -1
  2. package/build/index.es.js +362 -236
  3. package/build/index.js +362 -236
  4. package/build/index.min.js +2 -2
  5. package/build/tsconfig.tsbuildinfo +1 -1
  6. package/cjs/chart/base/base-chart.d.ts +1 -0
  7. package/cjs/chart/base/base-chart.js +10 -2
  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/compile/compiler.js +9 -7
  26. package/cjs/compile/compiler.js.map +1 -1
  27. package/cjs/component/axis/polar/band-axis.d.ts +2 -0
  28. package/cjs/component/axis/polar/band-axis.js +3 -0
  29. package/cjs/component/axis/polar/band-axis.js.map +1 -1
  30. package/cjs/component/axis/polar/linear-axis.js +3 -0
  31. package/cjs/component/axis/polar/linear-axis.js.map +1 -1
  32. package/cjs/component/indicator/indicator.js +2 -2
  33. package/cjs/component/indicator/indicator.js.map +1 -1
  34. package/cjs/component/indicator/util.d.ts +4 -3
  35. package/cjs/component/indicator/util.js +1 -1
  36. package/cjs/component/indicator/util.js.map +1 -1
  37. package/cjs/constant/funnel.js +2 -1
  38. package/cjs/constant/scatter.js +1 -2
  39. package/cjs/constant/scroll-bar.js +1 -1
  40. package/cjs/constant/sunburst.js +1 -1
  41. package/cjs/constant/waterfall.js +1 -1
  42. package/cjs/constant/word-cloud.js +1 -1
  43. package/cjs/core/instance-manager.js +1 -1
  44. package/cjs/core/interface.js +1 -1
  45. package/cjs/core/util.js +1 -1
  46. package/cjs/core/vchart.js +1 -1
  47. package/cjs/data/transforms/box-plot.d.ts +4 -1
  48. package/cjs/data/transforms/box-plot.js +3 -3
  49. package/cjs/data/transforms/box-plot.js.map +1 -1
  50. package/cjs/data/transforms/correlation-center.d.ts +11 -4
  51. package/cjs/data/transforms/correlation-center.js +3 -2
  52. package/cjs/data/transforms/correlation-center.js.map +1 -1
  53. package/cjs/data/transforms/correlation.d.ts +18 -15
  54. package/cjs/data/transforms/correlation.js +22 -17
  55. package/cjs/data/transforms/correlation.js.map +1 -1
  56. package/cjs/data/transforms/funnel.d.ts +10 -8
  57. package/cjs/data/transforms/funnel.js +4 -3
  58. package/cjs/data/transforms/funnel.js.map +1 -1
  59. package/cjs/data/transforms/lookup.d.ts +3 -3
  60. package/cjs/data/transforms/lookup.js +12 -7
  61. package/cjs/data/transforms/lookup.js.map +1 -1
  62. package/cjs/data/transforms/map.d.ts +8 -2
  63. package/cjs/data/transforms/map.js +9 -6
  64. package/cjs/data/transforms/map.js.map +1 -1
  65. package/cjs/data/transforms/sankey.d.ts +12 -4
  66. package/cjs/data/transforms/sankey.js +18 -13
  67. package/cjs/data/transforms/sankey.js.map +1 -1
  68. package/cjs/data/transforms/stack-split.d.ts +2 -1
  69. package/cjs/data/transforms/stack-split.js +1 -1
  70. package/cjs/data/transforms/stack-split.js.map +1 -1
  71. package/cjs/data/transforms/treemap.d.ts +5 -3
  72. package/cjs/data/transforms/treemap.js +7 -6
  73. package/cjs/data/transforms/treemap.js.map +1 -1
  74. package/cjs/data/transforms/venn.d.ts +4 -2
  75. package/cjs/data/transforms/venn.js +4 -4
  76. package/cjs/data/transforms/venn.js.map +1 -1
  77. package/cjs/data/transforms/waterfall.d.ts +4 -2
  78. package/cjs/data/transforms/waterfall.js +7 -7
  79. package/cjs/data/transforms/waterfall.js.map +1 -1
  80. package/cjs/series/base/base-series.js +2 -2
  81. package/cjs/series/base/base-series.js.map +1 -1
  82. package/cjs/series/box-plot/box-plot.js +2 -2
  83. package/cjs/series/box-plot/box-plot.js.map +1 -1
  84. package/cjs/series/correlation/correlation.js +13 -11
  85. package/cjs/series/correlation/correlation.js.map +1 -1
  86. package/cjs/series/dot/dot.d.ts +11 -0
  87. package/cjs/series/dot/dot.js +16 -1
  88. package/cjs/series/dot/dot.js.map +1 -1
  89. package/cjs/series/funnel/funnel.js +5 -8
  90. package/cjs/series/funnel/funnel.js.map +1 -1
  91. package/cjs/series/map/map.js +3 -3
  92. package/cjs/series/map/map.js.map +1 -1
  93. package/cjs/series/polar/progress-like/progress-like.d.ts +2 -0
  94. package/cjs/series/polar/progress-like/progress-like.js +16 -1
  95. package/cjs/series/polar/progress-like/progress-like.js.map +1 -1
  96. package/cjs/series/polar/rose-like/rose-like.d.ts +2 -0
  97. package/cjs/series/polar/rose-like/rose-like.js +15 -1
  98. package/cjs/series/polar/rose-like/rose-like.js.map +1 -1
  99. package/cjs/series/progress/circular/circular.js +2 -1
  100. package/cjs/series/progress/circular/circular.js.map +1 -1
  101. package/cjs/series/progress/linear/linear.js +3 -1
  102. package/cjs/series/progress/linear/linear.js.map +1 -1
  103. package/cjs/series/sankey/sankey.js +35 -33
  104. package/cjs/series/sankey/sankey.js.map +1 -1
  105. package/cjs/series/treemap/treemap.js +23 -20
  106. package/cjs/series/treemap/treemap.js.map +1 -1
  107. package/cjs/series/venn/venn.js +2 -2
  108. package/cjs/series/venn/venn.js.map +1 -1
  109. package/cjs/series/waterfall/waterfall.js +26 -20
  110. package/cjs/series/waterfall/waterfall.js.map +1 -1
  111. package/esm/chart/base/base-chart.d.ts +1 -0
  112. package/esm/chart/base/base-chart.js +9 -2
  113. package/esm/chart/base/base-chart.js.map +1 -1
  114. package/esm/chart/gauge/gauge-transformer.js +3 -2
  115. package/esm/chart/gauge/gauge-transformer.js.map +1 -1
  116. package/esm/chart/polar/polar-transformer.js +1 -1
  117. package/esm/chart/polar/polar-transformer.js.map +1 -1
  118. package/esm/chart/polar/progress-like/progress-like-transformer.js +1 -1
  119. package/esm/chart/polar/progress-like/progress-like-transformer.js.map +1 -1
  120. package/esm/chart/progress/circular/circular-progress-transformer.js +3 -2
  121. package/esm/chart/progress/circular/circular-progress-transformer.js.map +1 -1
  122. package/esm/chart/progress/linear/linear-progress-transformer.js +1 -1
  123. package/esm/chart/progress/linear/linear-progress-transformer.js.map +1 -1
  124. package/esm/chart/radar/radar-transformer.js +3 -2
  125. package/esm/chart/radar/radar-transformer.js.map +1 -1
  126. package/esm/chart/range-area/range-area-transformer.js +2 -2
  127. package/esm/chart/range-area/range-area-transformer.js.map +1 -1
  128. package/esm/chart/rose/rose-transformer.js +2 -1
  129. package/esm/chart/rose/rose-transformer.js.map +1 -1
  130. package/esm/compile/compiler.js +9 -7
  131. package/esm/compile/compiler.js.map +1 -1
  132. package/esm/component/axis/polar/band-axis.d.ts +2 -0
  133. package/esm/component/axis/polar/band-axis.js +3 -0
  134. package/esm/component/axis/polar/band-axis.js.map +1 -1
  135. package/esm/component/axis/polar/linear-axis.js +3 -0
  136. package/esm/component/axis/polar/linear-axis.js.map +1 -1
  137. package/esm/component/indicator/indicator.js +2 -2
  138. package/esm/component/indicator/indicator.js.map +1 -1
  139. package/esm/component/indicator/util.d.ts +4 -3
  140. package/esm/component/indicator/util.js +2 -2
  141. package/esm/component/indicator/util.js.map +1 -1
  142. package/esm/constant/funnel.js +2 -1
  143. package/esm/constant/scatter.js +1 -2
  144. package/esm/constant/scroll-bar.js +1 -1
  145. package/esm/constant/sunburst.js +1 -1
  146. package/esm/constant/waterfall.js +1 -1
  147. package/esm/constant/word-cloud.js +1 -1
  148. package/esm/core/instance-manager.js +1 -1
  149. package/esm/core/interface.js +1 -1
  150. package/esm/core/util.js +1 -1
  151. package/esm/core/vchart.js +1 -1
  152. package/esm/data/transforms/box-plot.d.ts +4 -1
  153. package/esm/data/transforms/box-plot.js +4 -4
  154. package/esm/data/transforms/box-plot.js.map +1 -1
  155. package/esm/data/transforms/correlation-center.d.ts +11 -4
  156. package/esm/data/transforms/correlation-center.js +4 -2
  157. package/esm/data/transforms/correlation-center.js.map +1 -1
  158. package/esm/data/transforms/correlation.d.ts +18 -15
  159. package/esm/data/transforms/correlation.js +13 -8
  160. package/esm/data/transforms/correlation.js.map +1 -1
  161. package/esm/data/transforms/funnel.d.ts +10 -8
  162. package/esm/data/transforms/funnel.js +5 -3
  163. package/esm/data/transforms/funnel.js.map +1 -1
  164. package/esm/data/transforms/lookup.d.ts +3 -3
  165. package/esm/data/transforms/lookup.js +12 -6
  166. package/esm/data/transforms/lookup.js.map +1 -1
  167. package/esm/data/transforms/map.d.ts +8 -2
  168. package/esm/data/transforms/map.js +11 -6
  169. package/esm/data/transforms/map.js.map +1 -1
  170. package/esm/data/transforms/sankey.d.ts +12 -4
  171. package/esm/data/transforms/sankey.js +19 -14
  172. package/esm/data/transforms/sankey.js.map +1 -1
  173. package/esm/data/transforms/stack-split.d.ts +2 -1
  174. package/esm/data/transforms/stack-split.js +2 -2
  175. package/esm/data/transforms/stack-split.js.map +1 -1
  176. package/esm/data/transforms/treemap.d.ts +5 -3
  177. package/esm/data/transforms/treemap.js +8 -5
  178. package/esm/data/transforms/treemap.js.map +1 -1
  179. package/esm/data/transforms/venn.d.ts +4 -2
  180. package/esm/data/transforms/venn.js +5 -3
  181. package/esm/data/transforms/venn.js.map +1 -1
  182. package/esm/data/transforms/waterfall.d.ts +4 -2
  183. package/esm/data/transforms/waterfall.js +7 -8
  184. package/esm/data/transforms/waterfall.js.map +1 -1
  185. package/esm/series/base/base-series.js +2 -2
  186. package/esm/series/base/base-series.js.map +1 -1
  187. package/esm/series/box-plot/box-plot.js +2 -2
  188. package/esm/series/box-plot/box-plot.js.map +1 -1
  189. package/esm/series/correlation/correlation.js +13 -11
  190. package/esm/series/correlation/correlation.js.map +1 -1
  191. package/esm/series/dot/dot.d.ts +11 -0
  192. package/esm/series/dot/dot.js +17 -0
  193. package/esm/series/dot/dot.js.map +1 -1
  194. package/esm/series/funnel/funnel.js +5 -8
  195. package/esm/series/funnel/funnel.js.map +1 -1
  196. package/esm/series/map/map.js +3 -3
  197. package/esm/series/map/map.js.map +1 -1
  198. package/esm/series/polar/progress-like/progress-like.d.ts +2 -0
  199. package/esm/series/polar/progress-like/progress-like.js +17 -0
  200. package/esm/series/polar/progress-like/progress-like.js.map +1 -1
  201. package/esm/series/polar/rose-like/rose-like.d.ts +2 -0
  202. package/esm/series/polar/rose-like/rose-like.js +16 -0
  203. package/esm/series/polar/rose-like/rose-like.js.map +1 -1
  204. package/esm/series/progress/circular/circular.js +2 -1
  205. package/esm/series/progress/circular/circular.js.map +1 -1
  206. package/esm/series/progress/linear/linear.js +3 -1
  207. package/esm/series/progress/linear/linear.js.map +1 -1
  208. package/esm/series/sankey/sankey.js +35 -33
  209. package/esm/series/sankey/sankey.js.map +1 -1
  210. package/esm/series/treemap/treemap.js +23 -20
  211. package/esm/series/treemap/treemap.js.map +1 -1
  212. package/esm/series/venn/venn.js +2 -2
  213. package/esm/series/venn/venn.js.map +1 -1
  214. package/esm/series/waterfall/waterfall.js +26 -20
  215. package/esm/series/waterfall/waterfall.js.map +1 -1
  216. 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({
@@ -60792,29 +60798,38 @@
60792
60798
  }
60793
60799
  renderMarks() {
60794
60800
  var _a;
60795
- if (!this._hasCommitedMark()) {
60801
+ let hasCommitedMark = this._hasCommitedMark();
60802
+ const needsLayout = this._layoutState === LayoutState.before;
60803
+ if (!hasCommitedMark && !needsLayout) {
60796
60804
  return;
60797
60805
  }
60798
60806
  log(`--- start of renderMarks(${this._count}) ---`);
60799
60807
  this.clearProgressive();
60800
- this._rootMarks.forEach(mark => {
60801
- mark.render();
60802
- });
60803
- if (this._layoutState === LayoutState.before) {
60808
+ if (hasCommitedMark) {
60809
+ this._rootMarks.forEach(mark => {
60810
+ mark.render();
60811
+ });
60812
+ }
60813
+ if (needsLayout) {
60804
60814
  this._layoutState = LayoutState.layouting;
60805
60815
  (_a = this._compileChart) === null || _a === void 0 ? void 0 : _a.onLayout();
60806
60816
  this._layoutState = LayoutState.reevaluate;
60807
- if (this._hasCommitedMark()) {
60817
+ hasCommitedMark = this._hasCommitedMark();
60818
+ if (hasCommitedMark) {
60808
60819
  this._rootMarks.forEach(mark => {
60809
60820
  mark.render();
60810
60821
  });
60811
60822
  }
60812
60823
  this.handleLayoutEnd();
60813
60824
  }
60814
- this.findProgressiveMarks();
60815
- this.updateStateAnimation();
60825
+ if (hasCommitedMark) {
60826
+ this.findProgressiveMarks();
60827
+ this.updateStateAnimation();
60828
+ }
60816
60829
  this._doRender(true);
60817
- this.doPreProgressive();
60830
+ if (hasCommitedMark) {
60831
+ this.doPreProgressive();
60832
+ }
60818
60833
  log(`--- start of renderMarks(${this._count}) ---`);
60819
60834
  this._count++;
60820
60835
  }
@@ -67799,32 +67814,35 @@
67799
67814
  return specInfos;
67800
67815
  };
67801
67816
 
67817
+ const resolveOptionValue$3 = (option) => (isFunction$1(option) ? option() : option);
67802
67818
  const lookup = (data, opt) => {
67803
- 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) {
67804
67822
  return data;
67805
67823
  }
67806
- const fields = opt.fields;
67824
+ const fields = resolveOptionValue$3(opt.fields);
67807
67825
  const key = opt.key;
67808
67826
  const values = opt.values;
67809
67827
  const defaultValue = opt.default;
67810
67828
  const as = opt.as || [fields];
67811
- const index = opt.from().reduce(function (map, obj) {
67829
+ const index = fromData.reduce(function (map, obj) {
67812
67830
  if (obj[fields]) {
67813
- map.set(obj[fields], obj);
67831
+ map.set(`${obj[fields]}`, obj);
67814
67832
  }
67815
67833
  return map;
67816
67834
  }, new Map());
67817
67835
  let set;
67818
67836
  if (isFunction$1(opt.set)) {
67819
67837
  set = function (d) {
67820
- const v = index.get(d[key]);
67838
+ const v = index.get(`${d[key]}`);
67821
67839
  opt.set(d, v);
67822
67840
  };
67823
67841
  }
67824
67842
  else if (values) {
67825
67843
  const m = values.length;
67826
67844
  set = function (d) {
67827
- const v = index.get(d[key]);
67845
+ const v = index.get(`${d[key]}`);
67828
67846
  if (isNil$1(v)) {
67829
67847
  for (let i = 0; i < m; ++i) {
67830
67848
  d[as[i]] = defaultValue;
@@ -67839,7 +67857,7 @@
67839
67857
  }
67840
67858
  else {
67841
67859
  set = function (d) {
67842
- const v = index.get(d[key]);
67860
+ const v = index.get(`${d[key]}`);
67843
67861
  d[as[0]] = isValid$1(v) ? v : defaultValue;
67844
67862
  };
67845
67863
  }
@@ -69140,9 +69158,9 @@
69140
69158
  });
69141
69159
  this._viewStackData.transform({
69142
69160
  type: 'stackSplit',
69143
- options: {
69161
+ options: () => ({
69144
69162
  fields: this.getStackGroupFields()
69145
- }
69163
+ })
69146
69164
  }, false);
69147
69165
  }
69148
69166
  _noAnimationDataKey(datum, index) {
@@ -76594,6 +76612,9 @@
76594
76612
  const onlyMarkerComponentsRemoved = this._isOnlyMarkerComponentsRemoved(this._spec, spec, currentKeys);
76595
76613
  const onlyComponentSpecsChanged = this._isOnlyComponentSpecsChanged(this._spec, spec, currentKeys);
76596
76614
  const onlySeriesSpecsChanged = this._isOnlySeriesSpecsChanged(this._spec, spec, currentKeys);
76615
+ const onlyComponentOrSeriesSpecsChanged = onlyComponentSpecsChanged || onlySeriesSpecsChanged
76616
+ ? true
76617
+ : this._isOnlyComponentOrSeriesSpecsChanged(this._spec, spec, currentKeys);
76597
76618
  this._spec = spec;
76598
76619
  if (onlyMarkerComponentsRemoved) {
76599
76620
  this._removeMarkerComponentsForEmptySpecs(result);
@@ -76642,7 +76663,7 @@
76642
76663
  return result;
76643
76664
  }
76644
76665
  this.reInit();
76645
- if (!onlySeriesSpecsChanged || !this._canSkipChartDataStages(result)) {
76666
+ if (!onlyComponentOrSeriesSpecsChanged || !this._canSkipChartDataStages(result)) {
76646
76667
  this.updateDataSpec();
76647
76668
  this.reDataFlow();
76648
76669
  this._reRunStackDataFlow();
@@ -76835,6 +76856,24 @@
76835
76856
  });
76836
76857
  return hasSeriesSpecChange && onlySeriesSpecChange;
76837
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
+ }
76838
76877
  _canSkipChartDataStages(result) {
76839
76878
  const effects = result.effects;
76840
76879
  return !!(effects === null || effects === void 0 ? void 0 : effects.series) && !effects.remake && !effects.data && !effects.scaleDomain && !result.reMake;
@@ -77736,7 +77775,7 @@
77736
77775
  const result = {
77737
77776
  nodes: {}
77738
77777
  };
77739
- const { fields } = op;
77778
+ const { fields } = isFunction$1(op) ? op() : op;
77740
77779
  if (!(fields === null || fields === void 0 ? void 0 : fields.length)) {
77741
77780
  return result;
77742
77781
  }
@@ -80594,20 +80633,23 @@
80594
80633
  }
80595
80634
 
80596
80635
  const map$1 = (data, opt) => {
80597
- if (data.features) {
80598
- data.features.forEach((f, index) => {
80599
- var _a;
80636
+ const options = isFunction$1(opt) ? opt() : opt;
80637
+ const features = data.features;
80638
+ if (features) {
80639
+ features.forEach((f, index) => {
80640
+ var _a, _b;
80600
80641
  f[DEFAULT_DATA_INDEX] = index;
80601
- const name = (_a = f.properties) === null || _a === void 0 ? void 0 : _a[opt.nameProperty];
80602
- if (opt.nameMap && opt.nameMap[name]) {
80603
- f[DEFAULT_MAP_LOOK_UP_KEY] = opt.nameMap[name];
80642
+ const name = (_a = f.properties) === null || _a === void 0 ? void 0 : _a[options.nameProperty];
80643
+ const mappedName = (_b = options.nameMap) === null || _b === void 0 ? void 0 : _b[`${name}`];
80644
+ if (mappedName) {
80645
+ f[DEFAULT_MAP_LOOK_UP_KEY] = mappedName;
80604
80646
  }
80605
80647
  else {
80606
80648
  f[DEFAULT_MAP_LOOK_UP_KEY] = name;
80607
80649
  }
80608
80650
  });
80609
80651
  }
80610
- return data.features;
80652
+ return features;
80611
80653
  };
80612
80654
 
80613
80655
  class MapSeriesTooltipHelper extends BaseSeriesTooltipHelper {
@@ -81514,17 +81556,17 @@
81514
81556
  .transform({ type: 'copyDataView', options: { deep: true }, level: exports.TransformLevel.copyDataView })
81515
81557
  .transform({
81516
81558
  type: 'map',
81517
- options: {
81559
+ options: () => ({
81518
81560
  nameMap: this._nameMap,
81519
81561
  nameProperty: this._nameProperty
81520
- }
81562
+ })
81521
81563
  })
81522
81564
  .transform({
81523
81565
  type: 'lookup',
81524
81566
  options: {
81525
81567
  from: () => { var _a; return (_a = this._data) === null || _a === void 0 ? void 0 : _a.getLatestData(); },
81526
81568
  key: DEFAULT_MAP_LOOK_UP_KEY,
81527
- fields: this._nameField,
81569
+ fields: () => this._nameField,
81528
81570
  set: (feature, datum) => {
81529
81571
  if (datum) {
81530
81572
  Object.keys(datum).forEach(key => {
@@ -81743,7 +81785,8 @@
81743
81785
  if (!lastData || lastData.length === 0) {
81744
81786
  return lastData;
81745
81787
  }
81746
- const { indexField, total: totalSpec, groupData, calculationMode } = op;
81788
+ const options = isFunction$1(op) ? op() : op;
81789
+ const { indexField, total: totalSpec, groupData, calculationMode } = options;
81747
81790
  const totalData = [];
81748
81791
  const { dimensionValues, dimensionData } = groupData().latestData;
81749
81792
  let indexValues = Array.from(dimensionValues[indexField]);
@@ -81768,7 +81811,7 @@
81768
81811
  positive: temp.end,
81769
81812
  negative: temp.end
81770
81813
  };
81771
- const indexData = op.stackInverse === true ? dimensionData[key].reverse() : dimensionData[key];
81814
+ const indexData = options.stackInverse === true ? dimensionData[key].reverse() : dimensionData[key];
81772
81815
  indexData === null || indexData === void 0 ? void 0 : indexData.forEach((d, i) => {
81773
81816
  if (i === indexData.length - 1) {
81774
81817
  d[STACK_FIELD_TOTAL_TOP] = true;
@@ -81792,12 +81835,12 @@
81792
81835
  };
81793
81836
  const isTotalTag = indexData.some(d => isTotalCheck(d));
81794
81837
  if (isTotalTag) {
81795
- temp = computeTotalWithMultipleData(indexData, key, total, totalData, temp, indexValues, index, op, isTotalCheck);
81838
+ temp = computeTotalWithMultipleData(indexData, key, total, totalData, temp, indexValues, index, options, isTotalCheck);
81796
81839
  totalData.push(total);
81797
81840
  return;
81798
81841
  }
81799
81842
  }
81800
- temp = computeNormalData(indexData, key, total, totalData, temp, indexValues, index, op);
81843
+ temp = computeNormalData(indexData, key, total, totalData, temp, indexValues, index, options);
81801
81844
  totalData.push(total);
81802
81845
  });
81803
81846
  return totalData;
@@ -81968,7 +82011,7 @@
81968
82011
  if (!data) {
81969
82012
  return data;
81970
82013
  }
81971
- const { indexField, valueField, total, seriesField, calculationMode } = op;
82014
+ const { indexField, valueField, total, seriesField, calculationMode } = isFunction$1(op) ? op() : op;
81972
82015
  const totalData = {
81973
82016
  [indexField]: (total === null || total === void 0 ? void 0 : total.text) || 'total',
81974
82017
  [valueField]: data.reduce((pre, cur) => precisionAdd(pre, +cur[valueField]), 0)
@@ -81977,12 +82020,9 @@
81977
82020
  totalData[seriesField] = 'total';
81978
82021
  }
81979
82022
  if (calculationMode === 'decrease') {
81980
- data.unshift(totalData);
81981
- }
81982
- else {
81983
- data.push(totalData);
82023
+ return [totalData, ...data];
81984
82024
  }
81985
- return data;
82025
+ return [...data, totalData];
81986
82026
  };
81987
82027
 
81988
82028
  const Appear_FadeIn$6 = {
@@ -82645,21 +82685,24 @@
82645
82685
  return super.getSeriesKeys();
82646
82686
  }
82647
82687
  initData() {
82648
- var _a, _b, _c;
82688
+ var _a;
82649
82689
  super.initData();
82650
82690
  registerDataSetInstanceTransform(this._dataSet, 'waterfallFillTotal', waterfallFillTotal);
82651
82691
  registerDataSetInstanceTransform(this._dataSet, 'waterfall', waterfall$1);
82652
82692
  if (isNil$1(this._spec.total) || this._spec.total.type === 'end') {
82653
82693
  (_a = this._rawData) === null || _a === void 0 ? void 0 : _a.transform({
82654
82694
  type: 'waterfallFillTotal',
82655
- options: {
82656
- indexField: this.getGroupFields()[0],
82657
- valueField: this.getStackValueField(),
82658
- seriesField: this.getSeriesField(),
82659
- seriesFieldName: this._theme.seriesFieldName,
82660
- total: this._spec.total,
82661
- calculationMode: (_b = this._spec.calculationMode) !== null && _b !== void 0 ? _b : 'increase',
82662
- stackInverse: this.getRegion().getStackInverse()
82695
+ options: () => {
82696
+ var _a;
82697
+ return ({
82698
+ indexField: this.getGroupFields()[0],
82699
+ valueField: this.getStackValueField(),
82700
+ seriesField: this.getSeriesField(),
82701
+ seriesFieldName: this._theme.seriesFieldName,
82702
+ total: this._spec.total,
82703
+ calculationMode: (_a = this._spec.calculationMode) !== null && _a !== void 0 ? _a : 'increase',
82704
+ stackInverse: this.getRegion().getStackInverse()
82705
+ });
82663
82706
  }
82664
82707
  }, false);
82665
82708
  }
@@ -82670,17 +82713,20 @@
82670
82713
  this._totalData = new CompilableData(this._option, totalData);
82671
82714
  totalData.transform({
82672
82715
  type: 'waterfall',
82673
- options: {
82674
- indexField: this.getGroupFields()[0],
82675
- valueField: this.getStackValueField(),
82676
- seriesField: this.getSeriesField(),
82677
- seriesFieldName: this._theme.seriesFieldName,
82678
- startAs: STACK_FIELD_START,
82679
- endAs: STACK_FIELD_END,
82680
- total: this._spec.total,
82681
- calculationMode: (_c = this._spec.calculationMode) !== null && _c !== void 0 ? _c : 'increase',
82682
- groupData: () => this.getGroups().groupData,
82683
- stackInverse: this.getRegion().getStackInverse()
82716
+ options: () => {
82717
+ var _a;
82718
+ return ({
82719
+ indexField: this.getGroupFields()[0],
82720
+ valueField: this.getStackValueField(),
82721
+ seriesField: this.getSeriesField(),
82722
+ seriesFieldName: this._theme.seriesFieldName,
82723
+ startAs: STACK_FIELD_START,
82724
+ endAs: STACK_FIELD_END,
82725
+ total: this._spec.total,
82726
+ calculationMode: (_a = this._spec.calculationMode) !== null && _a !== void 0 ? _a : 'increase',
82727
+ groupData: () => this.getGroups().groupData,
82728
+ stackInverse: this.getRegion().getStackInverse()
82729
+ });
82684
82730
  }
82685
82731
  }, false);
82686
82732
  totalData.target.addListener('change', this._reStackTotal);
@@ -82871,13 +82917,12 @@
82871
82917
 
82872
82918
  const foldOutlierData = (data, op) => {
82873
82919
  const result = [];
82874
- const { outliersField, dimensionField, seriesField } = op;
82920
+ const options = isFunction$1(op) ? op() : op;
82921
+ const { outliersField, dimensionField, seriesField } = options;
82875
82922
  const latestData = data[0].latestData || [];
82876
- latestData.forEach((d) => {
82877
- let outlierValues = d[outliersField];
82878
- if (!isArray$1(outlierValues)) {
82879
- outlierValues = [outlierValues];
82880
- }
82923
+ latestData.forEach(d => {
82924
+ const rawOutlierValues = d[outliersField];
82925
+ const outlierValues = isArray$1(rawOutlierValues) ? rawOutlierValues : [rawOutlierValues];
82881
82926
  result.push(...outlierValues.map((v) => {
82882
82927
  const resData = {
82883
82928
  [BOX_PLOT_OUTLIER_VALUE_FIELD]: v
@@ -83866,11 +83911,11 @@
83866
83911
  outlierDataView.name = `${PREFIX}_series_${this.id}_outlierData`;
83867
83912
  outlierDataView.transform({
83868
83913
  type: 'foldOutlierData',
83869
- options: {
83914
+ options: () => ({
83870
83915
  dimensionField: this._direction === "horizontal" ? this._fieldY : this._fieldX,
83871
83916
  outliersField: this._outliersField,
83872
83917
  seriesField: this._seriesField
83873
- }
83918
+ })
83874
83919
  });
83875
83920
  outlierDataView.transform({
83876
83921
  type: 'addVChartProperty',
@@ -85557,7 +85602,20 @@
85557
85602
  });
85558
85603
  };
85559
85604
 
85605
+ const ROSE_LIKE_SERIES_COMPILE_ONLY_KEYS = {
85606
+ radius: true,
85607
+ outerRadius: true,
85608
+ innerRadius: true,
85609
+ startAngle: true,
85610
+ endAngle: true,
85611
+ centerX: true,
85612
+ centerY: true
85613
+ };
85560
85614
  class RoseLikeSeries extends PolarSeries {
85615
+ _getSpecUpdatePolicy() {
85616
+ const policy = super._getSpecUpdatePolicy();
85617
+ return Object.assign(Object.assign({}, policy), { compileOnlyKeys: Object.assign(Object.assign({}, policy.compileOnlyKeys), ROSE_LIKE_SERIES_COMPILE_ONLY_KEYS) });
85618
+ }
85561
85619
  getStackGroupFields() {
85562
85620
  return this._angleField;
85563
85621
  }
@@ -86025,8 +86083,11 @@
86025
86083
  this._scale = new LinearScale();
86026
86084
  }
86027
86085
  setAttrFromSpec() {
86086
+ var _a, _b;
86028
86087
  super.setAttrFromSpec();
86029
86088
  this.setExtraAttrFromSpec();
86089
+ 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());
86090
+ tickTransform && (tickTransform.options = this._tickTransformOption());
86030
86091
  }
86031
86092
  initScales() {
86032
86093
  super.initScales();
@@ -86097,6 +86158,10 @@
86097
86158
  super.initScales();
86098
86159
  this.calcScales(this._defaultBandInnerPadding, this._defaultBandOuterPadding);
86099
86160
  }
86161
+ reInit(spec) {
86162
+ super.reInit(spec);
86163
+ this._updateData();
86164
+ }
86100
86165
  registerTicksTransform() {
86101
86166
  const name = `${this.type}-ticks`;
86102
86167
  registerDataSetInstanceTransform(this._option.dataSet, name, polarAngleAxisDiscreteTicks);
@@ -86782,6 +86847,16 @@
86782
86847
  }
86783
86848
  };
86784
86849
 
86850
+ const DOT_SERIES_COMPILE_ONLY_KEYS = {
86851
+ highLightSeriesGroup: true,
86852
+ titleField: true,
86853
+ subTitleField: true
86854
+ };
86855
+ const DOT_SERIES_COMPILE_ONLY_SUB_KEYS = {
86856
+ grid: {
86857
+ background: true
86858
+ }
86859
+ };
86785
86860
  class DotSeries extends CartesianSeries {
86786
86861
  constructor() {
86787
86862
  super(...arguments);
@@ -86832,6 +86907,10 @@
86832
86907
  this._gridBackground = gridBackground;
86833
86908
  }
86834
86909
  }
86910
+ _getSpecUpdatePolicy() {
86911
+ const policy = super._getSpecUpdatePolicy();
86912
+ 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) });
86913
+ }
86835
86914
  initData() {
86836
86915
  var _a;
86837
86916
  super.initData();
@@ -87431,6 +87510,16 @@
87431
87510
 
87432
87511
  const progressLikeSeriesMark = Object.assign(Object.assign({}, baseSeriesMark), { ["group"]: { name: "group", type: "group" } });
87433
87512
 
87513
+ const PROGRESS_LIKE_SERIES_COMPILE_ONLY_KEYS = {
87514
+ radius: true,
87515
+ outerRadius: true,
87516
+ innerRadius: true,
87517
+ startAngle: true,
87518
+ endAngle: true,
87519
+ centerX: true,
87520
+ centerY: true,
87521
+ clamp: true
87522
+ };
87434
87523
  class ProgressLikeSeries extends PolarSeries {
87435
87524
  constructor() {
87436
87525
  super(...arguments);
@@ -87496,6 +87585,10 @@
87496
87585
  return this._getAngleValueEndWithoutMask(datum);
87497
87586
  };
87498
87587
  }
87588
+ _getSpecUpdatePolicy() {
87589
+ const policy = super._getSpecUpdatePolicy();
87590
+ return Object.assign(Object.assign({}, policy), { compileOnlyKeys: Object.assign(Object.assign({}, policy.compileOnlyKeys), PROGRESS_LIKE_SERIES_COMPILE_ONLY_KEYS) });
87591
+ }
87499
87592
  setAttrFromSpec() {
87500
87593
  var _a, _b, _c;
87501
87594
  super.setAttrFromSpec();
@@ -87711,7 +87804,8 @@
87711
87804
  };
87712
87805
 
87713
87806
  const CIRCULAR_PROGRESS_SERIES_COMPILE_ONLY_KEYS = {
87714
- cornerRadius: true
87807
+ cornerRadius: true,
87808
+ roundCap: true
87715
87809
  };
87716
87810
  class CircularProgressSeries extends ProgressLikeSeries {
87717
87811
  constructor() {
@@ -87938,7 +88032,9 @@
87938
88032
  };
87939
88033
 
87940
88034
  const LINEAR_PROGRESS_SERIES_COMPILE_ONLY_KEYS = {
87941
- bandWidth: true
88035
+ bandWidth: true,
88036
+ cornerRadius: true,
88037
+ clamp: true
87942
88038
  };
87943
88039
  const LINEAR_PROGRESS_SERIES_COMPILE_ONLY_SUB_KEYS = {
87944
88040
  progress: {
@@ -94009,16 +94105,21 @@
94009
94105
  registerWordCloudSeries();
94010
94106
  };
94011
94107
 
94108
+ const resolveOptionValue$2 = (option) => (isFunction$1(option) ? option() : option);
94012
94109
  const funnel = (originData, op) => {
94013
- var _a, _b;
94110
+ var _a, _b, _c, _d;
94014
94111
  const data = originData.map(datum => (Object.assign({}, datum)));
94015
94112
  if (!data || data.length === 0) {
94016
94113
  return data;
94017
94114
  }
94018
- const { valueField, asTransformRatio, asReachRatio, asHeightRatio, asValueRatio, asNextValueRatio, asLastValueRatio, asLastValue, asCurrentValue, asNextValue, heightVisual = false, isCone = true, range } = op;
94115
+ const { asTransformRatio, asReachRatio, asHeightRatio, asValueRatio, asNextValueRatio, asLastValueRatio, asLastValue, asCurrentValue, asNextValue, } = op;
94116
+ const valueField = resolveOptionValue$2(op.valueField);
94117
+ const heightVisual = (_a = resolveOptionValue$2(op.heightVisual)) !== null && _a !== void 0 ? _a : false;
94118
+ const isCone = (_b = resolveOptionValue$2(op.isCone)) !== null && _b !== void 0 ? _b : true;
94119
+ const range = resolveOptionValue$2(op.range);
94019
94120
  const max = data.reduce((m, d) => Math.max(m, Number.parseFloat(d[valueField]) || -Infinity), -Infinity);
94020
94121
  const min = data.reduce((m, d) => Math.min(m, Number.parseFloat(d[valueField]) || Infinity), Infinity);
94021
- 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];
94122
+ 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];
94022
94123
  data.forEach((d, i) => {
94023
94124
  var _a, _b;
94024
94125
  const currentValue = Number.parseFloat(d[valueField]);
@@ -94046,7 +94147,7 @@
94046
94147
  return data;
94047
94148
  }
94048
94149
  data.shift();
94049
- data.forEach((d) => {
94150
+ data.forEach(d => {
94050
94151
  d[op.asIsTransformLevel] = true;
94051
94152
  });
94052
94153
  return data;
@@ -94224,13 +94325,13 @@
94224
94325
  return fields;
94225
94326
  }
94226
94327
  _statisticViewData() {
94227
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
94328
+ var _a;
94228
94329
  super._statisticViewData();
94229
94330
  this._data.getDataView().transform({
94230
94331
  type: 'funnel',
94231
94332
  options: {
94232
- valueField: this.getValueField(),
94233
- isCone: this._spec.isCone,
94333
+ valueField: () => this.getValueField(),
94334
+ isCone: () => this._spec.isCone,
94234
94335
  asCurrentValue: FUNNEL_CURRENT_VALUE,
94235
94336
  asTransformRatio: FUNNEL_TRANSFORM_RATIO,
94236
94337
  asReachRatio: FUNNEL_REACH_RATIO,
@@ -94240,13 +94341,10 @@
94240
94341
  asLastValueRatio: FUNNEL_LAST_VALUE_RATIO,
94241
94342
  asLastValue: FUNNEL_LAST_VALUE,
94242
94343
  asNextValue: FUNNEL_NEXT_VALUE,
94243
- range: {
94244
- 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,
94245
- 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
94246
- }
94344
+ range: () => this._spec.range
94247
94345
  }
94248
94346
  });
94249
- (_j = this._viewDataTransform.getDataView()) === null || _j === void 0 ? void 0 : _j.transform({
94347
+ (_a = this._viewDataTransform.getDataView()) === null || _a === void 0 ? void 0 : _a.transform({
94250
94348
  type: 'funnelTransform',
94251
94349
  options: { asIsTransformLevel: FUNNEL_TRANSFORM_LEVEL }
94252
94350
  });
@@ -95665,7 +95763,7 @@
95665
95763
  };
95666
95764
 
95667
95765
  const collectHierarchyField = (set, data, field) => {
95668
- data.forEach((obj) => {
95766
+ data.forEach(obj => {
95669
95767
  if (!isNil$1(obj[field])) {
95670
95768
  set.add(obj[field]);
95671
95769
  }
@@ -95684,7 +95782,7 @@
95684
95782
  links: [],
95685
95783
  nodes: []
95686
95784
  };
95687
- data.forEach((datum) => {
95785
+ data.forEach(datum => {
95688
95786
  if (datum.id === 'links' || datum.id === 'nodes') {
95689
95787
  updateData[datum.id] = datum.values;
95690
95788
  }
@@ -95697,10 +95795,11 @@
95697
95795
  return data;
95698
95796
  };
95699
95797
  const sankeyLayout = (data, op) => {
95700
- if (!data || !(op === null || op === void 0 ? void 0 : op.view) || !data.length) {
95798
+ const options = isFunction$1(op) ? op() : op;
95799
+ if (!data || !(options === null || options === void 0 ? void 0 : options.view) || !data.length) {
95701
95800
  return [];
95702
95801
  }
95703
- const view = op.view();
95802
+ const view = options.view();
95704
95803
  if (view.x1 - view.x0 === 0 ||
95705
95804
  view.y1 - view.y0 === 0 ||
95706
95805
  view.x1 - view.x0 === -Infinity ||
@@ -95710,35 +95809,41 @@
95710
95809
  return [];
95711
95810
  }
95712
95811
  const originalData = data[0];
95713
- if (op.sourceField !== 'source' || op.targetField !== 'target' || op.valueField !== 'value') {
95714
- if (originalData.links) {
95715
- const updatedData = [];
95716
- originalData.links.forEach((datum) => {
95717
- const updatedDatum = {};
95718
- for (const key in datum) {
95719
- if (key === op.sourceField) {
95720
- updatedDatum.source = datum[op.sourceField];
95721
- }
95722
- else if (key === op.targetField) {
95723
- updatedDatum.target = datum[op.targetField];
95724
- }
95725
- else if (key === op.valueField) {
95726
- updatedDatum.value = datum[op.valueField];
95727
- }
95728
- else {
95729
- updatedDatum[key] = datum[key];
95730
- }
95731
- }
95732
- updatedData.push(updatedDatum);
95733
- });
95734
- originalData.links = updatedData;
95735
- }
95736
- }
95737
- const layout = new SankeyLayout(op);
95812
+ const layoutData = normalizeSankeyData(originalData, options);
95813
+ const layout = new SankeyLayout(options);
95738
95814
  const result = [];
95739
- result.push(layout.layout(originalData, view));
95815
+ result.push(layout.layout(layoutData, view));
95740
95816
  return result;
95741
95817
  };
95818
+ const normalizeSankeyData = (data, options) => {
95819
+ if (options.sourceField === 'source' &&
95820
+ options.targetField === 'target' &&
95821
+ options.valueField === 'value') {
95822
+ return data;
95823
+ }
95824
+ const links = data.links;
95825
+ if (!links) {
95826
+ return data;
95827
+ }
95828
+ return Object.assign(Object.assign({}, data), { links: links.map(link => {
95829
+ const updatedLink = {};
95830
+ Object.keys(link).forEach(key => {
95831
+ if (key === options.sourceField) {
95832
+ updatedLink.source = link[options.sourceField];
95833
+ }
95834
+ else if (key === options.targetField) {
95835
+ updatedLink.target = link[options.targetField];
95836
+ }
95837
+ else if (key === options.valueField) {
95838
+ updatedLink.value = link[options.valueField];
95839
+ }
95840
+ else {
95841
+ updatedLink[key] = link[key];
95842
+ }
95843
+ });
95844
+ return updatedLink;
95845
+ }) });
95846
+ };
95742
95847
 
95743
95848
  const sankeyNodes = (data) => {
95744
95849
  var _a, _b;
@@ -96588,7 +96693,6 @@
96588
96693
  this.setSeriesField((_a = this._spec.seriesField) !== null && _a !== void 0 ? _a : this._spec.categoryField);
96589
96694
  }
96590
96695
  initData() {
96591
- var _a, _b, _c, _d;
96592
96696
  super.initData();
96593
96697
  const viewData = this.getViewData();
96594
96698
  const rawData = this.getRawData();
@@ -96600,40 +96704,43 @@
96600
96704
  }, false);
96601
96705
  viewData.transform({
96602
96706
  type: 'sankeyLayout',
96603
- options: {
96604
- view: () => {
96605
- return {
96606
- x0: this._viewBox.x1,
96607
- x1: this._viewBox.x2,
96608
- y0: this._viewBox.y1,
96609
- y1: this._viewBox.y2
96610
- };
96611
- },
96612
- sourceField: this._spec.sourceField,
96613
- targetField: this._spec.targetField,
96614
- valueField: this._spec.valueField,
96615
- direction: this.direction,
96616
- crossNodeAlign: this._spec.crossNodeAlign,
96617
- nodeAlign: (_a = this._spec.nodeAlign) !== null && _a !== void 0 ? _a : 'justify',
96618
- nodeGap: (_b = this._spec.nodeGap) !== null && _b !== void 0 ? _b : 8,
96619
- nodeWidth: (_c = this._spec.nodeWidth) !== null && _c !== void 0 ? _c : 10,
96620
- linkWidth: this._spec.linkWidth,
96621
- minStepWidth: this._spec.minStepWidth,
96622
- minNodeHeight: (_d = this._spec.minNodeHeight) !== null && _d !== void 0 ? _d : 4,
96623
- maxNodeHeight: this._spec.maxNodeHeight,
96624
- minLinkHeight: this._spec.minLinkHeight,
96625
- maxLinkHeight: this._spec.maxLinkHeight,
96626
- iterations: this._spec.iterations,
96627
- nodeKey: this._spec.nodeKey,
96628
- linkSortBy: this._spec.linkSortBy,
96629
- nodeSortBy: this._spec.nodeSortBy,
96630
- setNodeLayer: this._spec.setNodeLayer,
96631
- dropIsolatedNode: this._spec.dropIsolatedNode,
96632
- nodeHeight: this._spec.nodeHeight,
96633
- linkHeight: this._spec.linkHeight,
96634
- equalNodeHeight: this._spec.equalNodeHeight,
96635
- linkOverlap: this._spec.linkOverlap,
96636
- inverse: this._spec.inverse
96707
+ options: () => {
96708
+ var _a, _b, _c, _d;
96709
+ return ({
96710
+ view: () => {
96711
+ return {
96712
+ x0: this._viewBox.x1,
96713
+ x1: this._viewBox.x2,
96714
+ y0: this._viewBox.y1,
96715
+ y1: this._viewBox.y2
96716
+ };
96717
+ },
96718
+ sourceField: this._spec.sourceField,
96719
+ targetField: this._spec.targetField,
96720
+ valueField: this._spec.valueField,
96721
+ direction: this.direction,
96722
+ crossNodeAlign: this._spec.crossNodeAlign,
96723
+ nodeAlign: (_a = this._spec.nodeAlign) !== null && _a !== void 0 ? _a : 'justify',
96724
+ nodeGap: (_b = this._spec.nodeGap) !== null && _b !== void 0 ? _b : 8,
96725
+ nodeWidth: (_c = this._spec.nodeWidth) !== null && _c !== void 0 ? _c : 10,
96726
+ linkWidth: this._spec.linkWidth,
96727
+ minStepWidth: this._spec.minStepWidth,
96728
+ minNodeHeight: (_d = this._spec.minNodeHeight) !== null && _d !== void 0 ? _d : 4,
96729
+ maxNodeHeight: this._spec.maxNodeHeight,
96730
+ minLinkHeight: this._spec.minLinkHeight,
96731
+ maxLinkHeight: this._spec.maxLinkHeight,
96732
+ iterations: this._spec.iterations,
96733
+ nodeKey: this._spec.nodeKey,
96734
+ linkSortBy: this._spec.linkSortBy,
96735
+ nodeSortBy: this._spec.nodeSortBy,
96736
+ setNodeLayer: this._spec.setNodeLayer,
96737
+ dropIsolatedNode: this._spec.dropIsolatedNode,
96738
+ nodeHeight: this._spec.nodeHeight,
96739
+ linkHeight: this._spec.linkHeight,
96740
+ equalNodeHeight: this._spec.equalNodeHeight,
96741
+ linkOverlap: this._spec.linkOverlap,
96742
+ inverse: this._spec.inverse
96743
+ });
96637
96744
  },
96638
96745
  level: exports.TransformLevel.sankeyLayout
96639
96746
  });
@@ -97132,16 +97239,17 @@
97132
97239
  };
97133
97240
 
97134
97241
  const treemapLayout = (data, op) => {
97135
- const viewBox = op.getViewBox();
97242
+ const options = isFunction$1(op) ? op() : op;
97243
+ const viewBox = options.getViewBox();
97136
97244
  if (viewBox) {
97137
- const layout = new TreemapLayout(op);
97138
- const res = layout.layout(data, op.getViewBox());
97245
+ const layout = new TreemapLayout(options);
97246
+ const res = layout.layout(data, viewBox);
97139
97247
  const nodes = [];
97140
- flattenNodes(res, nodes, { maxDepth: op === null || op === void 0 ? void 0 : op.maxDepth });
97141
- nodes.forEach((datum, i) => {
97248
+ flattenNodes(res, nodes, { maxDepth: options === null || options === void 0 ? void 0 : options.maxDepth });
97249
+ nodes.forEach(datum => {
97142
97250
  if (datum) {
97143
97251
  [DEFAULT_HIERARCHY_ROOT, 'name'].forEach(key => {
97144
- datum[key] = datum.datum[datum.depth][op.nameField];
97252
+ datum[key] = datum.datum[datum.depth][options.nameField];
97145
97253
  });
97146
97254
  }
97147
97255
  });
@@ -97232,34 +97340,37 @@
97232
97340
  }
97233
97341
  }
97234
97342
  initData() {
97235
- var _a, _b, _c, _d, _e;
97343
+ var _a;
97236
97344
  super.initData();
97237
97345
  registerDataSetInstanceTransform(this._dataSet, 'treemap', treemapLayout);
97238
97346
  (_a = this._data.getDataView()) === null || _a === void 0 ? void 0 : _a.transform({
97239
97347
  type: 'treemap',
97240
- options: {
97241
- nameField: this._categoryField,
97242
- valueField: this._valueField,
97243
- getViewBox: () => {
97244
- return this._viewBox.empty()
97245
- ? null
97246
- : {
97247
- x0: this._viewBox.x1,
97248
- x1: this._viewBox.x2,
97249
- y0: this._viewBox.y1,
97250
- y1: this._viewBox.y2
97251
- };
97252
- },
97253
- maxDepth: this._maxDepth,
97254
- gapWidth: this._spec.gapWidth,
97255
- padding: this._spec.nodePadding,
97256
- splitType: this._spec.splitType,
97257
- aspectRatio: this._spec.aspectRatio,
97258
- 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,
97259
- labelPosition: (_d = this._spec.nonLeafLabel) === null || _d === void 0 ? void 0 : _d.position,
97260
- minVisibleArea: (_e = this._spec.minVisibleArea) !== null && _e !== void 0 ? _e : 10,
97261
- minChildrenVisibleArea: this._spec.minChildrenVisibleArea,
97262
- minChildrenVisibleSize: this._spec.minChildrenVisibleSize
97348
+ options: () => {
97349
+ var _a, _b, _c, _d;
97350
+ return ({
97351
+ nameField: this._categoryField,
97352
+ valueField: this._valueField,
97353
+ getViewBox: () => {
97354
+ return this._viewBox.empty()
97355
+ ? null
97356
+ : {
97357
+ x0: this._viewBox.x1,
97358
+ x1: this._viewBox.x2,
97359
+ y0: this._viewBox.y1,
97360
+ y1: this._viewBox.y2
97361
+ };
97362
+ },
97363
+ maxDepth: this._maxDepth,
97364
+ gapWidth: this._spec.gapWidth,
97365
+ padding: this._spec.nodePadding,
97366
+ splitType: this._spec.splitType,
97367
+ aspectRatio: this._spec.aspectRatio,
97368
+ 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,
97369
+ labelPosition: (_c = this._spec.nonLeafLabel) === null || _c === void 0 ? void 0 : _c.position,
97370
+ minVisibleArea: (_d = this._spec.minVisibleArea) !== null && _d !== void 0 ? _d : 10,
97371
+ minChildrenVisibleArea: this._spec.minChildrenVisibleArea,
97372
+ minChildrenVisibleSize: this._spec.minChildrenVisibleSize
97373
+ });
97263
97374
  }
97264
97375
  });
97265
97376
  if (this.getViewData()) {
@@ -98223,11 +98334,13 @@
98223
98334
  const CORRELATION_Y = `${PREFIX}_CORRELATION_Y`;
98224
98335
  const CORRELATION_SIZE = `${PREFIX}_CORRELATION_SIZE`;
98225
98336
 
98337
+ const resolveOptionValue$1 = (option) => (isFunction$1(option) ? option() : option);
98226
98338
  const correlation$1 = (data, options) => {
98227
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
98339
+ var _a, _b, _c, _d, _e, _f, _g, _h;
98228
98340
  if (!data || !(options === null || options === void 0 ? void 0 : options.view) || !isArray$1(data)) {
98229
98341
  return data;
98230
98342
  }
98343
+ const dataList = data;
98231
98344
  const viewBox = options.view();
98232
98345
  if (viewBox.x1 - viewBox.x0 === 0 ||
98233
98346
  viewBox.y1 - viewBox.y0 === 0 ||
@@ -98237,43 +98350,46 @@
98237
98350
  viewBox.y1 - viewBox.y0 === Infinity) {
98238
98351
  return data;
98239
98352
  }
98240
- const startAngle = degreeToRadian((_a = options.startAngle) !== null && _a !== void 0 ? _a : -90);
98241
- const endAngle = degreeToRadian((_b = options.endAngle) !== null && _b !== void 0 ? _b : 270);
98353
+ const startAngle = degreeToRadian((_a = resolveOptionValue$1(options.startAngle)) !== null && _a !== void 0 ? _a : -90);
98354
+ const endAngle = degreeToRadian((_b = resolveOptionValue$1(options.endAngle)) !== null && _b !== void 0 ? _b : 270);
98242
98355
  const maxRadius = Math.max((viewBox.x1 - viewBox.x0) / 2, (viewBox.y1 - viewBox.y0) / 2);
98243
- const innerRadius = toPercent((_c = options.innerRadius) !== null && _c !== void 0 ? _c : 0, maxRadius);
98244
- const outerRadius = toPercent(options.outerRadius, maxRadius);
98356
+ const innerRadius = toPercent((_c = resolveOptionValue$1(options.innerRadius)) !== null && _c !== void 0 ? _c : 0, maxRadius);
98357
+ const outerRadius = toPercent(resolveOptionValue$1(options.outerRadius), maxRadius);
98358
+ const centerOption = resolveOptionValue$1(options.center);
98245
98359
  const center = [
98246
- isNumber$2((_d = options.center) === null || _d === void 0 ? void 0 : _d[0])
98247
- ? options.center[0]
98248
- : 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),
98249
- isNumber$2((_g = options.center) === null || _g === void 0 ? void 0 : _g[1])
98250
- ? options.center[1]
98251
- : 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)
98360
+ isNumber$2(centerOption === null || centerOption === void 0 ? void 0 : centerOption[0])
98361
+ ? centerOption[0]
98362
+ : viewBox.x0 + toPercent((_d = centerOption === null || centerOption === void 0 ? void 0 : centerOption[0]) !== null && _d !== void 0 ? _d : '50%', viewBox.x1 - viewBox.x0),
98363
+ isNumber$2(centerOption === null || centerOption === void 0 ? void 0 : centerOption[1])
98364
+ ? centerOption[1]
98365
+ : viewBox.y0 + toPercent((_e = centerOption === null || centerOption === void 0 ? void 0 : centerOption[1]) !== null && _e !== void 0 ? _e : '50%', viewBox.y1 - viewBox.y0)
98252
98366
  ];
98253
- const fieldAccessor = field$2(options.field);
98254
- const values = data.map(fieldAccessor);
98367
+ const fieldAccessor = field$2(resolveOptionValue$1(options.field));
98368
+ const values = dataList.map(fieldAccessor);
98255
98369
  const [min, max] = extent$2(values);
98256
98370
  const radiusScale = min === max
98257
98371
  ? (val) => (innerRadius + outerRadius) / 2
98258
98372
  : (val) => innerRadius + ((outerRadius - innerRadius) * (val - min)) / (max - min);
98259
- const sizeAccessor = !isNil$1(options.radiusField) ? field$2(options.radiusField) : fieldAccessor;
98260
- 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;
98373
+ const radiusField = resolveOptionValue$1(options.radiusField);
98374
+ const radiusRange = resolveOptionValue$1(options.radiusRange);
98375
+ const sizeAccessor = !isNil$1(radiusField) ? field$2(radiusField) : fieldAccessor;
98376
+ const defaultSize = (_f = radiusRange === null || radiusRange === void 0 ? void 0 : radiusRange[1]) !== null && _f !== void 0 ? _f : 5;
98261
98377
  let sizeScale = (datum) => defaultSize;
98262
98378
  if (sizeAccessor) {
98263
- const [minSize, maxSize] = sizeAccessor !== fieldAccessor ? extent$2(data.map(sizeAccessor)) : [min, max];
98264
- const minR = (_o = (_m = options.radiusRange) === null || _m === void 0 ? void 0 : _m[0]) !== null && _o !== void 0 ? _o : 5;
98265
- const maxR = (_q = (_p = options.radiusRange) === null || _p === void 0 ? void 0 : _p[1]) !== null && _q !== void 0 ? _q : 5;
98379
+ const [minSize, maxSize] = sizeAccessor !== fieldAccessor ? extent$2(dataList.map(sizeAccessor)) : [min, max];
98380
+ const minR = (_g = radiusRange === null || radiusRange === void 0 ? void 0 : radiusRange[0]) !== null && _g !== void 0 ? _g : 5;
98381
+ const maxR = (_h = radiusRange === null || radiusRange === void 0 ? void 0 : radiusRange[1]) !== null && _h !== void 0 ? _h : 5;
98266
98382
  if (minSize !== maxSize) {
98267
98383
  sizeScale = (datum) => minR + ((maxR - minR) * (sizeAccessor(datum) - minSize)) / (maxSize - minSize);
98268
98384
  }
98269
98385
  }
98270
98386
  const minAngle = Math.min(startAngle, endAngle);
98271
98387
  const maxAngle = Math.max(startAngle, endAngle);
98272
- const angles = getPartialAngles(minAngle, maxAngle, data.length);
98388
+ const angles = getPartialAngles(minAngle, maxAngle, dataList.length);
98273
98389
  const res = [];
98274
98390
  const searchStep = 60;
98275
98391
  const searchAngle = (maxAngle - minAngle) / searchStep;
98276
- data.forEach((datum, index) => {
98392
+ dataList.forEach((datum, index) => {
98277
98393
  const radius = radiusScale(values[index]);
98278
98394
  const size = sizeScale(datum);
98279
98395
  let x;
@@ -98346,15 +98462,20 @@
98346
98462
  return false;
98347
98463
  }
98348
98464
  return arr.some(entry => {
98349
- return Math.pow(item.x - entry.x, 2) + Math.pow(item.y - entry.y, 2) < Math.pow(item.size + entry.size, 2);
98465
+ const x = entry.x;
98466
+ const y = entry.y;
98467
+ const size = entry.size;
98468
+ return Math.pow(item.x - x, 2) + Math.pow(item.y - y, 2) < Math.pow(item.size + size, 2);
98350
98469
  });
98351
98470
  };
98352
98471
 
98472
+ const resolveOptionValue = (option) => (isFunction$1(option) ? option() : option);
98353
98473
  const correlationCenter = (data, options) => {
98354
98474
  if (!data || !isArray$1(data)) {
98355
98475
  return [];
98356
98476
  }
98357
- const { keyword, categoryField } = options;
98477
+ const keyword = resolveOptionValue(options.keyword);
98478
+ const categoryField = resolveOptionValue(options.categoryField);
98358
98479
  const nodeInfo = data[0].latestData[0];
98359
98480
  const centerInfo = {
98360
98481
  [categoryField]: keyword,
@@ -98515,7 +98636,6 @@
98515
98636
  this.setSizeRange(this._spec.sizeRange);
98516
98637
  }
98517
98638
  initData() {
98518
- var _a, _b, _c;
98519
98639
  super.initData();
98520
98640
  if (!this._data) {
98521
98641
  return;
@@ -98531,8 +98651,8 @@
98531
98651
  centerDataView.transform({
98532
98652
  type: 'correlationCenter',
98533
98653
  options: {
98534
- 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 : '',
98535
- categoryField: this._spec.categoryField
98654
+ 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 : ''; },
98655
+ categoryField: () => this._spec.categoryField
98536
98656
  }
98537
98657
  });
98538
98658
  this._centerSeriesData = new CompilableData(this._option, centerDataView);
@@ -98555,14 +98675,14 @@
98555
98675
  y1: this._viewBox.y2
98556
98676
  };
98557
98677
  },
98558
- field: this._spec.valueField,
98559
- radiusRange: this._spec.sizeRange,
98560
- radiusField: this._spec.sizeField,
98561
- center: [this._spec.centerX, this._spec.centerY],
98562
- innerRadius: this._spec.innerRadius,
98563
- outerRadius: this._spec.outerRadius,
98564
- startAngle: this._spec.startAngle,
98565
- endAngle: this._spec.endAngle
98678
+ field: () => this._spec.valueField,
98679
+ radiusRange: () => this._spec.sizeRange,
98680
+ radiusField: () => this._spec.sizeField,
98681
+ center: () => [this._spec.centerX, this._spec.centerY],
98682
+ innerRadius: () => this._spec.innerRadius,
98683
+ outerRadius: () => this._spec.outerRadius,
98684
+ startAngle: () => this._spec.startAngle,
98685
+ endAngle: () => this._spec.endAngle
98566
98686
  }
98567
98687
  });
98568
98688
  }
@@ -99340,9 +99460,10 @@
99340
99460
  }
99341
99461
 
99342
99462
  const vennLayout = (data, op) => {
99343
- const viewBox = op.getViewBox();
99463
+ const options = isFunction$1(op) ? op() : op;
99464
+ const viewBox = options.getViewBox();
99344
99465
  if (viewBox && (data === null || data === void 0 ? void 0 : data.length)) {
99345
- return vennTransform(Object.assign({ setField: op.setField, valueField: op.valueField }, viewBox), data);
99466
+ return vennTransform(Object.assign({ setField: options.setField, valueField: options.valueField }, viewBox), data);
99346
99467
  }
99347
99468
  return [];
99348
99469
  };
@@ -99425,7 +99546,7 @@
99425
99546
  registerDataSetInstanceTransform(this._dataSet, 'venn', vennLayout);
99426
99547
  (_a = this._data.getDataView()) === null || _a === void 0 ? void 0 : _a.transform({
99427
99548
  type: 'venn',
99428
- options: {
99549
+ options: () => ({
99429
99550
  getViewBox: () => {
99430
99551
  return this._viewBox.empty()
99431
99552
  ? null
@@ -99438,7 +99559,7 @@
99438
99559
  },
99439
99560
  setField: this._categoryField,
99440
99561
  valueField: this._valueField
99441
- }
99562
+ })
99442
99563
  });
99443
99564
  }
99444
99565
  compile() {
@@ -99858,7 +99979,7 @@
99858
99979
  return indicatorSpec;
99859
99980
  }
99860
99981
  _getDefaultSeriesSpec(spec, pickKeys) {
99861
- const series = super._getDefaultSeriesSpec(spec, ['radius', 'outerRadius', 'innerRadius', 'startAngle', 'endAngle', 'sortDataByAxis'], pickKeys);
99982
+ const series = super._getDefaultSeriesSpec(spec, ['radius', 'outerRadius', 'innerRadius', 'startAngle', 'endAngle', 'centerX', 'centerY', 'sortDataByAxis'], pickKeys);
99862
99983
  return series;
99863
99984
  }
99864
99985
  transformSpec(spec) {
@@ -99882,7 +100003,7 @@
99882
100003
  return false;
99883
100004
  }
99884
100005
  _getDefaultSeriesSpec(spec) {
99885
- const series = super._getDefaultSeriesSpec(spec, ['startAngle', 'endAngle', 'centerX', 'centerY']);
100006
+ const series = super._getDefaultSeriesSpec(spec, ['startAngle', 'endAngle', 'centerX', 'centerY', 'clamp']);
99886
100007
  series.categoryField = spec.categoryField || spec.radiusField;
99887
100008
  series.valueField = spec.valueField || spec.angleField;
99888
100009
  return series;
@@ -100020,6 +100141,7 @@
100020
100141
  _getDefaultSeriesSpec(spec) {
100021
100142
  var _a, _b, _c;
100022
100143
  const series = super._getDefaultSeriesSpec(spec);
100144
+ this._addSeriesRelatedSpecKeys(['radius', 'outerRadius', 'innerRadius']);
100023
100145
  series.radius = (_a = spec.radius) !== null && _a !== void 0 ? _a : POLAR_DEFAULT_RADIUS;
100024
100146
  series.outerRadius = (_b = spec.outerRadius) !== null && _b !== void 0 ? _b : POLAR_DEFAULT_RADIUS;
100025
100147
  series.innerRadius = (_c = spec.innerRadius) !== null && _c !== void 0 ? _c : 0;
@@ -100183,6 +100305,7 @@
100183
100305
  var _a, _b, _c, _d;
100184
100306
  const series = super._getDefaultSeriesSpec(spec);
100185
100307
  const areaTheme = (_b = (_a = this._option).getTheme) === null || _b === void 0 ? void 0 : _b.call(_a, 'series', 'radar', 'area');
100308
+ this._addSeriesRelatedSpecKeys(['line', 'point', 'area']);
100186
100309
  series.line = spec.line;
100187
100310
  series.point = spec.point;
100188
100311
  series.stack = spec.stack;
@@ -100688,7 +100811,7 @@
100688
100811
  _getDefaultSeriesSpec(spec) {
100689
100812
  var _a, _b;
100690
100813
  const series = super._getDefaultSeriesSpec(spec);
100691
- this._addSeriesRelatedSpecKeys(['cornerRadius']);
100814
+ this._addSeriesRelatedSpecKeys(['cornerRadius', 'progress', 'track', 'roundCap']);
100692
100815
  series.progress = spec.progress;
100693
100816
  series.track = spec.track;
100694
100817
  series.tickMask = spec.tickMask;
@@ -100737,6 +100860,7 @@
100737
100860
  class GaugeChartSpecTransformer extends ProgressLikeChartSpecTransformer {
100738
100861
  _getDefaultSeriesSpec(spec) {
100739
100862
  const series = super._getDefaultSeriesSpec(spec);
100863
+ this._addSeriesRelatedSpecKeys(['pin', 'pinBackground', 'pointer']);
100740
100864
  series.radiusField = spec.radiusField;
100741
100865
  series.pin = spec.pin;
100742
100866
  series.pinBackground = spec.pinBackground;
@@ -100978,6 +101102,7 @@
100978
101102
  var _a, _b;
100979
101103
  const series = super._getDefaultSeriesSpec(spec, ['bandWidth', 'progress', 'track', 'clamp']);
100980
101104
  series.direction = (_a = spec.direction) !== null && _a !== void 0 ? _a : 'horizontal';
101105
+ this._addSeriesRelatedSpecKeys(['cornerRadius']);
100981
101106
  series.cornerRadius = (_b = spec.cornerRadius) !== null && _b !== void 0 ? _b : 0;
100982
101107
  return series;
100983
101108
  }
@@ -101493,6 +101618,7 @@
101493
101618
  _getDefaultSeriesSpec(spec) {
101494
101619
  var _a, _b;
101495
101620
  const series = super._getDefaultSeriesSpec(spec);
101621
+ this._addSeriesRelatedSpecKeys(['area', 'point', 'line']);
101496
101622
  series.area = spec.area;
101497
101623
  series.point = spec.point;
101498
101624
  series.line = spec.line;
@@ -106673,7 +106799,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
106673
106799
  };
106674
106800
 
106675
106801
  const indicatorMapper = (data, op) => {
106676
- const { datum, title, content } = op;
106802
+ const { datum, title, content } = isFunction$1(op) ? op() : op;
106677
106803
  const mappedData = [];
106678
106804
  const datumResult = datum.call(null);
106679
106805
  if (title.visible) {
@@ -106805,11 +106931,11 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
106805
106931
  const displayData = new DataView(this._option.dataSet, { name: `${this.type}_${this.id}_data` });
106806
106932
  displayData.transform({
106807
106933
  type: 'indicatorFilter',
106808
- options: {
106934
+ options: () => ({
106809
106935
  title: this._title,
106810
106936
  content: this._content,
106811
106937
  datum: () => this._activeDatum
106812
- }
106938
+ })
106813
106939
  });
106814
106940
  displayData.target.addListener('change', this.updateDatum.bind(this));
106815
106941
  this._displayData = new CompilableData(this._option, displayData);