@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.
- package/build/es5/index.js +1 -1
- package/build/index.es.js +362 -236
- package/build/index.js +362 -236
- package/build/index.min.js +2 -2
- package/build/tsconfig.tsbuildinfo +1 -1
- package/cjs/chart/base/base-chart.d.ts +1 -0
- package/cjs/chart/base/base-chart.js +10 -2
- package/cjs/chart/base/base-chart.js.map +1 -1
- package/cjs/chart/gauge/gauge-transformer.js +3 -2
- package/cjs/chart/gauge/gauge-transformer.js.map +1 -1
- package/cjs/chart/polar/polar-transformer.js +1 -1
- package/cjs/chart/polar/polar-transformer.js.map +1 -1
- package/cjs/chart/polar/progress-like/progress-like-transformer.js +1 -1
- package/cjs/chart/polar/progress-like/progress-like-transformer.js.map +1 -1
- package/cjs/chart/progress/circular/circular-progress-transformer.js +3 -2
- package/cjs/chart/progress/circular/circular-progress-transformer.js.map +1 -1
- package/cjs/chart/progress/linear/linear-progress-transformer.js +1 -1
- package/cjs/chart/progress/linear/linear-progress-transformer.js.map +1 -1
- package/cjs/chart/radar/radar-transformer.js +3 -2
- package/cjs/chart/radar/radar-transformer.js.map +1 -1
- package/cjs/chart/range-area/range-area-transformer.js +2 -2
- package/cjs/chart/range-area/range-area-transformer.js.map +1 -1
- package/cjs/chart/rose/rose-transformer.js +2 -1
- package/cjs/chart/rose/rose-transformer.js.map +1 -1
- package/cjs/compile/compiler.js +9 -7
- package/cjs/compile/compiler.js.map +1 -1
- package/cjs/component/axis/polar/band-axis.d.ts +2 -0
- package/cjs/component/axis/polar/band-axis.js +3 -0
- package/cjs/component/axis/polar/band-axis.js.map +1 -1
- package/cjs/component/axis/polar/linear-axis.js +3 -0
- package/cjs/component/axis/polar/linear-axis.js.map +1 -1
- package/cjs/component/indicator/indicator.js +2 -2
- package/cjs/component/indicator/indicator.js.map +1 -1
- package/cjs/component/indicator/util.d.ts +4 -3
- package/cjs/component/indicator/util.js +1 -1
- package/cjs/component/indicator/util.js.map +1 -1
- package/cjs/constant/funnel.js +2 -1
- package/cjs/constant/scatter.js +1 -2
- package/cjs/constant/scroll-bar.js +1 -1
- package/cjs/constant/sunburst.js +1 -1
- package/cjs/constant/waterfall.js +1 -1
- package/cjs/constant/word-cloud.js +1 -1
- package/cjs/core/instance-manager.js +1 -1
- package/cjs/core/interface.js +1 -1
- package/cjs/core/util.js +1 -1
- package/cjs/core/vchart.js +1 -1
- package/cjs/data/transforms/box-plot.d.ts +4 -1
- package/cjs/data/transforms/box-plot.js +3 -3
- package/cjs/data/transforms/box-plot.js.map +1 -1
- package/cjs/data/transforms/correlation-center.d.ts +11 -4
- package/cjs/data/transforms/correlation-center.js +3 -2
- package/cjs/data/transforms/correlation-center.js.map +1 -1
- package/cjs/data/transforms/correlation.d.ts +18 -15
- package/cjs/data/transforms/correlation.js +22 -17
- package/cjs/data/transforms/correlation.js.map +1 -1
- package/cjs/data/transforms/funnel.d.ts +10 -8
- package/cjs/data/transforms/funnel.js +4 -3
- package/cjs/data/transforms/funnel.js.map +1 -1
- package/cjs/data/transforms/lookup.d.ts +3 -3
- package/cjs/data/transforms/lookup.js +12 -7
- package/cjs/data/transforms/lookup.js.map +1 -1
- package/cjs/data/transforms/map.d.ts +8 -2
- package/cjs/data/transforms/map.js +9 -6
- package/cjs/data/transforms/map.js.map +1 -1
- package/cjs/data/transforms/sankey.d.ts +12 -4
- package/cjs/data/transforms/sankey.js +18 -13
- package/cjs/data/transforms/sankey.js.map +1 -1
- package/cjs/data/transforms/stack-split.d.ts +2 -1
- package/cjs/data/transforms/stack-split.js +1 -1
- package/cjs/data/transforms/stack-split.js.map +1 -1
- package/cjs/data/transforms/treemap.d.ts +5 -3
- package/cjs/data/transforms/treemap.js +7 -6
- package/cjs/data/transforms/treemap.js.map +1 -1
- package/cjs/data/transforms/venn.d.ts +4 -2
- package/cjs/data/transforms/venn.js +4 -4
- package/cjs/data/transforms/venn.js.map +1 -1
- package/cjs/data/transforms/waterfall.d.ts +4 -2
- package/cjs/data/transforms/waterfall.js +7 -7
- package/cjs/data/transforms/waterfall.js.map +1 -1
- package/cjs/series/base/base-series.js +2 -2
- package/cjs/series/base/base-series.js.map +1 -1
- package/cjs/series/box-plot/box-plot.js +2 -2
- package/cjs/series/box-plot/box-plot.js.map +1 -1
- package/cjs/series/correlation/correlation.js +13 -11
- package/cjs/series/correlation/correlation.js.map +1 -1
- package/cjs/series/dot/dot.d.ts +11 -0
- package/cjs/series/dot/dot.js +16 -1
- package/cjs/series/dot/dot.js.map +1 -1
- package/cjs/series/funnel/funnel.js +5 -8
- package/cjs/series/funnel/funnel.js.map +1 -1
- package/cjs/series/map/map.js +3 -3
- package/cjs/series/map/map.js.map +1 -1
- package/cjs/series/polar/progress-like/progress-like.d.ts +2 -0
- package/cjs/series/polar/progress-like/progress-like.js +16 -1
- package/cjs/series/polar/progress-like/progress-like.js.map +1 -1
- package/cjs/series/polar/rose-like/rose-like.d.ts +2 -0
- package/cjs/series/polar/rose-like/rose-like.js +15 -1
- package/cjs/series/polar/rose-like/rose-like.js.map +1 -1
- package/cjs/series/progress/circular/circular.js +2 -1
- package/cjs/series/progress/circular/circular.js.map +1 -1
- package/cjs/series/progress/linear/linear.js +3 -1
- package/cjs/series/progress/linear/linear.js.map +1 -1
- package/cjs/series/sankey/sankey.js +35 -33
- package/cjs/series/sankey/sankey.js.map +1 -1
- package/cjs/series/treemap/treemap.js +23 -20
- package/cjs/series/treemap/treemap.js.map +1 -1
- package/cjs/series/venn/venn.js +2 -2
- package/cjs/series/venn/venn.js.map +1 -1
- package/cjs/series/waterfall/waterfall.js +26 -20
- package/cjs/series/waterfall/waterfall.js.map +1 -1
- package/esm/chart/base/base-chart.d.ts +1 -0
- package/esm/chart/base/base-chart.js +9 -2
- package/esm/chart/base/base-chart.js.map +1 -1
- package/esm/chart/gauge/gauge-transformer.js +3 -2
- package/esm/chart/gauge/gauge-transformer.js.map +1 -1
- package/esm/chart/polar/polar-transformer.js +1 -1
- package/esm/chart/polar/polar-transformer.js.map +1 -1
- package/esm/chart/polar/progress-like/progress-like-transformer.js +1 -1
- package/esm/chart/polar/progress-like/progress-like-transformer.js.map +1 -1
- package/esm/chart/progress/circular/circular-progress-transformer.js +3 -2
- package/esm/chart/progress/circular/circular-progress-transformer.js.map +1 -1
- package/esm/chart/progress/linear/linear-progress-transformer.js +1 -1
- package/esm/chart/progress/linear/linear-progress-transformer.js.map +1 -1
- package/esm/chart/radar/radar-transformer.js +3 -2
- package/esm/chart/radar/radar-transformer.js.map +1 -1
- package/esm/chart/range-area/range-area-transformer.js +2 -2
- package/esm/chart/range-area/range-area-transformer.js.map +1 -1
- package/esm/chart/rose/rose-transformer.js +2 -1
- package/esm/chart/rose/rose-transformer.js.map +1 -1
- package/esm/compile/compiler.js +9 -7
- package/esm/compile/compiler.js.map +1 -1
- package/esm/component/axis/polar/band-axis.d.ts +2 -0
- package/esm/component/axis/polar/band-axis.js +3 -0
- package/esm/component/axis/polar/band-axis.js.map +1 -1
- package/esm/component/axis/polar/linear-axis.js +3 -0
- package/esm/component/axis/polar/linear-axis.js.map +1 -1
- package/esm/component/indicator/indicator.js +2 -2
- package/esm/component/indicator/indicator.js.map +1 -1
- package/esm/component/indicator/util.d.ts +4 -3
- package/esm/component/indicator/util.js +2 -2
- package/esm/component/indicator/util.js.map +1 -1
- package/esm/constant/funnel.js +2 -1
- package/esm/constant/scatter.js +1 -2
- package/esm/constant/scroll-bar.js +1 -1
- package/esm/constant/sunburst.js +1 -1
- package/esm/constant/waterfall.js +1 -1
- package/esm/constant/word-cloud.js +1 -1
- package/esm/core/instance-manager.js +1 -1
- package/esm/core/interface.js +1 -1
- package/esm/core/util.js +1 -1
- package/esm/core/vchart.js +1 -1
- package/esm/data/transforms/box-plot.d.ts +4 -1
- package/esm/data/transforms/box-plot.js +4 -4
- package/esm/data/transforms/box-plot.js.map +1 -1
- package/esm/data/transforms/correlation-center.d.ts +11 -4
- package/esm/data/transforms/correlation-center.js +4 -2
- package/esm/data/transforms/correlation-center.js.map +1 -1
- package/esm/data/transforms/correlation.d.ts +18 -15
- package/esm/data/transforms/correlation.js +13 -8
- package/esm/data/transforms/correlation.js.map +1 -1
- package/esm/data/transforms/funnel.d.ts +10 -8
- package/esm/data/transforms/funnel.js +5 -3
- package/esm/data/transforms/funnel.js.map +1 -1
- package/esm/data/transforms/lookup.d.ts +3 -3
- package/esm/data/transforms/lookup.js +12 -6
- package/esm/data/transforms/lookup.js.map +1 -1
- package/esm/data/transforms/map.d.ts +8 -2
- package/esm/data/transforms/map.js +11 -6
- package/esm/data/transforms/map.js.map +1 -1
- package/esm/data/transforms/sankey.d.ts +12 -4
- package/esm/data/transforms/sankey.js +19 -14
- package/esm/data/transforms/sankey.js.map +1 -1
- package/esm/data/transforms/stack-split.d.ts +2 -1
- package/esm/data/transforms/stack-split.js +2 -2
- package/esm/data/transforms/stack-split.js.map +1 -1
- package/esm/data/transforms/treemap.d.ts +5 -3
- package/esm/data/transforms/treemap.js +8 -5
- package/esm/data/transforms/treemap.js.map +1 -1
- package/esm/data/transforms/venn.d.ts +4 -2
- package/esm/data/transforms/venn.js +5 -3
- package/esm/data/transforms/venn.js.map +1 -1
- package/esm/data/transforms/waterfall.d.ts +4 -2
- package/esm/data/transforms/waterfall.js +7 -8
- package/esm/data/transforms/waterfall.js.map +1 -1
- package/esm/series/base/base-series.js +2 -2
- package/esm/series/base/base-series.js.map +1 -1
- package/esm/series/box-plot/box-plot.js +2 -2
- package/esm/series/box-plot/box-plot.js.map +1 -1
- package/esm/series/correlation/correlation.js +13 -11
- package/esm/series/correlation/correlation.js.map +1 -1
- package/esm/series/dot/dot.d.ts +11 -0
- package/esm/series/dot/dot.js +17 -0
- package/esm/series/dot/dot.js.map +1 -1
- package/esm/series/funnel/funnel.js +5 -8
- package/esm/series/funnel/funnel.js.map +1 -1
- package/esm/series/map/map.js +3 -3
- package/esm/series/map/map.js.map +1 -1
- package/esm/series/polar/progress-like/progress-like.d.ts +2 -0
- package/esm/series/polar/progress-like/progress-like.js +17 -0
- package/esm/series/polar/progress-like/progress-like.js.map +1 -1
- package/esm/series/polar/rose-like/rose-like.d.ts +2 -0
- package/esm/series/polar/rose-like/rose-like.js +16 -0
- package/esm/series/polar/rose-like/rose-like.js.map +1 -1
- package/esm/series/progress/circular/circular.js +2 -1
- package/esm/series/progress/circular/circular.js.map +1 -1
- package/esm/series/progress/linear/linear.js +3 -1
- package/esm/series/progress/linear/linear.js.map +1 -1
- package/esm/series/sankey/sankey.js +35 -33
- package/esm/series/sankey/sankey.js.map +1 -1
- package/esm/series/treemap/treemap.js +23 -20
- package/esm/series/treemap/treemap.js.map +1 -1
- package/esm/series/venn/venn.js +2 -2
- package/esm/series/venn/venn.js.map +1 -1
- package/esm/series/waterfall/waterfall.js +26 -20
- package/esm/series/waterfall/waterfall.js.map +1 -1
- package/package.json +10 -10
package/build/index.es.js
CHANGED
|
@@ -15769,13 +15769,11 @@ class Graphic extends Node {
|
|
|
15769
15769
|
};
|
|
15770
15770
|
}
|
|
15771
15771
|
recomputeCurrentStatePatch() {
|
|
15772
|
-
var _a, _b
|
|
15772
|
+
var _a, _b;
|
|
15773
15773
|
if (!(null === (_a = this.currentStates) || void 0 === _a ? void 0 : _a.length)) return this.effectiveStates = [], this.resolvedStatePatch = void 0, void this.syncSharedStateActiveRegistrations();
|
|
15774
|
-
const stateResolveBaseAttrs =
|
|
15775
|
-
|
|
15776
|
-
|
|
15777
|
-
const transition = stateModel.useStates(this.currentStates),
|
|
15778
|
-
effectiveStates = null !== (_d = transition.effectiveStates) && void 0 !== _d ? _d : transition.states,
|
|
15774
|
+
const stateResolveBaseAttrs = this.getStateResolveBaseAttrs(),
|
|
15775
|
+
transition = this.createStateModel(stateResolveBaseAttrs).useStates(this.currentStates),
|
|
15776
|
+
effectiveStates = null !== (_b = transition.effectiveStates) && void 0 !== _b ? _b : transition.states,
|
|
15779
15777
|
resolvedStateAttrs = this.stateEngine && this.compiledStateDefinitions ? Object.assign({}, this.stateEngine.resolvedPatch) : this.getStateStyleResolver(this.stateMergeMode).resolve(stateResolveBaseAttrs, this.states, this.stateProxy, transition.states, this.stateSort);
|
|
15780
15778
|
this.currentStates = transition.states, this.effectiveStates = [...effectiveStates], this.resolvedStatePatch = resolvedStateAttrs, this.syncSharedStateActiveRegistrations();
|
|
15781
15779
|
}
|
|
@@ -16368,7 +16366,15 @@ class Graphic extends Node {
|
|
|
16368
16366
|
var _a;
|
|
16369
16367
|
return null === (_a = this.states) || void 0 === _a ? void 0 : _a[stateName];
|
|
16370
16368
|
}
|
|
16371
|
-
|
|
16369
|
+
getStateResolveBaseAttrs() {
|
|
16370
|
+
var _a;
|
|
16371
|
+
return null !== (_a = this.baseAttributes) && void 0 !== _a ? _a : this.attribute;
|
|
16372
|
+
}
|
|
16373
|
+
syncStateResolveContext(stateResolveBaseAttrs = this.getStateResolveBaseAttrs()) {
|
|
16374
|
+
var _a;
|
|
16375
|
+
return null === (_a = this.stateEngine) || void 0 === _a || _a.setResolveContext(this, stateResolveBaseAttrs), stateResolveBaseAttrs;
|
|
16376
|
+
}
|
|
16377
|
+
createStateModel(stateResolveBaseAttrs = this.getStateResolveBaseAttrs()) {
|
|
16372
16378
|
const {
|
|
16373
16379
|
compiledDefinitions: compiledDefinitions,
|
|
16374
16380
|
stateProxyEligibility: stateProxyEligibility,
|
|
@@ -16381,7 +16387,7 @@ class Graphic extends Node {
|
|
|
16381
16387
|
stateProxyEligibility: stateProxyEligibility,
|
|
16382
16388
|
states: this.states,
|
|
16383
16389
|
mergeMode: this.stateMergeMode
|
|
16384
|
-
}), 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({
|
|
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), this.syncStateResolveContext(stateResolveBaseAttrs), new StateModel({
|
|
16385
16391
|
states: this.states,
|
|
16386
16392
|
currentStates: this.currentStates,
|
|
16387
16393
|
stateSort: this.stateSort,
|
|
@@ -16451,18 +16457,18 @@ class Graphic extends Node {
|
|
|
16451
16457
|
};
|
|
16452
16458
|
}
|
|
16453
16459
|
resolveGraphicStateTransition(states, previousStates, forceResolverRefresh = !1) {
|
|
16454
|
-
var _a, _b
|
|
16460
|
+
var _a, _b;
|
|
16455
16461
|
let transition = this.resolveSimpleLocalStateTransition(states, previousStates);
|
|
16456
16462
|
const isSimpleLocalTransition = !!transition;
|
|
16457
16463
|
let resolvedStateAttrs;
|
|
16458
16464
|
if (transition) resolvedStateAttrs = transition.resolvedStateAttrs;else {
|
|
16459
|
-
const stateResolveBaseAttrs =
|
|
16460
|
-
stateModel = this.createStateModel();
|
|
16461
|
-
|
|
16465
|
+
const stateResolveBaseAttrs = this.getStateResolveBaseAttrs(),
|
|
16466
|
+
stateModel = this.createStateModel(stateResolveBaseAttrs);
|
|
16467
|
+
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);
|
|
16462
16468
|
}
|
|
16463
16469
|
return {
|
|
16464
16470
|
transition: transition,
|
|
16465
|
-
effectiveStates: null !== (
|
|
16471
|
+
effectiveStates: null !== (_b = transition.effectiveStates) && void 0 !== _b ? _b : transition.states,
|
|
16466
16472
|
resolvedStateAttrs: resolvedStateAttrs,
|
|
16467
16473
|
isSimpleLocalTransition: isSimpleLocalTransition
|
|
16468
16474
|
};
|
|
@@ -16633,10 +16639,10 @@ class Graphic extends Node {
|
|
|
16633
16639
|
}
|
|
16634
16640
|
}
|
|
16635
16641
|
invalidateResolver() {
|
|
16636
|
-
var _a, _b
|
|
16642
|
+
var _a, _b;
|
|
16637
16643
|
if (!this.stateEngine || !(null === (_a = this.currentStates) || void 0 === _a ? void 0 : _a.length) || !this.compiledStateDefinitions) return;
|
|
16638
|
-
|
|
16639
|
-
this.
|
|
16644
|
+
this.syncStateResolveContext();
|
|
16645
|
+
this.resolverEpoch = (null !== (_b = this.resolverEpoch) && void 0 !== _b ? _b : 0) + 1, this.stateEngine.invalidateResolverCache();
|
|
16640
16646
|
const transition = this.stateEngine.applyStates(this.currentStates),
|
|
16641
16647
|
resolvedStateAttrs = Object.assign({}, this.stateEngine.resolvedPatch);
|
|
16642
16648
|
this.effectiveStates = [...transition.effectiveStates], this.resolvedStatePatch = resolvedStateAttrs, this.sharedStateDirty = !1, this.syncSharedStateActiveRegistrations(), this.stopStateAnimates(), this._restoreAttributeFromStaticTruth({
|
|
@@ -60786,29 +60792,38 @@ class Compiler {
|
|
|
60786
60792
|
}
|
|
60787
60793
|
renderMarks() {
|
|
60788
60794
|
var _a;
|
|
60789
|
-
|
|
60795
|
+
let hasCommitedMark = this._hasCommitedMark();
|
|
60796
|
+
const needsLayout = this._layoutState === LayoutState.before;
|
|
60797
|
+
if (!hasCommitedMark && !needsLayout) {
|
|
60790
60798
|
return;
|
|
60791
60799
|
}
|
|
60792
60800
|
log(`--- start of renderMarks(${this._count}) ---`);
|
|
60793
60801
|
this.clearProgressive();
|
|
60794
|
-
|
|
60795
|
-
|
|
60796
|
-
|
|
60797
|
-
|
|
60802
|
+
if (hasCommitedMark) {
|
|
60803
|
+
this._rootMarks.forEach(mark => {
|
|
60804
|
+
mark.render();
|
|
60805
|
+
});
|
|
60806
|
+
}
|
|
60807
|
+
if (needsLayout) {
|
|
60798
60808
|
this._layoutState = LayoutState.layouting;
|
|
60799
60809
|
(_a = this._compileChart) === null || _a === void 0 ? void 0 : _a.onLayout();
|
|
60800
60810
|
this._layoutState = LayoutState.reevaluate;
|
|
60801
|
-
|
|
60811
|
+
hasCommitedMark = this._hasCommitedMark();
|
|
60812
|
+
if (hasCommitedMark) {
|
|
60802
60813
|
this._rootMarks.forEach(mark => {
|
|
60803
60814
|
mark.render();
|
|
60804
60815
|
});
|
|
60805
60816
|
}
|
|
60806
60817
|
this.handleLayoutEnd();
|
|
60807
60818
|
}
|
|
60808
|
-
|
|
60809
|
-
|
|
60819
|
+
if (hasCommitedMark) {
|
|
60820
|
+
this.findProgressiveMarks();
|
|
60821
|
+
this.updateStateAnimation();
|
|
60822
|
+
}
|
|
60810
60823
|
this._doRender(true);
|
|
60811
|
-
|
|
60824
|
+
if (hasCommitedMark) {
|
|
60825
|
+
this.doPreProgressive();
|
|
60826
|
+
}
|
|
60812
60827
|
log(`--- start of renderMarks(${this._count}) ---`);
|
|
60813
60828
|
this._count++;
|
|
60814
60829
|
}
|
|
@@ -67793,32 +67808,35 @@ const getSpecInfo = (chartSpec, specKey, compType, filter) => {
|
|
|
67793
67808
|
return specInfos;
|
|
67794
67809
|
};
|
|
67795
67810
|
|
|
67811
|
+
const resolveOptionValue$3 = (option) => (isFunction$1(option) ? option() : option);
|
|
67796
67812
|
const lookup = (data, opt) => {
|
|
67797
|
-
|
|
67813
|
+
var _a;
|
|
67814
|
+
const fromData = (_a = opt.from) === null || _a === void 0 ? void 0 : _a.call(opt);
|
|
67815
|
+
if (!fromData) {
|
|
67798
67816
|
return data;
|
|
67799
67817
|
}
|
|
67800
|
-
const fields = opt.fields;
|
|
67818
|
+
const fields = resolveOptionValue$3(opt.fields);
|
|
67801
67819
|
const key = opt.key;
|
|
67802
67820
|
const values = opt.values;
|
|
67803
67821
|
const defaultValue = opt.default;
|
|
67804
67822
|
const as = opt.as || [fields];
|
|
67805
|
-
const index =
|
|
67823
|
+
const index = fromData.reduce(function (map, obj) {
|
|
67806
67824
|
if (obj[fields]) {
|
|
67807
|
-
map.set(obj[fields]
|
|
67825
|
+
map.set(`${obj[fields]}`, obj);
|
|
67808
67826
|
}
|
|
67809
67827
|
return map;
|
|
67810
67828
|
}, new Map());
|
|
67811
67829
|
let set;
|
|
67812
67830
|
if (isFunction$1(opt.set)) {
|
|
67813
67831
|
set = function (d) {
|
|
67814
|
-
const v = index.get(d[key]);
|
|
67832
|
+
const v = index.get(`${d[key]}`);
|
|
67815
67833
|
opt.set(d, v);
|
|
67816
67834
|
};
|
|
67817
67835
|
}
|
|
67818
67836
|
else if (values) {
|
|
67819
67837
|
const m = values.length;
|
|
67820
67838
|
set = function (d) {
|
|
67821
|
-
const v = index.get(d[key]);
|
|
67839
|
+
const v = index.get(`${d[key]}`);
|
|
67822
67840
|
if (isNil$1(v)) {
|
|
67823
67841
|
for (let i = 0; i < m; ++i) {
|
|
67824
67842
|
d[as[i]] = defaultValue;
|
|
@@ -67833,7 +67851,7 @@ const lookup = (data, opt) => {
|
|
|
67833
67851
|
}
|
|
67834
67852
|
else {
|
|
67835
67853
|
set = function (d) {
|
|
67836
|
-
const v = index.get(d[key]);
|
|
67854
|
+
const v = index.get(`${d[key]}`);
|
|
67837
67855
|
d[as[0]] = isValid$1(v) ? v : defaultValue;
|
|
67838
67856
|
};
|
|
67839
67857
|
}
|
|
@@ -69134,9 +69152,9 @@ class BaseSeries extends BaseModel {
|
|
|
69134
69152
|
});
|
|
69135
69153
|
this._viewStackData.transform({
|
|
69136
69154
|
type: 'stackSplit',
|
|
69137
|
-
options: {
|
|
69155
|
+
options: () => ({
|
|
69138
69156
|
fields: this.getStackGroupFields()
|
|
69139
|
-
}
|
|
69157
|
+
})
|
|
69140
69158
|
}, false);
|
|
69141
69159
|
}
|
|
69142
69160
|
_noAnimationDataKey(datum, index) {
|
|
@@ -76588,6 +76606,9 @@ class BaseChart extends CompilableBase {
|
|
|
76588
76606
|
const onlyMarkerComponentsRemoved = this._isOnlyMarkerComponentsRemoved(this._spec, spec, currentKeys);
|
|
76589
76607
|
const onlyComponentSpecsChanged = this._isOnlyComponentSpecsChanged(this._spec, spec, currentKeys);
|
|
76590
76608
|
const onlySeriesSpecsChanged = this._isOnlySeriesSpecsChanged(this._spec, spec, currentKeys);
|
|
76609
|
+
const onlyComponentOrSeriesSpecsChanged = onlyComponentSpecsChanged || onlySeriesSpecsChanged
|
|
76610
|
+
? true
|
|
76611
|
+
: this._isOnlyComponentOrSeriesSpecsChanged(this._spec, spec, currentKeys);
|
|
76591
76612
|
this._spec = spec;
|
|
76592
76613
|
if (onlyMarkerComponentsRemoved) {
|
|
76593
76614
|
this._removeMarkerComponentsForEmptySpecs(result);
|
|
@@ -76636,7 +76657,7 @@ class BaseChart extends CompilableBase {
|
|
|
76636
76657
|
return result;
|
|
76637
76658
|
}
|
|
76638
76659
|
this.reInit();
|
|
76639
|
-
if (!
|
|
76660
|
+
if (!onlyComponentOrSeriesSpecsChanged || !this._canSkipChartDataStages(result)) {
|
|
76640
76661
|
this.updateDataSpec();
|
|
76641
76662
|
this.reDataFlow();
|
|
76642
76663
|
this._reRunStackDataFlow();
|
|
@@ -76829,6 +76850,24 @@ class BaseChart extends CompilableBase {
|
|
|
76829
76850
|
});
|
|
76830
76851
|
return hasSeriesSpecChange && onlySeriesSpecChange;
|
|
76831
76852
|
}
|
|
76853
|
+
_isOnlyComponentOrSeriesSpecsChanged(currentSpec, nextSpec, specKeys) {
|
|
76854
|
+
var _a, _b;
|
|
76855
|
+
let hasComponentOrSeriesSpecChange = false;
|
|
76856
|
+
const currentSpecRecord = currentSpec;
|
|
76857
|
+
const nextSpecRecord = nextSpec;
|
|
76858
|
+
const seriesRelatedSpecKeys = (_b = (_a = this._specTransformer) === null || _a === void 0 ? void 0 : _a.getSeriesRelatedSpecKeys()) !== null && _b !== void 0 ? _b : {};
|
|
76859
|
+
const onlyComponentOrSeriesSpecChange = specKeys.every(key => {
|
|
76860
|
+
if (isEqual(currentSpecRecord[key], nextSpecRecord[key])) {
|
|
76861
|
+
return true;
|
|
76862
|
+
}
|
|
76863
|
+
if (this._isComponentSpecKey(key) || seriesRelatedSpecKeys[key]) {
|
|
76864
|
+
hasComponentOrSeriesSpecChange = true;
|
|
76865
|
+
return true;
|
|
76866
|
+
}
|
|
76867
|
+
return false;
|
|
76868
|
+
});
|
|
76869
|
+
return hasComponentOrSeriesSpecChange && onlyComponentOrSeriesSpecChange;
|
|
76870
|
+
}
|
|
76832
76871
|
_canSkipChartDataStages(result) {
|
|
76833
76872
|
const effects = result.effects;
|
|
76834
76873
|
return !!(effects === null || effects === void 0 ? void 0 : effects.series) && !effects.remake && !effects.data && !effects.scaleDomain && !result.reMake;
|
|
@@ -77730,7 +77769,7 @@ const stackSplit = (data, op) => {
|
|
|
77730
77769
|
const result = {
|
|
77731
77770
|
nodes: {}
|
|
77732
77771
|
};
|
|
77733
|
-
const { fields } = op;
|
|
77772
|
+
const { fields } = isFunction$1(op) ? op() : op;
|
|
77734
77773
|
if (!(fields === null || fields === void 0 ? void 0 : fields.length)) {
|
|
77735
77774
|
return result;
|
|
77736
77775
|
}
|
|
@@ -80588,20 +80627,23 @@ class GeoSeries extends BaseSeries {
|
|
|
80588
80627
|
}
|
|
80589
80628
|
|
|
80590
80629
|
const map$1 = (data, opt) => {
|
|
80591
|
-
|
|
80592
|
-
|
|
80593
|
-
|
|
80630
|
+
const options = isFunction$1(opt) ? opt() : opt;
|
|
80631
|
+
const features = data.features;
|
|
80632
|
+
if (features) {
|
|
80633
|
+
features.forEach((f, index) => {
|
|
80634
|
+
var _a, _b;
|
|
80594
80635
|
f[DEFAULT_DATA_INDEX] = index;
|
|
80595
|
-
const name = (_a = f.properties) === null || _a === void 0 ? void 0 : _a[
|
|
80596
|
-
|
|
80597
|
-
|
|
80636
|
+
const name = (_a = f.properties) === null || _a === void 0 ? void 0 : _a[options.nameProperty];
|
|
80637
|
+
const mappedName = (_b = options.nameMap) === null || _b === void 0 ? void 0 : _b[`${name}`];
|
|
80638
|
+
if (mappedName) {
|
|
80639
|
+
f[DEFAULT_MAP_LOOK_UP_KEY] = mappedName;
|
|
80598
80640
|
}
|
|
80599
80641
|
else {
|
|
80600
80642
|
f[DEFAULT_MAP_LOOK_UP_KEY] = name;
|
|
80601
80643
|
}
|
|
80602
80644
|
});
|
|
80603
80645
|
}
|
|
80604
|
-
return
|
|
80646
|
+
return features;
|
|
80605
80647
|
};
|
|
80606
80648
|
|
|
80607
80649
|
class MapSeriesTooltipHelper extends BaseSeriesTooltipHelper {
|
|
@@ -81508,17 +81550,17 @@ class MapSeries extends GeoSeries {
|
|
|
81508
81550
|
.transform({ type: 'copyDataView', options: { deep: true }, level: TransformLevel.copyDataView })
|
|
81509
81551
|
.transform({
|
|
81510
81552
|
type: 'map',
|
|
81511
|
-
options: {
|
|
81553
|
+
options: () => ({
|
|
81512
81554
|
nameMap: this._nameMap,
|
|
81513
81555
|
nameProperty: this._nameProperty
|
|
81514
|
-
}
|
|
81556
|
+
})
|
|
81515
81557
|
})
|
|
81516
81558
|
.transform({
|
|
81517
81559
|
type: 'lookup',
|
|
81518
81560
|
options: {
|
|
81519
81561
|
from: () => { var _a; return (_a = this._data) === null || _a === void 0 ? void 0 : _a.getLatestData(); },
|
|
81520
81562
|
key: DEFAULT_MAP_LOOK_UP_KEY,
|
|
81521
|
-
fields: this._nameField,
|
|
81563
|
+
fields: () => this._nameField,
|
|
81522
81564
|
set: (feature, datum) => {
|
|
81523
81565
|
if (datum) {
|
|
81524
81566
|
Object.keys(datum).forEach(key => {
|
|
@@ -81737,7 +81779,8 @@ const waterfall$1 = (lastData, op) => {
|
|
|
81737
81779
|
if (!lastData || lastData.length === 0) {
|
|
81738
81780
|
return lastData;
|
|
81739
81781
|
}
|
|
81740
|
-
const
|
|
81782
|
+
const options = isFunction$1(op) ? op() : op;
|
|
81783
|
+
const { indexField, total: totalSpec, groupData, calculationMode } = options;
|
|
81741
81784
|
const totalData = [];
|
|
81742
81785
|
const { dimensionValues, dimensionData } = groupData().latestData;
|
|
81743
81786
|
let indexValues = Array.from(dimensionValues[indexField]);
|
|
@@ -81762,7 +81805,7 @@ const waterfall$1 = (lastData, op) => {
|
|
|
81762
81805
|
positive: temp.end,
|
|
81763
81806
|
negative: temp.end
|
|
81764
81807
|
};
|
|
81765
|
-
const indexData =
|
|
81808
|
+
const indexData = options.stackInverse === true ? dimensionData[key].reverse() : dimensionData[key];
|
|
81766
81809
|
indexData === null || indexData === void 0 ? void 0 : indexData.forEach((d, i) => {
|
|
81767
81810
|
if (i === indexData.length - 1) {
|
|
81768
81811
|
d[STACK_FIELD_TOTAL_TOP] = true;
|
|
@@ -81786,12 +81829,12 @@ const waterfall$1 = (lastData, op) => {
|
|
|
81786
81829
|
};
|
|
81787
81830
|
const isTotalTag = indexData.some(d => isTotalCheck(d));
|
|
81788
81831
|
if (isTotalTag) {
|
|
81789
|
-
temp = computeTotalWithMultipleData(indexData, key, total, totalData, temp, indexValues, index,
|
|
81832
|
+
temp = computeTotalWithMultipleData(indexData, key, total, totalData, temp, indexValues, index, options, isTotalCheck);
|
|
81790
81833
|
totalData.push(total);
|
|
81791
81834
|
return;
|
|
81792
81835
|
}
|
|
81793
81836
|
}
|
|
81794
|
-
temp = computeNormalData(indexData, key, total, totalData, temp, indexValues, index,
|
|
81837
|
+
temp = computeNormalData(indexData, key, total, totalData, temp, indexValues, index, options);
|
|
81795
81838
|
totalData.push(total);
|
|
81796
81839
|
});
|
|
81797
81840
|
return totalData;
|
|
@@ -81962,7 +82005,7 @@ const waterfallFillTotal = (data, op) => {
|
|
|
81962
82005
|
if (!data) {
|
|
81963
82006
|
return data;
|
|
81964
82007
|
}
|
|
81965
|
-
const { indexField, valueField, total, seriesField, calculationMode } = op;
|
|
82008
|
+
const { indexField, valueField, total, seriesField, calculationMode } = isFunction$1(op) ? op() : op;
|
|
81966
82009
|
const totalData = {
|
|
81967
82010
|
[indexField]: (total === null || total === void 0 ? void 0 : total.text) || 'total',
|
|
81968
82011
|
[valueField]: data.reduce((pre, cur) => precisionAdd(pre, +cur[valueField]), 0)
|
|
@@ -81971,12 +82014,9 @@ const waterfallFillTotal = (data, op) => {
|
|
|
81971
82014
|
totalData[seriesField] = 'total';
|
|
81972
82015
|
}
|
|
81973
82016
|
if (calculationMode === 'decrease') {
|
|
81974
|
-
data
|
|
81975
|
-
}
|
|
81976
|
-
else {
|
|
81977
|
-
data.push(totalData);
|
|
82017
|
+
return [totalData, ...data];
|
|
81978
82018
|
}
|
|
81979
|
-
return data;
|
|
82019
|
+
return [...data, totalData];
|
|
81980
82020
|
};
|
|
81981
82021
|
|
|
81982
82022
|
const Appear_FadeIn$6 = {
|
|
@@ -82639,21 +82679,24 @@ class WaterfallSeries extends BarSeries {
|
|
|
82639
82679
|
return super.getSeriesKeys();
|
|
82640
82680
|
}
|
|
82641
82681
|
initData() {
|
|
82642
|
-
var _a
|
|
82682
|
+
var _a;
|
|
82643
82683
|
super.initData();
|
|
82644
82684
|
registerDataSetInstanceTransform(this._dataSet, 'waterfallFillTotal', waterfallFillTotal);
|
|
82645
82685
|
registerDataSetInstanceTransform(this._dataSet, 'waterfall', waterfall$1);
|
|
82646
82686
|
if (isNil$1(this._spec.total) || this._spec.total.type === 'end') {
|
|
82647
82687
|
(_a = this._rawData) === null || _a === void 0 ? void 0 : _a.transform({
|
|
82648
82688
|
type: 'waterfallFillTotal',
|
|
82649
|
-
options: {
|
|
82650
|
-
|
|
82651
|
-
|
|
82652
|
-
|
|
82653
|
-
|
|
82654
|
-
|
|
82655
|
-
|
|
82656
|
-
|
|
82689
|
+
options: () => {
|
|
82690
|
+
var _a;
|
|
82691
|
+
return ({
|
|
82692
|
+
indexField: this.getGroupFields()[0],
|
|
82693
|
+
valueField: this.getStackValueField(),
|
|
82694
|
+
seriesField: this.getSeriesField(),
|
|
82695
|
+
seriesFieldName: this._theme.seriesFieldName,
|
|
82696
|
+
total: this._spec.total,
|
|
82697
|
+
calculationMode: (_a = this._spec.calculationMode) !== null && _a !== void 0 ? _a : 'increase',
|
|
82698
|
+
stackInverse: this.getRegion().getStackInverse()
|
|
82699
|
+
});
|
|
82657
82700
|
}
|
|
82658
82701
|
}, false);
|
|
82659
82702
|
}
|
|
@@ -82664,17 +82707,20 @@ class WaterfallSeries extends BarSeries {
|
|
|
82664
82707
|
this._totalData = new CompilableData(this._option, totalData);
|
|
82665
82708
|
totalData.transform({
|
|
82666
82709
|
type: 'waterfall',
|
|
82667
|
-
options: {
|
|
82668
|
-
|
|
82669
|
-
|
|
82670
|
-
|
|
82671
|
-
|
|
82672
|
-
|
|
82673
|
-
|
|
82674
|
-
|
|
82675
|
-
|
|
82676
|
-
|
|
82677
|
-
|
|
82710
|
+
options: () => {
|
|
82711
|
+
var _a;
|
|
82712
|
+
return ({
|
|
82713
|
+
indexField: this.getGroupFields()[0],
|
|
82714
|
+
valueField: this.getStackValueField(),
|
|
82715
|
+
seriesField: this.getSeriesField(),
|
|
82716
|
+
seriesFieldName: this._theme.seriesFieldName,
|
|
82717
|
+
startAs: STACK_FIELD_START,
|
|
82718
|
+
endAs: STACK_FIELD_END,
|
|
82719
|
+
total: this._spec.total,
|
|
82720
|
+
calculationMode: (_a = this._spec.calculationMode) !== null && _a !== void 0 ? _a : 'increase',
|
|
82721
|
+
groupData: () => this.getGroups().groupData,
|
|
82722
|
+
stackInverse: this.getRegion().getStackInverse()
|
|
82723
|
+
});
|
|
82678
82724
|
}
|
|
82679
82725
|
}, false);
|
|
82680
82726
|
totalData.target.addListener('change', this._reStackTotal);
|
|
@@ -82865,13 +82911,12 @@ var BOX_PLOT_TOOLTIP_KEYS;
|
|
|
82865
82911
|
|
|
82866
82912
|
const foldOutlierData = (data, op) => {
|
|
82867
82913
|
const result = [];
|
|
82868
|
-
const
|
|
82914
|
+
const options = isFunction$1(op) ? op() : op;
|
|
82915
|
+
const { outliersField, dimensionField, seriesField } = options;
|
|
82869
82916
|
const latestData = data[0].latestData || [];
|
|
82870
|
-
latestData.forEach(
|
|
82871
|
-
|
|
82872
|
-
|
|
82873
|
-
outlierValues = [outlierValues];
|
|
82874
|
-
}
|
|
82917
|
+
latestData.forEach(d => {
|
|
82918
|
+
const rawOutlierValues = d[outliersField];
|
|
82919
|
+
const outlierValues = isArray$1(rawOutlierValues) ? rawOutlierValues : [rawOutlierValues];
|
|
82875
82920
|
result.push(...outlierValues.map((v) => {
|
|
82876
82921
|
const resData = {
|
|
82877
82922
|
[BOX_PLOT_OUTLIER_VALUE_FIELD]: v
|
|
@@ -83860,11 +83905,11 @@ class BoxPlotSeries extends CartesianSeries {
|
|
|
83860
83905
|
outlierDataView.name = `${PREFIX}_series_${this.id}_outlierData`;
|
|
83861
83906
|
outlierDataView.transform({
|
|
83862
83907
|
type: 'foldOutlierData',
|
|
83863
|
-
options: {
|
|
83908
|
+
options: () => ({
|
|
83864
83909
|
dimensionField: this._direction === "horizontal" ? this._fieldY : this._fieldX,
|
|
83865
83910
|
outliersField: this._outliersField,
|
|
83866
83911
|
seriesField: this._seriesField
|
|
83867
|
-
}
|
|
83912
|
+
})
|
|
83868
83913
|
});
|
|
83869
83914
|
outlierDataView.transform({
|
|
83870
83915
|
type: 'addVChartProperty',
|
|
@@ -85551,7 +85596,20 @@ const registerRoseAnimation = () => {
|
|
|
85551
85596
|
});
|
|
85552
85597
|
};
|
|
85553
85598
|
|
|
85599
|
+
const ROSE_LIKE_SERIES_COMPILE_ONLY_KEYS = {
|
|
85600
|
+
radius: true,
|
|
85601
|
+
outerRadius: true,
|
|
85602
|
+
innerRadius: true,
|
|
85603
|
+
startAngle: true,
|
|
85604
|
+
endAngle: true,
|
|
85605
|
+
centerX: true,
|
|
85606
|
+
centerY: true
|
|
85607
|
+
};
|
|
85554
85608
|
class RoseLikeSeries extends PolarSeries {
|
|
85609
|
+
_getSpecUpdatePolicy() {
|
|
85610
|
+
const policy = super._getSpecUpdatePolicy();
|
|
85611
|
+
return Object.assign(Object.assign({}, policy), { compileOnlyKeys: Object.assign(Object.assign({}, policy.compileOnlyKeys), ROSE_LIKE_SERIES_COMPILE_ONLY_KEYS) });
|
|
85612
|
+
}
|
|
85555
85613
|
getStackGroupFields() {
|
|
85556
85614
|
return this._angleField;
|
|
85557
85615
|
}
|
|
@@ -86019,8 +86077,11 @@ class PolarLinearAxis extends PolarAxis {
|
|
|
86019
86077
|
this._scale = new LinearScale();
|
|
86020
86078
|
}
|
|
86021
86079
|
setAttrFromSpec() {
|
|
86080
|
+
var _a, _b;
|
|
86022
86081
|
super.setAttrFromSpec();
|
|
86023
86082
|
this.setExtraAttrFromSpec();
|
|
86083
|
+
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());
|
|
86084
|
+
tickTransform && (tickTransform.options = this._tickTransformOption());
|
|
86024
86085
|
}
|
|
86025
86086
|
initScales() {
|
|
86026
86087
|
super.initScales();
|
|
@@ -86091,6 +86152,10 @@ class PolarBandAxis extends PolarAxis {
|
|
|
86091
86152
|
super.initScales();
|
|
86092
86153
|
this.calcScales(this._defaultBandInnerPadding, this._defaultBandOuterPadding);
|
|
86093
86154
|
}
|
|
86155
|
+
reInit(spec) {
|
|
86156
|
+
super.reInit(spec);
|
|
86157
|
+
this._updateData();
|
|
86158
|
+
}
|
|
86094
86159
|
registerTicksTransform() {
|
|
86095
86160
|
const name = `${this.type}-ticks`;
|
|
86096
86161
|
registerDataSetInstanceTransform(this._option.dataSet, name, polarAngleAxisDiscreteTicks);
|
|
@@ -86776,6 +86841,16 @@ const dot = {
|
|
|
86776
86841
|
}
|
|
86777
86842
|
};
|
|
86778
86843
|
|
|
86844
|
+
const DOT_SERIES_COMPILE_ONLY_KEYS = {
|
|
86845
|
+
highLightSeriesGroup: true,
|
|
86846
|
+
titleField: true,
|
|
86847
|
+
subTitleField: true
|
|
86848
|
+
};
|
|
86849
|
+
const DOT_SERIES_COMPILE_ONLY_SUB_KEYS = {
|
|
86850
|
+
grid: {
|
|
86851
|
+
background: true
|
|
86852
|
+
}
|
|
86853
|
+
};
|
|
86779
86854
|
class DotSeries extends CartesianSeries {
|
|
86780
86855
|
constructor() {
|
|
86781
86856
|
super(...arguments);
|
|
@@ -86826,6 +86901,10 @@ class DotSeries extends CartesianSeries {
|
|
|
86826
86901
|
this._gridBackground = gridBackground;
|
|
86827
86902
|
}
|
|
86828
86903
|
}
|
|
86904
|
+
_getSpecUpdatePolicy() {
|
|
86905
|
+
const policy = super._getSpecUpdatePolicy();
|
|
86906
|
+
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) });
|
|
86907
|
+
}
|
|
86829
86908
|
initData() {
|
|
86830
86909
|
var _a;
|
|
86831
86910
|
super.initData();
|
|
@@ -87425,6 +87504,16 @@ const registerLinkSeries = () => {
|
|
|
87425
87504
|
|
|
87426
87505
|
const progressLikeSeriesMark = Object.assign(Object.assign({}, baseSeriesMark), { ["group"]: { name: "group", type: "group" } });
|
|
87427
87506
|
|
|
87507
|
+
const PROGRESS_LIKE_SERIES_COMPILE_ONLY_KEYS = {
|
|
87508
|
+
radius: true,
|
|
87509
|
+
outerRadius: true,
|
|
87510
|
+
innerRadius: true,
|
|
87511
|
+
startAngle: true,
|
|
87512
|
+
endAngle: true,
|
|
87513
|
+
centerX: true,
|
|
87514
|
+
centerY: true,
|
|
87515
|
+
clamp: true
|
|
87516
|
+
};
|
|
87428
87517
|
class ProgressLikeSeries extends PolarSeries {
|
|
87429
87518
|
constructor() {
|
|
87430
87519
|
super(...arguments);
|
|
@@ -87490,6 +87579,10 @@ class ProgressLikeSeries extends PolarSeries {
|
|
|
87490
87579
|
return this._getAngleValueEndWithoutMask(datum);
|
|
87491
87580
|
};
|
|
87492
87581
|
}
|
|
87582
|
+
_getSpecUpdatePolicy() {
|
|
87583
|
+
const policy = super._getSpecUpdatePolicy();
|
|
87584
|
+
return Object.assign(Object.assign({}, policy), { compileOnlyKeys: Object.assign(Object.assign({}, policy.compileOnlyKeys), PROGRESS_LIKE_SERIES_COMPILE_ONLY_KEYS) });
|
|
87585
|
+
}
|
|
87493
87586
|
setAttrFromSpec() {
|
|
87494
87587
|
var _a, _b, _c;
|
|
87495
87588
|
super.setAttrFromSpec();
|
|
@@ -87705,7 +87798,8 @@ const circularProgress = {
|
|
|
87705
87798
|
};
|
|
87706
87799
|
|
|
87707
87800
|
const CIRCULAR_PROGRESS_SERIES_COMPILE_ONLY_KEYS = {
|
|
87708
|
-
cornerRadius: true
|
|
87801
|
+
cornerRadius: true,
|
|
87802
|
+
roundCap: true
|
|
87709
87803
|
};
|
|
87710
87804
|
class CircularProgressSeries extends ProgressLikeSeries {
|
|
87711
87805
|
constructor() {
|
|
@@ -87932,7 +88026,9 @@ const linearProgress = {
|
|
|
87932
88026
|
};
|
|
87933
88027
|
|
|
87934
88028
|
const LINEAR_PROGRESS_SERIES_COMPILE_ONLY_KEYS = {
|
|
87935
|
-
bandWidth: true
|
|
88029
|
+
bandWidth: true,
|
|
88030
|
+
cornerRadius: true,
|
|
88031
|
+
clamp: true
|
|
87936
88032
|
};
|
|
87937
88033
|
const LINEAR_PROGRESS_SERIES_COMPILE_ONLY_SUB_KEYS = {
|
|
87938
88034
|
progress: {
|
|
@@ -94003,16 +94099,21 @@ const registerWordCloudShapeSeries = () => {
|
|
|
94003
94099
|
registerWordCloudSeries();
|
|
94004
94100
|
};
|
|
94005
94101
|
|
|
94102
|
+
const resolveOptionValue$2 = (option) => (isFunction$1(option) ? option() : option);
|
|
94006
94103
|
const funnel = (originData, op) => {
|
|
94007
|
-
var _a, _b;
|
|
94104
|
+
var _a, _b, _c, _d;
|
|
94008
94105
|
const data = originData.map(datum => (Object.assign({}, datum)));
|
|
94009
94106
|
if (!data || data.length === 0) {
|
|
94010
94107
|
return data;
|
|
94011
94108
|
}
|
|
94012
|
-
const {
|
|
94109
|
+
const { asTransformRatio, asReachRatio, asHeightRatio, asValueRatio, asNextValueRatio, asLastValueRatio, asLastValue, asCurrentValue, asNextValue, } = op;
|
|
94110
|
+
const valueField = resolveOptionValue$2(op.valueField);
|
|
94111
|
+
const heightVisual = (_a = resolveOptionValue$2(op.heightVisual)) !== null && _a !== void 0 ? _a : false;
|
|
94112
|
+
const isCone = (_b = resolveOptionValue$2(op.isCone)) !== null && _b !== void 0 ? _b : true;
|
|
94113
|
+
const range = resolveOptionValue$2(op.range);
|
|
94013
94114
|
const max = data.reduce((m, d) => Math.max(m, Number.parseFloat(d[valueField]) || -Infinity), -Infinity);
|
|
94014
94115
|
const min = data.reduce((m, d) => Math.min(m, Number.parseFloat(d[valueField]) || Infinity), Infinity);
|
|
94015
|
-
const rangeArr = [(
|
|
94116
|
+
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];
|
|
94016
94117
|
data.forEach((d, i) => {
|
|
94017
94118
|
var _a, _b;
|
|
94018
94119
|
const currentValue = Number.parseFloat(d[valueField]);
|
|
@@ -94040,7 +94141,7 @@ const funnelTransform = (originData, op) => {
|
|
|
94040
94141
|
return data;
|
|
94041
94142
|
}
|
|
94042
94143
|
data.shift();
|
|
94043
|
-
data.forEach(
|
|
94144
|
+
data.forEach(d => {
|
|
94044
94145
|
d[op.asIsTransformLevel] = true;
|
|
94045
94146
|
});
|
|
94046
94147
|
return data;
|
|
@@ -94218,13 +94319,13 @@ class FunnelSeries extends BaseSeries {
|
|
|
94218
94319
|
return fields;
|
|
94219
94320
|
}
|
|
94220
94321
|
_statisticViewData() {
|
|
94221
|
-
var _a
|
|
94322
|
+
var _a;
|
|
94222
94323
|
super._statisticViewData();
|
|
94223
94324
|
this._data.getDataView().transform({
|
|
94224
94325
|
type: 'funnel',
|
|
94225
94326
|
options: {
|
|
94226
|
-
valueField: this.getValueField(),
|
|
94227
|
-
isCone: this._spec.isCone,
|
|
94327
|
+
valueField: () => this.getValueField(),
|
|
94328
|
+
isCone: () => this._spec.isCone,
|
|
94228
94329
|
asCurrentValue: FUNNEL_CURRENT_VALUE,
|
|
94229
94330
|
asTransformRatio: FUNNEL_TRANSFORM_RATIO,
|
|
94230
94331
|
asReachRatio: FUNNEL_REACH_RATIO,
|
|
@@ -94234,13 +94335,10 @@ class FunnelSeries extends BaseSeries {
|
|
|
94234
94335
|
asLastValueRatio: FUNNEL_LAST_VALUE_RATIO,
|
|
94235
94336
|
asLastValue: FUNNEL_LAST_VALUE,
|
|
94236
94337
|
asNextValue: FUNNEL_NEXT_VALUE,
|
|
94237
|
-
range:
|
|
94238
|
-
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,
|
|
94239
|
-
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
|
|
94240
|
-
}
|
|
94338
|
+
range: () => this._spec.range
|
|
94241
94339
|
}
|
|
94242
94340
|
});
|
|
94243
|
-
(
|
|
94341
|
+
(_a = this._viewDataTransform.getDataView()) === null || _a === void 0 ? void 0 : _a.transform({
|
|
94244
94342
|
type: 'funnelTransform',
|
|
94245
94343
|
options: { asIsTransformLevel: FUNNEL_TRANSFORM_LEVEL }
|
|
94246
94344
|
});
|
|
@@ -95659,7 +95757,7 @@ const registerCirclePackingSeries = () => {
|
|
|
95659
95757
|
};
|
|
95660
95758
|
|
|
95661
95759
|
const collectHierarchyField = (set, data, field) => {
|
|
95662
|
-
data.forEach(
|
|
95760
|
+
data.forEach(obj => {
|
|
95663
95761
|
if (!isNil$1(obj[field])) {
|
|
95664
95762
|
set.add(obj[field]);
|
|
95665
95763
|
}
|
|
@@ -95678,7 +95776,7 @@ const sankeyFormat = (data) => {
|
|
|
95678
95776
|
links: [],
|
|
95679
95777
|
nodes: []
|
|
95680
95778
|
};
|
|
95681
|
-
data.forEach(
|
|
95779
|
+
data.forEach(datum => {
|
|
95682
95780
|
if (datum.id === 'links' || datum.id === 'nodes') {
|
|
95683
95781
|
updateData[datum.id] = datum.values;
|
|
95684
95782
|
}
|
|
@@ -95691,10 +95789,11 @@ const sankeyFormat = (data) => {
|
|
|
95691
95789
|
return data;
|
|
95692
95790
|
};
|
|
95693
95791
|
const sankeyLayout = (data, op) => {
|
|
95694
|
-
|
|
95792
|
+
const options = isFunction$1(op) ? op() : op;
|
|
95793
|
+
if (!data || !(options === null || options === void 0 ? void 0 : options.view) || !data.length) {
|
|
95695
95794
|
return [];
|
|
95696
95795
|
}
|
|
95697
|
-
const view =
|
|
95796
|
+
const view = options.view();
|
|
95698
95797
|
if (view.x1 - view.x0 === 0 ||
|
|
95699
95798
|
view.y1 - view.y0 === 0 ||
|
|
95700
95799
|
view.x1 - view.x0 === -Infinity ||
|
|
@@ -95704,35 +95803,41 @@ const sankeyLayout = (data, op) => {
|
|
|
95704
95803
|
return [];
|
|
95705
95804
|
}
|
|
95706
95805
|
const originalData = data[0];
|
|
95707
|
-
|
|
95708
|
-
|
|
95709
|
-
const updatedData = [];
|
|
95710
|
-
originalData.links.forEach((datum) => {
|
|
95711
|
-
const updatedDatum = {};
|
|
95712
|
-
for (const key in datum) {
|
|
95713
|
-
if (key === op.sourceField) {
|
|
95714
|
-
updatedDatum.source = datum[op.sourceField];
|
|
95715
|
-
}
|
|
95716
|
-
else if (key === op.targetField) {
|
|
95717
|
-
updatedDatum.target = datum[op.targetField];
|
|
95718
|
-
}
|
|
95719
|
-
else if (key === op.valueField) {
|
|
95720
|
-
updatedDatum.value = datum[op.valueField];
|
|
95721
|
-
}
|
|
95722
|
-
else {
|
|
95723
|
-
updatedDatum[key] = datum[key];
|
|
95724
|
-
}
|
|
95725
|
-
}
|
|
95726
|
-
updatedData.push(updatedDatum);
|
|
95727
|
-
});
|
|
95728
|
-
originalData.links = updatedData;
|
|
95729
|
-
}
|
|
95730
|
-
}
|
|
95731
|
-
const layout = new SankeyLayout(op);
|
|
95806
|
+
const layoutData = normalizeSankeyData(originalData, options);
|
|
95807
|
+
const layout = new SankeyLayout(options);
|
|
95732
95808
|
const result = [];
|
|
95733
|
-
result.push(layout.layout(
|
|
95809
|
+
result.push(layout.layout(layoutData, view));
|
|
95734
95810
|
return result;
|
|
95735
95811
|
};
|
|
95812
|
+
const normalizeSankeyData = (data, options) => {
|
|
95813
|
+
if (options.sourceField === 'source' &&
|
|
95814
|
+
options.targetField === 'target' &&
|
|
95815
|
+
options.valueField === 'value') {
|
|
95816
|
+
return data;
|
|
95817
|
+
}
|
|
95818
|
+
const links = data.links;
|
|
95819
|
+
if (!links) {
|
|
95820
|
+
return data;
|
|
95821
|
+
}
|
|
95822
|
+
return Object.assign(Object.assign({}, data), { links: links.map(link => {
|
|
95823
|
+
const updatedLink = {};
|
|
95824
|
+
Object.keys(link).forEach(key => {
|
|
95825
|
+
if (key === options.sourceField) {
|
|
95826
|
+
updatedLink.source = link[options.sourceField];
|
|
95827
|
+
}
|
|
95828
|
+
else if (key === options.targetField) {
|
|
95829
|
+
updatedLink.target = link[options.targetField];
|
|
95830
|
+
}
|
|
95831
|
+
else if (key === options.valueField) {
|
|
95832
|
+
updatedLink.value = link[options.valueField];
|
|
95833
|
+
}
|
|
95834
|
+
else {
|
|
95835
|
+
updatedLink[key] = link[key];
|
|
95836
|
+
}
|
|
95837
|
+
});
|
|
95838
|
+
return updatedLink;
|
|
95839
|
+
}) });
|
|
95840
|
+
};
|
|
95736
95841
|
|
|
95737
95842
|
const sankeyNodes = (data) => {
|
|
95738
95843
|
var _a, _b;
|
|
@@ -96582,7 +96687,6 @@ class SankeySeries extends CartesianSeries {
|
|
|
96582
96687
|
this.setSeriesField((_a = this._spec.seriesField) !== null && _a !== void 0 ? _a : this._spec.categoryField);
|
|
96583
96688
|
}
|
|
96584
96689
|
initData() {
|
|
96585
|
-
var _a, _b, _c, _d;
|
|
96586
96690
|
super.initData();
|
|
96587
96691
|
const viewData = this.getViewData();
|
|
96588
96692
|
const rawData = this.getRawData();
|
|
@@ -96594,40 +96698,43 @@ class SankeySeries extends CartesianSeries {
|
|
|
96594
96698
|
}, false);
|
|
96595
96699
|
viewData.transform({
|
|
96596
96700
|
type: 'sankeyLayout',
|
|
96597
|
-
options: {
|
|
96598
|
-
|
|
96599
|
-
|
|
96600
|
-
|
|
96601
|
-
|
|
96602
|
-
|
|
96603
|
-
|
|
96604
|
-
|
|
96605
|
-
|
|
96606
|
-
|
|
96607
|
-
|
|
96608
|
-
|
|
96609
|
-
|
|
96610
|
-
|
|
96611
|
-
|
|
96612
|
-
|
|
96613
|
-
|
|
96614
|
-
|
|
96615
|
-
|
|
96616
|
-
|
|
96617
|
-
|
|
96618
|
-
|
|
96619
|
-
|
|
96620
|
-
|
|
96621
|
-
|
|
96622
|
-
|
|
96623
|
-
|
|
96624
|
-
|
|
96625
|
-
|
|
96626
|
-
|
|
96627
|
-
|
|
96628
|
-
|
|
96629
|
-
|
|
96630
|
-
|
|
96701
|
+
options: () => {
|
|
96702
|
+
var _a, _b, _c, _d;
|
|
96703
|
+
return ({
|
|
96704
|
+
view: () => {
|
|
96705
|
+
return {
|
|
96706
|
+
x0: this._viewBox.x1,
|
|
96707
|
+
x1: this._viewBox.x2,
|
|
96708
|
+
y0: this._viewBox.y1,
|
|
96709
|
+
y1: this._viewBox.y2
|
|
96710
|
+
};
|
|
96711
|
+
},
|
|
96712
|
+
sourceField: this._spec.sourceField,
|
|
96713
|
+
targetField: this._spec.targetField,
|
|
96714
|
+
valueField: this._spec.valueField,
|
|
96715
|
+
direction: this.direction,
|
|
96716
|
+
crossNodeAlign: this._spec.crossNodeAlign,
|
|
96717
|
+
nodeAlign: (_a = this._spec.nodeAlign) !== null && _a !== void 0 ? _a : 'justify',
|
|
96718
|
+
nodeGap: (_b = this._spec.nodeGap) !== null && _b !== void 0 ? _b : 8,
|
|
96719
|
+
nodeWidth: (_c = this._spec.nodeWidth) !== null && _c !== void 0 ? _c : 10,
|
|
96720
|
+
linkWidth: this._spec.linkWidth,
|
|
96721
|
+
minStepWidth: this._spec.minStepWidth,
|
|
96722
|
+
minNodeHeight: (_d = this._spec.minNodeHeight) !== null && _d !== void 0 ? _d : 4,
|
|
96723
|
+
maxNodeHeight: this._spec.maxNodeHeight,
|
|
96724
|
+
minLinkHeight: this._spec.minLinkHeight,
|
|
96725
|
+
maxLinkHeight: this._spec.maxLinkHeight,
|
|
96726
|
+
iterations: this._spec.iterations,
|
|
96727
|
+
nodeKey: this._spec.nodeKey,
|
|
96728
|
+
linkSortBy: this._spec.linkSortBy,
|
|
96729
|
+
nodeSortBy: this._spec.nodeSortBy,
|
|
96730
|
+
setNodeLayer: this._spec.setNodeLayer,
|
|
96731
|
+
dropIsolatedNode: this._spec.dropIsolatedNode,
|
|
96732
|
+
nodeHeight: this._spec.nodeHeight,
|
|
96733
|
+
linkHeight: this._spec.linkHeight,
|
|
96734
|
+
equalNodeHeight: this._spec.equalNodeHeight,
|
|
96735
|
+
linkOverlap: this._spec.linkOverlap,
|
|
96736
|
+
inverse: this._spec.inverse
|
|
96737
|
+
});
|
|
96631
96738
|
},
|
|
96632
96739
|
level: TransformLevel.sankeyLayout
|
|
96633
96740
|
});
|
|
@@ -97126,16 +97233,17 @@ const registerMarkMapTransform = () => {
|
|
|
97126
97233
|
};
|
|
97127
97234
|
|
|
97128
97235
|
const treemapLayout = (data, op) => {
|
|
97129
|
-
const
|
|
97236
|
+
const options = isFunction$1(op) ? op() : op;
|
|
97237
|
+
const viewBox = options.getViewBox();
|
|
97130
97238
|
if (viewBox) {
|
|
97131
|
-
const layout = new TreemapLayout(
|
|
97132
|
-
const res = layout.layout(data,
|
|
97239
|
+
const layout = new TreemapLayout(options);
|
|
97240
|
+
const res = layout.layout(data, viewBox);
|
|
97133
97241
|
const nodes = [];
|
|
97134
|
-
flattenNodes(res, nodes, { maxDepth:
|
|
97135
|
-
nodes.forEach(
|
|
97242
|
+
flattenNodes(res, nodes, { maxDepth: options === null || options === void 0 ? void 0 : options.maxDepth });
|
|
97243
|
+
nodes.forEach(datum => {
|
|
97136
97244
|
if (datum) {
|
|
97137
97245
|
[DEFAULT_HIERARCHY_ROOT, 'name'].forEach(key => {
|
|
97138
|
-
datum[key] = datum.datum[datum.depth][
|
|
97246
|
+
datum[key] = datum.datum[datum.depth][options.nameField];
|
|
97139
97247
|
});
|
|
97140
97248
|
}
|
|
97141
97249
|
});
|
|
@@ -97226,34 +97334,37 @@ class TreemapSeries extends CartesianSeries {
|
|
|
97226
97334
|
}
|
|
97227
97335
|
}
|
|
97228
97336
|
initData() {
|
|
97229
|
-
var _a
|
|
97337
|
+
var _a;
|
|
97230
97338
|
super.initData();
|
|
97231
97339
|
registerDataSetInstanceTransform(this._dataSet, 'treemap', treemapLayout);
|
|
97232
97340
|
(_a = this._data.getDataView()) === null || _a === void 0 ? void 0 : _a.transform({
|
|
97233
97341
|
type: 'treemap',
|
|
97234
|
-
options: {
|
|
97235
|
-
|
|
97236
|
-
|
|
97237
|
-
|
|
97238
|
-
|
|
97239
|
-
|
|
97240
|
-
|
|
97241
|
-
|
|
97242
|
-
|
|
97243
|
-
|
|
97244
|
-
|
|
97245
|
-
|
|
97246
|
-
|
|
97247
|
-
|
|
97248
|
-
|
|
97249
|
-
|
|
97250
|
-
|
|
97251
|
-
|
|
97252
|
-
|
|
97253
|
-
|
|
97254
|
-
|
|
97255
|
-
|
|
97256
|
-
|
|
97342
|
+
options: () => {
|
|
97343
|
+
var _a, _b, _c, _d;
|
|
97344
|
+
return ({
|
|
97345
|
+
nameField: this._categoryField,
|
|
97346
|
+
valueField: this._valueField,
|
|
97347
|
+
getViewBox: () => {
|
|
97348
|
+
return this._viewBox.empty()
|
|
97349
|
+
? null
|
|
97350
|
+
: {
|
|
97351
|
+
x0: this._viewBox.x1,
|
|
97352
|
+
x1: this._viewBox.x2,
|
|
97353
|
+
y0: this._viewBox.y1,
|
|
97354
|
+
y1: this._viewBox.y2
|
|
97355
|
+
};
|
|
97356
|
+
},
|
|
97357
|
+
maxDepth: this._maxDepth,
|
|
97358
|
+
gapWidth: this._spec.gapWidth,
|
|
97359
|
+
padding: this._spec.nodePadding,
|
|
97360
|
+
splitType: this._spec.splitType,
|
|
97361
|
+
aspectRatio: this._spec.aspectRatio,
|
|
97362
|
+
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,
|
|
97363
|
+
labelPosition: (_c = this._spec.nonLeafLabel) === null || _c === void 0 ? void 0 : _c.position,
|
|
97364
|
+
minVisibleArea: (_d = this._spec.minVisibleArea) !== null && _d !== void 0 ? _d : 10,
|
|
97365
|
+
minChildrenVisibleArea: this._spec.minChildrenVisibleArea,
|
|
97366
|
+
minChildrenVisibleSize: this._spec.minChildrenVisibleSize
|
|
97367
|
+
});
|
|
97257
97368
|
}
|
|
97258
97369
|
});
|
|
97259
97370
|
if (this.getViewData()) {
|
|
@@ -98217,11 +98328,13 @@ const CORRELATION_X = `${PREFIX}_CORRELATION_X`;
|
|
|
98217
98328
|
const CORRELATION_Y = `${PREFIX}_CORRELATION_Y`;
|
|
98218
98329
|
const CORRELATION_SIZE = `${PREFIX}_CORRELATION_SIZE`;
|
|
98219
98330
|
|
|
98331
|
+
const resolveOptionValue$1 = (option) => (isFunction$1(option) ? option() : option);
|
|
98220
98332
|
const correlation$1 = (data, options) => {
|
|
98221
|
-
var _a, _b, _c, _d, _e, _f, _g, _h
|
|
98333
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
98222
98334
|
if (!data || !(options === null || options === void 0 ? void 0 : options.view) || !isArray$1(data)) {
|
|
98223
98335
|
return data;
|
|
98224
98336
|
}
|
|
98337
|
+
const dataList = data;
|
|
98225
98338
|
const viewBox = options.view();
|
|
98226
98339
|
if (viewBox.x1 - viewBox.x0 === 0 ||
|
|
98227
98340
|
viewBox.y1 - viewBox.y0 === 0 ||
|
|
@@ -98231,43 +98344,46 @@ const correlation$1 = (data, options) => {
|
|
|
98231
98344
|
viewBox.y1 - viewBox.y0 === Infinity) {
|
|
98232
98345
|
return data;
|
|
98233
98346
|
}
|
|
98234
|
-
const startAngle = degreeToRadian((_a = options.startAngle) !== null && _a !== void 0 ? _a : -90);
|
|
98235
|
-
const endAngle = degreeToRadian((_b = options.endAngle) !== null && _b !== void 0 ? _b : 270);
|
|
98347
|
+
const startAngle = degreeToRadian((_a = resolveOptionValue$1(options.startAngle)) !== null && _a !== void 0 ? _a : -90);
|
|
98348
|
+
const endAngle = degreeToRadian((_b = resolveOptionValue$1(options.endAngle)) !== null && _b !== void 0 ? _b : 270);
|
|
98236
98349
|
const maxRadius = Math.max((viewBox.x1 - viewBox.x0) / 2, (viewBox.y1 - viewBox.y0) / 2);
|
|
98237
|
-
const innerRadius = toPercent((_c = options.innerRadius) !== null && _c !== void 0 ? _c : 0, maxRadius);
|
|
98238
|
-
const outerRadius = toPercent(options.outerRadius, maxRadius);
|
|
98350
|
+
const innerRadius = toPercent((_c = resolveOptionValue$1(options.innerRadius)) !== null && _c !== void 0 ? _c : 0, maxRadius);
|
|
98351
|
+
const outerRadius = toPercent(resolveOptionValue$1(options.outerRadius), maxRadius);
|
|
98352
|
+
const centerOption = resolveOptionValue$1(options.center);
|
|
98239
98353
|
const center = [
|
|
98240
|
-
isNumber$2(
|
|
98241
|
-
?
|
|
98242
|
-
: viewBox.x0 + toPercent((
|
|
98243
|
-
isNumber$2(
|
|
98244
|
-
?
|
|
98245
|
-
: viewBox.y0 + toPercent((
|
|
98354
|
+
isNumber$2(centerOption === null || centerOption === void 0 ? void 0 : centerOption[0])
|
|
98355
|
+
? centerOption[0]
|
|
98356
|
+
: viewBox.x0 + toPercent((_d = centerOption === null || centerOption === void 0 ? void 0 : centerOption[0]) !== null && _d !== void 0 ? _d : '50%', viewBox.x1 - viewBox.x0),
|
|
98357
|
+
isNumber$2(centerOption === null || centerOption === void 0 ? void 0 : centerOption[1])
|
|
98358
|
+
? centerOption[1]
|
|
98359
|
+
: viewBox.y0 + toPercent((_e = centerOption === null || centerOption === void 0 ? void 0 : centerOption[1]) !== null && _e !== void 0 ? _e : '50%', viewBox.y1 - viewBox.y0)
|
|
98246
98360
|
];
|
|
98247
|
-
const fieldAccessor = field$2(options.field);
|
|
98248
|
-
const values =
|
|
98361
|
+
const fieldAccessor = field$2(resolveOptionValue$1(options.field));
|
|
98362
|
+
const values = dataList.map(fieldAccessor);
|
|
98249
98363
|
const [min, max] = extent$2(values);
|
|
98250
98364
|
const radiusScale = min === max
|
|
98251
98365
|
? (val) => (innerRadius + outerRadius) / 2
|
|
98252
98366
|
: (val) => innerRadius + ((outerRadius - innerRadius) * (val - min)) / (max - min);
|
|
98253
|
-
const
|
|
98254
|
-
const
|
|
98367
|
+
const radiusField = resolveOptionValue$1(options.radiusField);
|
|
98368
|
+
const radiusRange = resolveOptionValue$1(options.radiusRange);
|
|
98369
|
+
const sizeAccessor = !isNil$1(radiusField) ? field$2(radiusField) : fieldAccessor;
|
|
98370
|
+
const defaultSize = (_f = radiusRange === null || radiusRange === void 0 ? void 0 : radiusRange[1]) !== null && _f !== void 0 ? _f : 5;
|
|
98255
98371
|
let sizeScale = (datum) => defaultSize;
|
|
98256
98372
|
if (sizeAccessor) {
|
|
98257
|
-
const [minSize, maxSize] = sizeAccessor !== fieldAccessor ? extent$2(
|
|
98258
|
-
const minR = (
|
|
98259
|
-
const maxR = (
|
|
98373
|
+
const [minSize, maxSize] = sizeAccessor !== fieldAccessor ? extent$2(dataList.map(sizeAccessor)) : [min, max];
|
|
98374
|
+
const minR = (_g = radiusRange === null || radiusRange === void 0 ? void 0 : radiusRange[0]) !== null && _g !== void 0 ? _g : 5;
|
|
98375
|
+
const maxR = (_h = radiusRange === null || radiusRange === void 0 ? void 0 : radiusRange[1]) !== null && _h !== void 0 ? _h : 5;
|
|
98260
98376
|
if (minSize !== maxSize) {
|
|
98261
98377
|
sizeScale = (datum) => minR + ((maxR - minR) * (sizeAccessor(datum) - minSize)) / (maxSize - minSize);
|
|
98262
98378
|
}
|
|
98263
98379
|
}
|
|
98264
98380
|
const minAngle = Math.min(startAngle, endAngle);
|
|
98265
98381
|
const maxAngle = Math.max(startAngle, endAngle);
|
|
98266
|
-
const angles = getPartialAngles(minAngle, maxAngle,
|
|
98382
|
+
const angles = getPartialAngles(minAngle, maxAngle, dataList.length);
|
|
98267
98383
|
const res = [];
|
|
98268
98384
|
const searchStep = 60;
|
|
98269
98385
|
const searchAngle = (maxAngle - minAngle) / searchStep;
|
|
98270
|
-
|
|
98386
|
+
dataList.forEach((datum, index) => {
|
|
98271
98387
|
const radius = radiusScale(values[index]);
|
|
98272
98388
|
const size = sizeScale(datum);
|
|
98273
98389
|
let x;
|
|
@@ -98340,15 +98456,20 @@ const hasOverlap = (item, arr) => {
|
|
|
98340
98456
|
return false;
|
|
98341
98457
|
}
|
|
98342
98458
|
return arr.some(entry => {
|
|
98343
|
-
|
|
98459
|
+
const x = entry.x;
|
|
98460
|
+
const y = entry.y;
|
|
98461
|
+
const size = entry.size;
|
|
98462
|
+
return Math.pow(item.x - x, 2) + Math.pow(item.y - y, 2) < Math.pow(item.size + size, 2);
|
|
98344
98463
|
});
|
|
98345
98464
|
};
|
|
98346
98465
|
|
|
98466
|
+
const resolveOptionValue = (option) => (isFunction$1(option) ? option() : option);
|
|
98347
98467
|
const correlationCenter = (data, options) => {
|
|
98348
98468
|
if (!data || !isArray$1(data)) {
|
|
98349
98469
|
return [];
|
|
98350
98470
|
}
|
|
98351
|
-
const
|
|
98471
|
+
const keyword = resolveOptionValue(options.keyword);
|
|
98472
|
+
const categoryField = resolveOptionValue(options.categoryField);
|
|
98352
98473
|
const nodeInfo = data[0].latestData[0];
|
|
98353
98474
|
const centerInfo = {
|
|
98354
98475
|
[categoryField]: keyword,
|
|
@@ -98509,7 +98630,6 @@ class CorrelationSeries extends PolarSeries {
|
|
|
98509
98630
|
this.setSizeRange(this._spec.sizeRange);
|
|
98510
98631
|
}
|
|
98511
98632
|
initData() {
|
|
98512
|
-
var _a, _b, _c;
|
|
98513
98633
|
super.initData();
|
|
98514
98634
|
if (!this._data) {
|
|
98515
98635
|
return;
|
|
@@ -98525,8 +98645,8 @@ class CorrelationSeries extends PolarSeries {
|
|
|
98525
98645
|
centerDataView.transform({
|
|
98526
98646
|
type: 'correlationCenter',
|
|
98527
98647
|
options: {
|
|
98528
|
-
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 : '',
|
|
98529
|
-
categoryField: this._spec.categoryField
|
|
98648
|
+
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 : ''; },
|
|
98649
|
+
categoryField: () => this._spec.categoryField
|
|
98530
98650
|
}
|
|
98531
98651
|
});
|
|
98532
98652
|
this._centerSeriesData = new CompilableData(this._option, centerDataView);
|
|
@@ -98549,14 +98669,14 @@ class CorrelationSeries extends PolarSeries {
|
|
|
98549
98669
|
y1: this._viewBox.y2
|
|
98550
98670
|
};
|
|
98551
98671
|
},
|
|
98552
|
-
field: this._spec.valueField,
|
|
98553
|
-
radiusRange: this._spec.sizeRange,
|
|
98554
|
-
radiusField: this._spec.sizeField,
|
|
98555
|
-
center: [this._spec.centerX, this._spec.centerY],
|
|
98556
|
-
innerRadius: this._spec.innerRadius,
|
|
98557
|
-
outerRadius: this._spec.outerRadius,
|
|
98558
|
-
startAngle: this._spec.startAngle,
|
|
98559
|
-
endAngle: this._spec.endAngle
|
|
98672
|
+
field: () => this._spec.valueField,
|
|
98673
|
+
radiusRange: () => this._spec.sizeRange,
|
|
98674
|
+
radiusField: () => this._spec.sizeField,
|
|
98675
|
+
center: () => [this._spec.centerX, this._spec.centerY],
|
|
98676
|
+
innerRadius: () => this._spec.innerRadius,
|
|
98677
|
+
outerRadius: () => this._spec.outerRadius,
|
|
98678
|
+
startAngle: () => this._spec.startAngle,
|
|
98679
|
+
endAngle: () => this._spec.endAngle
|
|
98560
98680
|
}
|
|
98561
98681
|
});
|
|
98562
98682
|
}
|
|
@@ -99334,9 +99454,10 @@ class VennSeriesSpecTransformer extends BaseSeriesSpecTransformer {
|
|
|
99334
99454
|
}
|
|
99335
99455
|
|
|
99336
99456
|
const vennLayout = (data, op) => {
|
|
99337
|
-
const
|
|
99457
|
+
const options = isFunction$1(op) ? op() : op;
|
|
99458
|
+
const viewBox = options.getViewBox();
|
|
99338
99459
|
if (viewBox && (data === null || data === void 0 ? void 0 : data.length)) {
|
|
99339
|
-
return vennTransform(Object.assign({ setField:
|
|
99460
|
+
return vennTransform(Object.assign({ setField: options.setField, valueField: options.valueField }, viewBox), data);
|
|
99340
99461
|
}
|
|
99341
99462
|
return [];
|
|
99342
99463
|
};
|
|
@@ -99419,7 +99540,7 @@ class VennSeries extends BaseSeries {
|
|
|
99419
99540
|
registerDataSetInstanceTransform(this._dataSet, 'venn', vennLayout);
|
|
99420
99541
|
(_a = this._data.getDataView()) === null || _a === void 0 ? void 0 : _a.transform({
|
|
99421
99542
|
type: 'venn',
|
|
99422
|
-
options: {
|
|
99543
|
+
options: () => ({
|
|
99423
99544
|
getViewBox: () => {
|
|
99424
99545
|
return this._viewBox.empty()
|
|
99425
99546
|
? null
|
|
@@ -99432,7 +99553,7 @@ class VennSeries extends BaseSeries {
|
|
|
99432
99553
|
},
|
|
99433
99554
|
setField: this._categoryField,
|
|
99434
99555
|
valueField: this._valueField
|
|
99435
|
-
}
|
|
99556
|
+
})
|
|
99436
99557
|
});
|
|
99437
99558
|
}
|
|
99438
99559
|
compile() {
|
|
@@ -99852,7 +99973,7 @@ class PolarChartSpecTransformer extends BaseChartSpecTransformer {
|
|
|
99852
99973
|
return indicatorSpec;
|
|
99853
99974
|
}
|
|
99854
99975
|
_getDefaultSeriesSpec(spec, pickKeys) {
|
|
99855
|
-
const series = super._getDefaultSeriesSpec(spec, ['radius', 'outerRadius', 'innerRadius', 'startAngle', 'endAngle', 'sortDataByAxis'], pickKeys);
|
|
99976
|
+
const series = super._getDefaultSeriesSpec(spec, ['radius', 'outerRadius', 'innerRadius', 'startAngle', 'endAngle', 'centerX', 'centerY', 'sortDataByAxis'], pickKeys);
|
|
99856
99977
|
return series;
|
|
99857
99978
|
}
|
|
99858
99979
|
transformSpec(spec) {
|
|
@@ -99876,7 +99997,7 @@ class ProgressLikeChartSpecTransformer extends PolarChartSpecTransformer {
|
|
|
99876
99997
|
return false;
|
|
99877
99998
|
}
|
|
99878
99999
|
_getDefaultSeriesSpec(spec) {
|
|
99879
|
-
const series = super._getDefaultSeriesSpec(spec, ['startAngle', 'endAngle', 'centerX', 'centerY']);
|
|
100000
|
+
const series = super._getDefaultSeriesSpec(spec, ['startAngle', 'endAngle', 'centerX', 'centerY', 'clamp']);
|
|
99880
100001
|
series.categoryField = spec.categoryField || spec.radiusField;
|
|
99881
100002
|
series.valueField = spec.valueField || spec.angleField;
|
|
99882
100003
|
return series;
|
|
@@ -100014,6 +100135,7 @@ class RoseChartSpecTransformer extends RoseLikeChartSpecTransformer {
|
|
|
100014
100135
|
_getDefaultSeriesSpec(spec) {
|
|
100015
100136
|
var _a, _b, _c;
|
|
100016
100137
|
const series = super._getDefaultSeriesSpec(spec);
|
|
100138
|
+
this._addSeriesRelatedSpecKeys(['radius', 'outerRadius', 'innerRadius']);
|
|
100017
100139
|
series.radius = (_a = spec.radius) !== null && _a !== void 0 ? _a : POLAR_DEFAULT_RADIUS;
|
|
100018
100140
|
series.outerRadius = (_b = spec.outerRadius) !== null && _b !== void 0 ? _b : POLAR_DEFAULT_RADIUS;
|
|
100019
100141
|
series.innerRadius = (_c = spec.innerRadius) !== null && _c !== void 0 ? _c : 0;
|
|
@@ -100177,6 +100299,7 @@ class RadarChartSpecTransformer extends RoseLikeChartSpecTransformer {
|
|
|
100177
100299
|
var _a, _b, _c, _d;
|
|
100178
100300
|
const series = super._getDefaultSeriesSpec(spec);
|
|
100179
100301
|
const areaTheme = (_b = (_a = this._option).getTheme) === null || _b === void 0 ? void 0 : _b.call(_a, 'series', 'radar', 'area');
|
|
100302
|
+
this._addSeriesRelatedSpecKeys(['line', 'point', 'area']);
|
|
100180
100303
|
series.line = spec.line;
|
|
100181
100304
|
series.point = spec.point;
|
|
100182
100305
|
series.stack = spec.stack;
|
|
@@ -100682,7 +100805,7 @@ class CircularProgressChartSpecTransformer extends ProgressLikeChartSpecTransfor
|
|
|
100682
100805
|
_getDefaultSeriesSpec(spec) {
|
|
100683
100806
|
var _a, _b;
|
|
100684
100807
|
const series = super._getDefaultSeriesSpec(spec);
|
|
100685
|
-
this._addSeriesRelatedSpecKeys(['cornerRadius']);
|
|
100808
|
+
this._addSeriesRelatedSpecKeys(['cornerRadius', 'progress', 'track', 'roundCap']);
|
|
100686
100809
|
series.progress = spec.progress;
|
|
100687
100810
|
series.track = spec.track;
|
|
100688
100811
|
series.tickMask = spec.tickMask;
|
|
@@ -100731,6 +100854,7 @@ const registerCircularProgressChart = () => {
|
|
|
100731
100854
|
class GaugeChartSpecTransformer extends ProgressLikeChartSpecTransformer {
|
|
100732
100855
|
_getDefaultSeriesSpec(spec) {
|
|
100733
100856
|
const series = super._getDefaultSeriesSpec(spec);
|
|
100857
|
+
this._addSeriesRelatedSpecKeys(['pin', 'pinBackground', 'pointer']);
|
|
100734
100858
|
series.radiusField = spec.radiusField;
|
|
100735
100859
|
series.pin = spec.pin;
|
|
100736
100860
|
series.pinBackground = spec.pinBackground;
|
|
@@ -100972,6 +101096,7 @@ class LinearProgressChartSpecTransformer extends CartesianChartSpecTransformer {
|
|
|
100972
101096
|
var _a, _b;
|
|
100973
101097
|
const series = super._getDefaultSeriesSpec(spec, ['bandWidth', 'progress', 'track', 'clamp']);
|
|
100974
101098
|
series.direction = (_a = spec.direction) !== null && _a !== void 0 ? _a : 'horizontal';
|
|
101099
|
+
this._addSeriesRelatedSpecKeys(['cornerRadius']);
|
|
100975
101100
|
series.cornerRadius = (_b = spec.cornerRadius) !== null && _b !== void 0 ? _b : 0;
|
|
100976
101101
|
return series;
|
|
100977
101102
|
}
|
|
@@ -101487,6 +101612,7 @@ class RangeAreaChartSpecTransformer extends CartesianChartSpecTransformer {
|
|
|
101487
101612
|
_getDefaultSeriesSpec(spec) {
|
|
101488
101613
|
var _a, _b;
|
|
101489
101614
|
const series = super._getDefaultSeriesSpec(spec);
|
|
101615
|
+
this._addSeriesRelatedSpecKeys(['area', 'point', 'line']);
|
|
101490
101616
|
series.area = spec.area;
|
|
101491
101617
|
series.point = spec.point;
|
|
101492
101618
|
series.line = spec.line;
|
|
@@ -106667,7 +106793,7 @@ const registerScrollBar = () => {
|
|
|
106667
106793
|
};
|
|
106668
106794
|
|
|
106669
106795
|
const indicatorMapper = (data, op) => {
|
|
106670
|
-
const { datum, title, content } = op;
|
|
106796
|
+
const { datum, title, content } = isFunction$1(op) ? op() : op;
|
|
106671
106797
|
const mappedData = [];
|
|
106672
106798
|
const datumResult = datum.call(null);
|
|
106673
106799
|
if (title.visible) {
|
|
@@ -106799,11 +106925,11 @@ class Indicator extends BaseComponent {
|
|
|
106799
106925
|
const displayData = new DataView(this._option.dataSet, { name: `${this.type}_${this.id}_data` });
|
|
106800
106926
|
displayData.transform({
|
|
106801
106927
|
type: 'indicatorFilter',
|
|
106802
|
-
options: {
|
|
106928
|
+
options: () => ({
|
|
106803
106929
|
title: this._title,
|
|
106804
106930
|
content: this._content,
|
|
106805
106931
|
datum: () => this._activeDatum
|
|
106806
|
-
}
|
|
106932
|
+
})
|
|
106807
106933
|
});
|
|
106808
106934
|
displayData.target.addListener('change', this.updateDatum.bind(this));
|
|
106809
106935
|
this._displayData = new CompilableData(this._option, displayData);
|