@visactor/vchart 2.1.0-alpha.5 → 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 +344 -227
- package/build/index.js +344 -227
- 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/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/core/expression-function.js +1 -1
- package/cjs/core/factory.js +1 -1
- package/cjs/core/index.js +1 -1
- package/cjs/data/data-view-utils.js +1 -1
- package/cjs/data/initialize.js +1 -1
- package/cjs/data/register.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/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/core/expression-function.js +1 -1
- package/esm/core/factory.js +1 -1
- package/esm/core/index.js +1 -1
- package/esm/data/data-view-utils.js +1 -1
- package/esm/data/initialize.js +1 -1
- package/esm/data/register.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({
|
|
@@ -67802,32 +67808,35 @@ const getSpecInfo = (chartSpec, specKey, compType, filter) => {
|
|
|
67802
67808
|
return specInfos;
|
|
67803
67809
|
};
|
|
67804
67810
|
|
|
67811
|
+
const resolveOptionValue$3 = (option) => (isFunction$1(option) ? option() : option);
|
|
67805
67812
|
const lookup = (data, opt) => {
|
|
67806
|
-
|
|
67813
|
+
var _a;
|
|
67814
|
+
const fromData = (_a = opt.from) === null || _a === void 0 ? void 0 : _a.call(opt);
|
|
67815
|
+
if (!fromData) {
|
|
67807
67816
|
return data;
|
|
67808
67817
|
}
|
|
67809
|
-
const fields = opt.fields;
|
|
67818
|
+
const fields = resolveOptionValue$3(opt.fields);
|
|
67810
67819
|
const key = opt.key;
|
|
67811
67820
|
const values = opt.values;
|
|
67812
67821
|
const defaultValue = opt.default;
|
|
67813
67822
|
const as = opt.as || [fields];
|
|
67814
|
-
const index =
|
|
67823
|
+
const index = fromData.reduce(function (map, obj) {
|
|
67815
67824
|
if (obj[fields]) {
|
|
67816
|
-
map.set(obj[fields]
|
|
67825
|
+
map.set(`${obj[fields]}`, obj);
|
|
67817
67826
|
}
|
|
67818
67827
|
return map;
|
|
67819
67828
|
}, new Map());
|
|
67820
67829
|
let set;
|
|
67821
67830
|
if (isFunction$1(opt.set)) {
|
|
67822
67831
|
set = function (d) {
|
|
67823
|
-
const v = index.get(d[key]);
|
|
67832
|
+
const v = index.get(`${d[key]}`);
|
|
67824
67833
|
opt.set(d, v);
|
|
67825
67834
|
};
|
|
67826
67835
|
}
|
|
67827
67836
|
else if (values) {
|
|
67828
67837
|
const m = values.length;
|
|
67829
67838
|
set = function (d) {
|
|
67830
|
-
const v = index.get(d[key]);
|
|
67839
|
+
const v = index.get(`${d[key]}`);
|
|
67831
67840
|
if (isNil$1(v)) {
|
|
67832
67841
|
for (let i = 0; i < m; ++i) {
|
|
67833
67842
|
d[as[i]] = defaultValue;
|
|
@@ -67842,7 +67851,7 @@ const lookup = (data, opt) => {
|
|
|
67842
67851
|
}
|
|
67843
67852
|
else {
|
|
67844
67853
|
set = function (d) {
|
|
67845
|
-
const v = index.get(d[key]);
|
|
67854
|
+
const v = index.get(`${d[key]}`);
|
|
67846
67855
|
d[as[0]] = isValid$1(v) ? v : defaultValue;
|
|
67847
67856
|
};
|
|
67848
67857
|
}
|
|
@@ -69143,9 +69152,9 @@ class BaseSeries extends BaseModel {
|
|
|
69143
69152
|
});
|
|
69144
69153
|
this._viewStackData.transform({
|
|
69145
69154
|
type: 'stackSplit',
|
|
69146
|
-
options: {
|
|
69155
|
+
options: () => ({
|
|
69147
69156
|
fields: this.getStackGroupFields()
|
|
69148
|
-
}
|
|
69157
|
+
})
|
|
69149
69158
|
}, false);
|
|
69150
69159
|
}
|
|
69151
69160
|
_noAnimationDataKey(datum, index) {
|
|
@@ -76597,6 +76606,9 @@ class BaseChart extends CompilableBase {
|
|
|
76597
76606
|
const onlyMarkerComponentsRemoved = this._isOnlyMarkerComponentsRemoved(this._spec, spec, currentKeys);
|
|
76598
76607
|
const onlyComponentSpecsChanged = this._isOnlyComponentSpecsChanged(this._spec, spec, currentKeys);
|
|
76599
76608
|
const onlySeriesSpecsChanged = this._isOnlySeriesSpecsChanged(this._spec, spec, currentKeys);
|
|
76609
|
+
const onlyComponentOrSeriesSpecsChanged = onlyComponentSpecsChanged || onlySeriesSpecsChanged
|
|
76610
|
+
? true
|
|
76611
|
+
: this._isOnlyComponentOrSeriesSpecsChanged(this._spec, spec, currentKeys);
|
|
76600
76612
|
this._spec = spec;
|
|
76601
76613
|
if (onlyMarkerComponentsRemoved) {
|
|
76602
76614
|
this._removeMarkerComponentsForEmptySpecs(result);
|
|
@@ -76645,7 +76657,7 @@ class BaseChart extends CompilableBase {
|
|
|
76645
76657
|
return result;
|
|
76646
76658
|
}
|
|
76647
76659
|
this.reInit();
|
|
76648
|
-
if (!
|
|
76660
|
+
if (!onlyComponentOrSeriesSpecsChanged || !this._canSkipChartDataStages(result)) {
|
|
76649
76661
|
this.updateDataSpec();
|
|
76650
76662
|
this.reDataFlow();
|
|
76651
76663
|
this._reRunStackDataFlow();
|
|
@@ -76838,6 +76850,24 @@ class BaseChart extends CompilableBase {
|
|
|
76838
76850
|
});
|
|
76839
76851
|
return hasSeriesSpecChange && onlySeriesSpecChange;
|
|
76840
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
|
+
}
|
|
76841
76871
|
_canSkipChartDataStages(result) {
|
|
76842
76872
|
const effects = result.effects;
|
|
76843
76873
|
return !!(effects === null || effects === void 0 ? void 0 : effects.series) && !effects.remake && !effects.data && !effects.scaleDomain && !result.reMake;
|
|
@@ -77739,7 +77769,7 @@ const stackSplit = (data, op) => {
|
|
|
77739
77769
|
const result = {
|
|
77740
77770
|
nodes: {}
|
|
77741
77771
|
};
|
|
77742
|
-
const { fields } = op;
|
|
77772
|
+
const { fields } = isFunction$1(op) ? op() : op;
|
|
77743
77773
|
if (!(fields === null || fields === void 0 ? void 0 : fields.length)) {
|
|
77744
77774
|
return result;
|
|
77745
77775
|
}
|
|
@@ -80597,20 +80627,23 @@ class GeoSeries extends BaseSeries {
|
|
|
80597
80627
|
}
|
|
80598
80628
|
|
|
80599
80629
|
const map$1 = (data, opt) => {
|
|
80600
|
-
|
|
80601
|
-
|
|
80602
|
-
|
|
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;
|
|
80603
80635
|
f[DEFAULT_DATA_INDEX] = index;
|
|
80604
|
-
const name = (_a = f.properties) === null || _a === void 0 ? void 0 : _a[
|
|
80605
|
-
|
|
80606
|
-
|
|
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;
|
|
80607
80640
|
}
|
|
80608
80641
|
else {
|
|
80609
80642
|
f[DEFAULT_MAP_LOOK_UP_KEY] = name;
|
|
80610
80643
|
}
|
|
80611
80644
|
});
|
|
80612
80645
|
}
|
|
80613
|
-
return
|
|
80646
|
+
return features;
|
|
80614
80647
|
};
|
|
80615
80648
|
|
|
80616
80649
|
class MapSeriesTooltipHelper extends BaseSeriesTooltipHelper {
|
|
@@ -81517,17 +81550,17 @@ class MapSeries extends GeoSeries {
|
|
|
81517
81550
|
.transform({ type: 'copyDataView', options: { deep: true }, level: TransformLevel.copyDataView })
|
|
81518
81551
|
.transform({
|
|
81519
81552
|
type: 'map',
|
|
81520
|
-
options: {
|
|
81553
|
+
options: () => ({
|
|
81521
81554
|
nameMap: this._nameMap,
|
|
81522
81555
|
nameProperty: this._nameProperty
|
|
81523
|
-
}
|
|
81556
|
+
})
|
|
81524
81557
|
})
|
|
81525
81558
|
.transform({
|
|
81526
81559
|
type: 'lookup',
|
|
81527
81560
|
options: {
|
|
81528
81561
|
from: () => { var _a; return (_a = this._data) === null || _a === void 0 ? void 0 : _a.getLatestData(); },
|
|
81529
81562
|
key: DEFAULT_MAP_LOOK_UP_KEY,
|
|
81530
|
-
fields: this._nameField,
|
|
81563
|
+
fields: () => this._nameField,
|
|
81531
81564
|
set: (feature, datum) => {
|
|
81532
81565
|
if (datum) {
|
|
81533
81566
|
Object.keys(datum).forEach(key => {
|
|
@@ -81746,7 +81779,8 @@ const waterfall$1 = (lastData, op) => {
|
|
|
81746
81779
|
if (!lastData || lastData.length === 0) {
|
|
81747
81780
|
return lastData;
|
|
81748
81781
|
}
|
|
81749
|
-
const
|
|
81782
|
+
const options = isFunction$1(op) ? op() : op;
|
|
81783
|
+
const { indexField, total: totalSpec, groupData, calculationMode } = options;
|
|
81750
81784
|
const totalData = [];
|
|
81751
81785
|
const { dimensionValues, dimensionData } = groupData().latestData;
|
|
81752
81786
|
let indexValues = Array.from(dimensionValues[indexField]);
|
|
@@ -81771,7 +81805,7 @@ const waterfall$1 = (lastData, op) => {
|
|
|
81771
81805
|
positive: temp.end,
|
|
81772
81806
|
negative: temp.end
|
|
81773
81807
|
};
|
|
81774
|
-
const indexData =
|
|
81808
|
+
const indexData = options.stackInverse === true ? dimensionData[key].reverse() : dimensionData[key];
|
|
81775
81809
|
indexData === null || indexData === void 0 ? void 0 : indexData.forEach((d, i) => {
|
|
81776
81810
|
if (i === indexData.length - 1) {
|
|
81777
81811
|
d[STACK_FIELD_TOTAL_TOP] = true;
|
|
@@ -81795,12 +81829,12 @@ const waterfall$1 = (lastData, op) => {
|
|
|
81795
81829
|
};
|
|
81796
81830
|
const isTotalTag = indexData.some(d => isTotalCheck(d));
|
|
81797
81831
|
if (isTotalTag) {
|
|
81798
|
-
temp = computeTotalWithMultipleData(indexData, key, total, totalData, temp, indexValues, index,
|
|
81832
|
+
temp = computeTotalWithMultipleData(indexData, key, total, totalData, temp, indexValues, index, options, isTotalCheck);
|
|
81799
81833
|
totalData.push(total);
|
|
81800
81834
|
return;
|
|
81801
81835
|
}
|
|
81802
81836
|
}
|
|
81803
|
-
temp = computeNormalData(indexData, key, total, totalData, temp, indexValues, index,
|
|
81837
|
+
temp = computeNormalData(indexData, key, total, totalData, temp, indexValues, index, options);
|
|
81804
81838
|
totalData.push(total);
|
|
81805
81839
|
});
|
|
81806
81840
|
return totalData;
|
|
@@ -81971,7 +82005,7 @@ const waterfallFillTotal = (data, op) => {
|
|
|
81971
82005
|
if (!data) {
|
|
81972
82006
|
return data;
|
|
81973
82007
|
}
|
|
81974
|
-
const { indexField, valueField, total, seriesField, calculationMode } = op;
|
|
82008
|
+
const { indexField, valueField, total, seriesField, calculationMode } = isFunction$1(op) ? op() : op;
|
|
81975
82009
|
const totalData = {
|
|
81976
82010
|
[indexField]: (total === null || total === void 0 ? void 0 : total.text) || 'total',
|
|
81977
82011
|
[valueField]: data.reduce((pre, cur) => precisionAdd(pre, +cur[valueField]), 0)
|
|
@@ -81980,12 +82014,9 @@ const waterfallFillTotal = (data, op) => {
|
|
|
81980
82014
|
totalData[seriesField] = 'total';
|
|
81981
82015
|
}
|
|
81982
82016
|
if (calculationMode === 'decrease') {
|
|
81983
|
-
data
|
|
81984
|
-
}
|
|
81985
|
-
else {
|
|
81986
|
-
data.push(totalData);
|
|
82017
|
+
return [totalData, ...data];
|
|
81987
82018
|
}
|
|
81988
|
-
return data;
|
|
82019
|
+
return [...data, totalData];
|
|
81989
82020
|
};
|
|
81990
82021
|
|
|
81991
82022
|
const Appear_FadeIn$6 = {
|
|
@@ -82648,21 +82679,24 @@ class WaterfallSeries extends BarSeries {
|
|
|
82648
82679
|
return super.getSeriesKeys();
|
|
82649
82680
|
}
|
|
82650
82681
|
initData() {
|
|
82651
|
-
var _a
|
|
82682
|
+
var _a;
|
|
82652
82683
|
super.initData();
|
|
82653
82684
|
registerDataSetInstanceTransform(this._dataSet, 'waterfallFillTotal', waterfallFillTotal);
|
|
82654
82685
|
registerDataSetInstanceTransform(this._dataSet, 'waterfall', waterfall$1);
|
|
82655
82686
|
if (isNil$1(this._spec.total) || this._spec.total.type === 'end') {
|
|
82656
82687
|
(_a = this._rawData) === null || _a === void 0 ? void 0 : _a.transform({
|
|
82657
82688
|
type: 'waterfallFillTotal',
|
|
82658
|
-
options: {
|
|
82659
|
-
|
|
82660
|
-
|
|
82661
|
-
|
|
82662
|
-
|
|
82663
|
-
|
|
82664
|
-
|
|
82665
|
-
|
|
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
|
+
});
|
|
82666
82700
|
}
|
|
82667
82701
|
}, false);
|
|
82668
82702
|
}
|
|
@@ -82673,17 +82707,20 @@ class WaterfallSeries extends BarSeries {
|
|
|
82673
82707
|
this._totalData = new CompilableData(this._option, totalData);
|
|
82674
82708
|
totalData.transform({
|
|
82675
82709
|
type: 'waterfall',
|
|
82676
|
-
options: {
|
|
82677
|
-
|
|
82678
|
-
|
|
82679
|
-
|
|
82680
|
-
|
|
82681
|
-
|
|
82682
|
-
|
|
82683
|
-
|
|
82684
|
-
|
|
82685
|
-
|
|
82686
|
-
|
|
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
|
+
});
|
|
82687
82724
|
}
|
|
82688
82725
|
}, false);
|
|
82689
82726
|
totalData.target.addListener('change', this._reStackTotal);
|
|
@@ -82874,13 +82911,12 @@ var BOX_PLOT_TOOLTIP_KEYS;
|
|
|
82874
82911
|
|
|
82875
82912
|
const foldOutlierData = (data, op) => {
|
|
82876
82913
|
const result = [];
|
|
82877
|
-
const
|
|
82914
|
+
const options = isFunction$1(op) ? op() : op;
|
|
82915
|
+
const { outliersField, dimensionField, seriesField } = options;
|
|
82878
82916
|
const latestData = data[0].latestData || [];
|
|
82879
|
-
latestData.forEach(
|
|
82880
|
-
|
|
82881
|
-
|
|
82882
|
-
outlierValues = [outlierValues];
|
|
82883
|
-
}
|
|
82917
|
+
latestData.forEach(d => {
|
|
82918
|
+
const rawOutlierValues = d[outliersField];
|
|
82919
|
+
const outlierValues = isArray$1(rawOutlierValues) ? rawOutlierValues : [rawOutlierValues];
|
|
82884
82920
|
result.push(...outlierValues.map((v) => {
|
|
82885
82921
|
const resData = {
|
|
82886
82922
|
[BOX_PLOT_OUTLIER_VALUE_FIELD]: v
|
|
@@ -83869,11 +83905,11 @@ class BoxPlotSeries extends CartesianSeries {
|
|
|
83869
83905
|
outlierDataView.name = `${PREFIX}_series_${this.id}_outlierData`;
|
|
83870
83906
|
outlierDataView.transform({
|
|
83871
83907
|
type: 'foldOutlierData',
|
|
83872
|
-
options: {
|
|
83908
|
+
options: () => ({
|
|
83873
83909
|
dimensionField: this._direction === "horizontal" ? this._fieldY : this._fieldX,
|
|
83874
83910
|
outliersField: this._outliersField,
|
|
83875
83911
|
seriesField: this._seriesField
|
|
83876
|
-
}
|
|
83912
|
+
})
|
|
83877
83913
|
});
|
|
83878
83914
|
outlierDataView.transform({
|
|
83879
83915
|
type: 'addVChartProperty',
|
|
@@ -85560,7 +85596,20 @@ const registerRoseAnimation = () => {
|
|
|
85560
85596
|
});
|
|
85561
85597
|
};
|
|
85562
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
|
+
};
|
|
85563
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
|
+
}
|
|
85564
85613
|
getStackGroupFields() {
|
|
85565
85614
|
return this._angleField;
|
|
85566
85615
|
}
|
|
@@ -86028,8 +86077,11 @@ class PolarLinearAxis extends PolarAxis {
|
|
|
86028
86077
|
this._scale = new LinearScale();
|
|
86029
86078
|
}
|
|
86030
86079
|
setAttrFromSpec() {
|
|
86080
|
+
var _a, _b;
|
|
86031
86081
|
super.setAttrFromSpec();
|
|
86032
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());
|
|
86033
86085
|
}
|
|
86034
86086
|
initScales() {
|
|
86035
86087
|
super.initScales();
|
|
@@ -86100,6 +86152,10 @@ class PolarBandAxis extends PolarAxis {
|
|
|
86100
86152
|
super.initScales();
|
|
86101
86153
|
this.calcScales(this._defaultBandInnerPadding, this._defaultBandOuterPadding);
|
|
86102
86154
|
}
|
|
86155
|
+
reInit(spec) {
|
|
86156
|
+
super.reInit(spec);
|
|
86157
|
+
this._updateData();
|
|
86158
|
+
}
|
|
86103
86159
|
registerTicksTransform() {
|
|
86104
86160
|
const name = `${this.type}-ticks`;
|
|
86105
86161
|
registerDataSetInstanceTransform(this._option.dataSet, name, polarAngleAxisDiscreteTicks);
|
|
@@ -86785,6 +86841,16 @@ const dot = {
|
|
|
86785
86841
|
}
|
|
86786
86842
|
};
|
|
86787
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
|
+
};
|
|
86788
86854
|
class DotSeries extends CartesianSeries {
|
|
86789
86855
|
constructor() {
|
|
86790
86856
|
super(...arguments);
|
|
@@ -86835,6 +86901,10 @@ class DotSeries extends CartesianSeries {
|
|
|
86835
86901
|
this._gridBackground = gridBackground;
|
|
86836
86902
|
}
|
|
86837
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
|
+
}
|
|
86838
86908
|
initData() {
|
|
86839
86909
|
var _a;
|
|
86840
86910
|
super.initData();
|
|
@@ -87434,6 +87504,16 @@ const registerLinkSeries = () => {
|
|
|
87434
87504
|
|
|
87435
87505
|
const progressLikeSeriesMark = Object.assign(Object.assign({}, baseSeriesMark), { ["group"]: { name: "group", type: "group" } });
|
|
87436
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
|
+
};
|
|
87437
87517
|
class ProgressLikeSeries extends PolarSeries {
|
|
87438
87518
|
constructor() {
|
|
87439
87519
|
super(...arguments);
|
|
@@ -87499,6 +87579,10 @@ class ProgressLikeSeries extends PolarSeries {
|
|
|
87499
87579
|
return this._getAngleValueEndWithoutMask(datum);
|
|
87500
87580
|
};
|
|
87501
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
|
+
}
|
|
87502
87586
|
setAttrFromSpec() {
|
|
87503
87587
|
var _a, _b, _c;
|
|
87504
87588
|
super.setAttrFromSpec();
|
|
@@ -87714,7 +87798,8 @@ const circularProgress = {
|
|
|
87714
87798
|
};
|
|
87715
87799
|
|
|
87716
87800
|
const CIRCULAR_PROGRESS_SERIES_COMPILE_ONLY_KEYS = {
|
|
87717
|
-
cornerRadius: true
|
|
87801
|
+
cornerRadius: true,
|
|
87802
|
+
roundCap: true
|
|
87718
87803
|
};
|
|
87719
87804
|
class CircularProgressSeries extends ProgressLikeSeries {
|
|
87720
87805
|
constructor() {
|
|
@@ -87941,7 +88026,9 @@ const linearProgress = {
|
|
|
87941
88026
|
};
|
|
87942
88027
|
|
|
87943
88028
|
const LINEAR_PROGRESS_SERIES_COMPILE_ONLY_KEYS = {
|
|
87944
|
-
bandWidth: true
|
|
88029
|
+
bandWidth: true,
|
|
88030
|
+
cornerRadius: true,
|
|
88031
|
+
clamp: true
|
|
87945
88032
|
};
|
|
87946
88033
|
const LINEAR_PROGRESS_SERIES_COMPILE_ONLY_SUB_KEYS = {
|
|
87947
88034
|
progress: {
|
|
@@ -94012,16 +94099,21 @@ const registerWordCloudShapeSeries = () => {
|
|
|
94012
94099
|
registerWordCloudSeries();
|
|
94013
94100
|
};
|
|
94014
94101
|
|
|
94102
|
+
const resolveOptionValue$2 = (option) => (isFunction$1(option) ? option() : option);
|
|
94015
94103
|
const funnel = (originData, op) => {
|
|
94016
|
-
var _a, _b;
|
|
94104
|
+
var _a, _b, _c, _d;
|
|
94017
94105
|
const data = originData.map(datum => (Object.assign({}, datum)));
|
|
94018
94106
|
if (!data || data.length === 0) {
|
|
94019
94107
|
return data;
|
|
94020
94108
|
}
|
|
94021
|
-
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);
|
|
94022
94114
|
const max = data.reduce((m, d) => Math.max(m, Number.parseFloat(d[valueField]) || -Infinity), -Infinity);
|
|
94023
94115
|
const min = data.reduce((m, d) => Math.min(m, Number.parseFloat(d[valueField]) || Infinity), Infinity);
|
|
94024
|
-
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];
|
|
94025
94117
|
data.forEach((d, i) => {
|
|
94026
94118
|
var _a, _b;
|
|
94027
94119
|
const currentValue = Number.parseFloat(d[valueField]);
|
|
@@ -94049,7 +94141,7 @@ const funnelTransform = (originData, op) => {
|
|
|
94049
94141
|
return data;
|
|
94050
94142
|
}
|
|
94051
94143
|
data.shift();
|
|
94052
|
-
data.forEach(
|
|
94144
|
+
data.forEach(d => {
|
|
94053
94145
|
d[op.asIsTransformLevel] = true;
|
|
94054
94146
|
});
|
|
94055
94147
|
return data;
|
|
@@ -94227,13 +94319,13 @@ class FunnelSeries extends BaseSeries {
|
|
|
94227
94319
|
return fields;
|
|
94228
94320
|
}
|
|
94229
94321
|
_statisticViewData() {
|
|
94230
|
-
var _a
|
|
94322
|
+
var _a;
|
|
94231
94323
|
super._statisticViewData();
|
|
94232
94324
|
this._data.getDataView().transform({
|
|
94233
94325
|
type: 'funnel',
|
|
94234
94326
|
options: {
|
|
94235
|
-
valueField: this.getValueField(),
|
|
94236
|
-
isCone: this._spec.isCone,
|
|
94327
|
+
valueField: () => this.getValueField(),
|
|
94328
|
+
isCone: () => this._spec.isCone,
|
|
94237
94329
|
asCurrentValue: FUNNEL_CURRENT_VALUE,
|
|
94238
94330
|
asTransformRatio: FUNNEL_TRANSFORM_RATIO,
|
|
94239
94331
|
asReachRatio: FUNNEL_REACH_RATIO,
|
|
@@ -94243,13 +94335,10 @@ class FunnelSeries extends BaseSeries {
|
|
|
94243
94335
|
asLastValueRatio: FUNNEL_LAST_VALUE_RATIO,
|
|
94244
94336
|
asLastValue: FUNNEL_LAST_VALUE,
|
|
94245
94337
|
asNextValue: FUNNEL_NEXT_VALUE,
|
|
94246
|
-
range:
|
|
94247
|
-
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,
|
|
94248
|
-
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
|
|
94249
|
-
}
|
|
94338
|
+
range: () => this._spec.range
|
|
94250
94339
|
}
|
|
94251
94340
|
});
|
|
94252
|
-
(
|
|
94341
|
+
(_a = this._viewDataTransform.getDataView()) === null || _a === void 0 ? void 0 : _a.transform({
|
|
94253
94342
|
type: 'funnelTransform',
|
|
94254
94343
|
options: { asIsTransformLevel: FUNNEL_TRANSFORM_LEVEL }
|
|
94255
94344
|
});
|
|
@@ -95668,7 +95757,7 @@ const registerCirclePackingSeries = () => {
|
|
|
95668
95757
|
};
|
|
95669
95758
|
|
|
95670
95759
|
const collectHierarchyField = (set, data, field) => {
|
|
95671
|
-
data.forEach(
|
|
95760
|
+
data.forEach(obj => {
|
|
95672
95761
|
if (!isNil$1(obj[field])) {
|
|
95673
95762
|
set.add(obj[field]);
|
|
95674
95763
|
}
|
|
@@ -95687,7 +95776,7 @@ const sankeyFormat = (data) => {
|
|
|
95687
95776
|
links: [],
|
|
95688
95777
|
nodes: []
|
|
95689
95778
|
};
|
|
95690
|
-
data.forEach(
|
|
95779
|
+
data.forEach(datum => {
|
|
95691
95780
|
if (datum.id === 'links' || datum.id === 'nodes') {
|
|
95692
95781
|
updateData[datum.id] = datum.values;
|
|
95693
95782
|
}
|
|
@@ -95700,10 +95789,11 @@ const sankeyFormat = (data) => {
|
|
|
95700
95789
|
return data;
|
|
95701
95790
|
};
|
|
95702
95791
|
const sankeyLayout = (data, op) => {
|
|
95703
|
-
|
|
95792
|
+
const options = isFunction$1(op) ? op() : op;
|
|
95793
|
+
if (!data || !(options === null || options === void 0 ? void 0 : options.view) || !data.length) {
|
|
95704
95794
|
return [];
|
|
95705
95795
|
}
|
|
95706
|
-
const view =
|
|
95796
|
+
const view = options.view();
|
|
95707
95797
|
if (view.x1 - view.x0 === 0 ||
|
|
95708
95798
|
view.y1 - view.y0 === 0 ||
|
|
95709
95799
|
view.x1 - view.x0 === -Infinity ||
|
|
@@ -95713,35 +95803,41 @@ const sankeyLayout = (data, op) => {
|
|
|
95713
95803
|
return [];
|
|
95714
95804
|
}
|
|
95715
95805
|
const originalData = data[0];
|
|
95716
|
-
|
|
95717
|
-
|
|
95718
|
-
const updatedData = [];
|
|
95719
|
-
originalData.links.forEach((datum) => {
|
|
95720
|
-
const updatedDatum = {};
|
|
95721
|
-
for (const key in datum) {
|
|
95722
|
-
if (key === op.sourceField) {
|
|
95723
|
-
updatedDatum.source = datum[op.sourceField];
|
|
95724
|
-
}
|
|
95725
|
-
else if (key === op.targetField) {
|
|
95726
|
-
updatedDatum.target = datum[op.targetField];
|
|
95727
|
-
}
|
|
95728
|
-
else if (key === op.valueField) {
|
|
95729
|
-
updatedDatum.value = datum[op.valueField];
|
|
95730
|
-
}
|
|
95731
|
-
else {
|
|
95732
|
-
updatedDatum[key] = datum[key];
|
|
95733
|
-
}
|
|
95734
|
-
}
|
|
95735
|
-
updatedData.push(updatedDatum);
|
|
95736
|
-
});
|
|
95737
|
-
originalData.links = updatedData;
|
|
95738
|
-
}
|
|
95739
|
-
}
|
|
95740
|
-
const layout = new SankeyLayout(op);
|
|
95806
|
+
const layoutData = normalizeSankeyData(originalData, options);
|
|
95807
|
+
const layout = new SankeyLayout(options);
|
|
95741
95808
|
const result = [];
|
|
95742
|
-
result.push(layout.layout(
|
|
95809
|
+
result.push(layout.layout(layoutData, view));
|
|
95743
95810
|
return result;
|
|
95744
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
|
+
};
|
|
95745
95841
|
|
|
95746
95842
|
const sankeyNodes = (data) => {
|
|
95747
95843
|
var _a, _b;
|
|
@@ -96591,7 +96687,6 @@ class SankeySeries extends CartesianSeries {
|
|
|
96591
96687
|
this.setSeriesField((_a = this._spec.seriesField) !== null && _a !== void 0 ? _a : this._spec.categoryField);
|
|
96592
96688
|
}
|
|
96593
96689
|
initData() {
|
|
96594
|
-
var _a, _b, _c, _d;
|
|
96595
96690
|
super.initData();
|
|
96596
96691
|
const viewData = this.getViewData();
|
|
96597
96692
|
const rawData = this.getRawData();
|
|
@@ -96603,40 +96698,43 @@ class SankeySeries extends CartesianSeries {
|
|
|
96603
96698
|
}, false);
|
|
96604
96699
|
viewData.transform({
|
|
96605
96700
|
type: 'sankeyLayout',
|
|
96606
|
-
options: {
|
|
96607
|
-
|
|
96608
|
-
|
|
96609
|
-
|
|
96610
|
-
|
|
96611
|
-
|
|
96612
|
-
|
|
96613
|
-
|
|
96614
|
-
|
|
96615
|
-
|
|
96616
|
-
|
|
96617
|
-
|
|
96618
|
-
|
|
96619
|
-
|
|
96620
|
-
|
|
96621
|
-
|
|
96622
|
-
|
|
96623
|
-
|
|
96624
|
-
|
|
96625
|
-
|
|
96626
|
-
|
|
96627
|
-
|
|
96628
|
-
|
|
96629
|
-
|
|
96630
|
-
|
|
96631
|
-
|
|
96632
|
-
|
|
96633
|
-
|
|
96634
|
-
|
|
96635
|
-
|
|
96636
|
-
|
|
96637
|
-
|
|
96638
|
-
|
|
96639
|
-
|
|
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
|
+
});
|
|
96640
96738
|
},
|
|
96641
96739
|
level: TransformLevel.sankeyLayout
|
|
96642
96740
|
});
|
|
@@ -97135,16 +97233,17 @@ const registerMarkMapTransform = () => {
|
|
|
97135
97233
|
};
|
|
97136
97234
|
|
|
97137
97235
|
const treemapLayout = (data, op) => {
|
|
97138
|
-
const
|
|
97236
|
+
const options = isFunction$1(op) ? op() : op;
|
|
97237
|
+
const viewBox = options.getViewBox();
|
|
97139
97238
|
if (viewBox) {
|
|
97140
|
-
const layout = new TreemapLayout(
|
|
97141
|
-
const res = layout.layout(data,
|
|
97239
|
+
const layout = new TreemapLayout(options);
|
|
97240
|
+
const res = layout.layout(data, viewBox);
|
|
97142
97241
|
const nodes = [];
|
|
97143
|
-
flattenNodes(res, nodes, { maxDepth:
|
|
97144
|
-
nodes.forEach(
|
|
97242
|
+
flattenNodes(res, nodes, { maxDepth: options === null || options === void 0 ? void 0 : options.maxDepth });
|
|
97243
|
+
nodes.forEach(datum => {
|
|
97145
97244
|
if (datum) {
|
|
97146
97245
|
[DEFAULT_HIERARCHY_ROOT, 'name'].forEach(key => {
|
|
97147
|
-
datum[key] = datum.datum[datum.depth][
|
|
97246
|
+
datum[key] = datum.datum[datum.depth][options.nameField];
|
|
97148
97247
|
});
|
|
97149
97248
|
}
|
|
97150
97249
|
});
|
|
@@ -97235,34 +97334,37 @@ class TreemapSeries extends CartesianSeries {
|
|
|
97235
97334
|
}
|
|
97236
97335
|
}
|
|
97237
97336
|
initData() {
|
|
97238
|
-
var _a
|
|
97337
|
+
var _a;
|
|
97239
97338
|
super.initData();
|
|
97240
97339
|
registerDataSetInstanceTransform(this._dataSet, 'treemap', treemapLayout);
|
|
97241
97340
|
(_a = this._data.getDataView()) === null || _a === void 0 ? void 0 : _a.transform({
|
|
97242
97341
|
type: 'treemap',
|
|
97243
|
-
options: {
|
|
97244
|
-
|
|
97245
|
-
|
|
97246
|
-
|
|
97247
|
-
|
|
97248
|
-
|
|
97249
|
-
|
|
97250
|
-
|
|
97251
|
-
|
|
97252
|
-
|
|
97253
|
-
|
|
97254
|
-
|
|
97255
|
-
|
|
97256
|
-
|
|
97257
|
-
|
|
97258
|
-
|
|
97259
|
-
|
|
97260
|
-
|
|
97261
|
-
|
|
97262
|
-
|
|
97263
|
-
|
|
97264
|
-
|
|
97265
|
-
|
|
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
|
+
});
|
|
97266
97368
|
}
|
|
97267
97369
|
});
|
|
97268
97370
|
if (this.getViewData()) {
|
|
@@ -98226,11 +98328,13 @@ const CORRELATION_X = `${PREFIX}_CORRELATION_X`;
|
|
|
98226
98328
|
const CORRELATION_Y = `${PREFIX}_CORRELATION_Y`;
|
|
98227
98329
|
const CORRELATION_SIZE = `${PREFIX}_CORRELATION_SIZE`;
|
|
98228
98330
|
|
|
98331
|
+
const resolveOptionValue$1 = (option) => (isFunction$1(option) ? option() : option);
|
|
98229
98332
|
const correlation$1 = (data, options) => {
|
|
98230
|
-
var _a, _b, _c, _d, _e, _f, _g, _h
|
|
98333
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
98231
98334
|
if (!data || !(options === null || options === void 0 ? void 0 : options.view) || !isArray$1(data)) {
|
|
98232
98335
|
return data;
|
|
98233
98336
|
}
|
|
98337
|
+
const dataList = data;
|
|
98234
98338
|
const viewBox = options.view();
|
|
98235
98339
|
if (viewBox.x1 - viewBox.x0 === 0 ||
|
|
98236
98340
|
viewBox.y1 - viewBox.y0 === 0 ||
|
|
@@ -98240,43 +98344,46 @@ const correlation$1 = (data, options) => {
|
|
|
98240
98344
|
viewBox.y1 - viewBox.y0 === Infinity) {
|
|
98241
98345
|
return data;
|
|
98242
98346
|
}
|
|
98243
|
-
const startAngle = degreeToRadian((_a = options.startAngle) !== null && _a !== void 0 ? _a : -90);
|
|
98244
|
-
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);
|
|
98245
98349
|
const maxRadius = Math.max((viewBox.x1 - viewBox.x0) / 2, (viewBox.y1 - viewBox.y0) / 2);
|
|
98246
|
-
const innerRadius = toPercent((_c = options.innerRadius) !== null && _c !== void 0 ? _c : 0, maxRadius);
|
|
98247
|
-
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);
|
|
98248
98353
|
const center = [
|
|
98249
|
-
isNumber$2(
|
|
98250
|
-
?
|
|
98251
|
-
: viewBox.x0 + toPercent((
|
|
98252
|
-
isNumber$2(
|
|
98253
|
-
?
|
|
98254
|
-
: 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)
|
|
98255
98360
|
];
|
|
98256
|
-
const fieldAccessor = field$2(options.field);
|
|
98257
|
-
const values =
|
|
98361
|
+
const fieldAccessor = field$2(resolveOptionValue$1(options.field));
|
|
98362
|
+
const values = dataList.map(fieldAccessor);
|
|
98258
98363
|
const [min, max] = extent$2(values);
|
|
98259
98364
|
const radiusScale = min === max
|
|
98260
98365
|
? (val) => (innerRadius + outerRadius) / 2
|
|
98261
98366
|
: (val) => innerRadius + ((outerRadius - innerRadius) * (val - min)) / (max - min);
|
|
98262
|
-
const
|
|
98263
|
-
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;
|
|
98264
98371
|
let sizeScale = (datum) => defaultSize;
|
|
98265
98372
|
if (sizeAccessor) {
|
|
98266
|
-
const [minSize, maxSize] = sizeAccessor !== fieldAccessor ? extent$2(
|
|
98267
|
-
const minR = (
|
|
98268
|
-
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;
|
|
98269
98376
|
if (minSize !== maxSize) {
|
|
98270
98377
|
sizeScale = (datum) => minR + ((maxR - minR) * (sizeAccessor(datum) - minSize)) / (maxSize - minSize);
|
|
98271
98378
|
}
|
|
98272
98379
|
}
|
|
98273
98380
|
const minAngle = Math.min(startAngle, endAngle);
|
|
98274
98381
|
const maxAngle = Math.max(startAngle, endAngle);
|
|
98275
|
-
const angles = getPartialAngles(minAngle, maxAngle,
|
|
98382
|
+
const angles = getPartialAngles(minAngle, maxAngle, dataList.length);
|
|
98276
98383
|
const res = [];
|
|
98277
98384
|
const searchStep = 60;
|
|
98278
98385
|
const searchAngle = (maxAngle - minAngle) / searchStep;
|
|
98279
|
-
|
|
98386
|
+
dataList.forEach((datum, index) => {
|
|
98280
98387
|
const radius = radiusScale(values[index]);
|
|
98281
98388
|
const size = sizeScale(datum);
|
|
98282
98389
|
let x;
|
|
@@ -98349,15 +98456,20 @@ const hasOverlap = (item, arr) => {
|
|
|
98349
98456
|
return false;
|
|
98350
98457
|
}
|
|
98351
98458
|
return arr.some(entry => {
|
|
98352
|
-
|
|
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);
|
|
98353
98463
|
});
|
|
98354
98464
|
};
|
|
98355
98465
|
|
|
98466
|
+
const resolveOptionValue = (option) => (isFunction$1(option) ? option() : option);
|
|
98356
98467
|
const correlationCenter = (data, options) => {
|
|
98357
98468
|
if (!data || !isArray$1(data)) {
|
|
98358
98469
|
return [];
|
|
98359
98470
|
}
|
|
98360
|
-
const
|
|
98471
|
+
const keyword = resolveOptionValue(options.keyword);
|
|
98472
|
+
const categoryField = resolveOptionValue(options.categoryField);
|
|
98361
98473
|
const nodeInfo = data[0].latestData[0];
|
|
98362
98474
|
const centerInfo = {
|
|
98363
98475
|
[categoryField]: keyword,
|
|
@@ -98518,7 +98630,6 @@ class CorrelationSeries extends PolarSeries {
|
|
|
98518
98630
|
this.setSizeRange(this._spec.sizeRange);
|
|
98519
98631
|
}
|
|
98520
98632
|
initData() {
|
|
98521
|
-
var _a, _b, _c;
|
|
98522
98633
|
super.initData();
|
|
98523
98634
|
if (!this._data) {
|
|
98524
98635
|
return;
|
|
@@ -98534,8 +98645,8 @@ class CorrelationSeries extends PolarSeries {
|
|
|
98534
98645
|
centerDataView.transform({
|
|
98535
98646
|
type: 'correlationCenter',
|
|
98536
98647
|
options: {
|
|
98537
|
-
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 : '',
|
|
98538
|
-
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
|
|
98539
98650
|
}
|
|
98540
98651
|
});
|
|
98541
98652
|
this._centerSeriesData = new CompilableData(this._option, centerDataView);
|
|
@@ -98558,14 +98669,14 @@ class CorrelationSeries extends PolarSeries {
|
|
|
98558
98669
|
y1: this._viewBox.y2
|
|
98559
98670
|
};
|
|
98560
98671
|
},
|
|
98561
|
-
field: this._spec.valueField,
|
|
98562
|
-
radiusRange: this._spec.sizeRange,
|
|
98563
|
-
radiusField: this._spec.sizeField,
|
|
98564
|
-
center: [this._spec.centerX, this._spec.centerY],
|
|
98565
|
-
innerRadius: this._spec.innerRadius,
|
|
98566
|
-
outerRadius: this._spec.outerRadius,
|
|
98567
|
-
startAngle: this._spec.startAngle,
|
|
98568
|
-
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
|
|
98569
98680
|
}
|
|
98570
98681
|
});
|
|
98571
98682
|
}
|
|
@@ -99343,9 +99454,10 @@ class VennSeriesSpecTransformer extends BaseSeriesSpecTransformer {
|
|
|
99343
99454
|
}
|
|
99344
99455
|
|
|
99345
99456
|
const vennLayout = (data, op) => {
|
|
99346
|
-
const
|
|
99457
|
+
const options = isFunction$1(op) ? op() : op;
|
|
99458
|
+
const viewBox = options.getViewBox();
|
|
99347
99459
|
if (viewBox && (data === null || data === void 0 ? void 0 : data.length)) {
|
|
99348
|
-
return vennTransform(Object.assign({ setField:
|
|
99460
|
+
return vennTransform(Object.assign({ setField: options.setField, valueField: options.valueField }, viewBox), data);
|
|
99349
99461
|
}
|
|
99350
99462
|
return [];
|
|
99351
99463
|
};
|
|
@@ -99428,7 +99540,7 @@ class VennSeries extends BaseSeries {
|
|
|
99428
99540
|
registerDataSetInstanceTransform(this._dataSet, 'venn', vennLayout);
|
|
99429
99541
|
(_a = this._data.getDataView()) === null || _a === void 0 ? void 0 : _a.transform({
|
|
99430
99542
|
type: 'venn',
|
|
99431
|
-
options: {
|
|
99543
|
+
options: () => ({
|
|
99432
99544
|
getViewBox: () => {
|
|
99433
99545
|
return this._viewBox.empty()
|
|
99434
99546
|
? null
|
|
@@ -99441,7 +99553,7 @@ class VennSeries extends BaseSeries {
|
|
|
99441
99553
|
},
|
|
99442
99554
|
setField: this._categoryField,
|
|
99443
99555
|
valueField: this._valueField
|
|
99444
|
-
}
|
|
99556
|
+
})
|
|
99445
99557
|
});
|
|
99446
99558
|
}
|
|
99447
99559
|
compile() {
|
|
@@ -99861,7 +99973,7 @@ class PolarChartSpecTransformer extends BaseChartSpecTransformer {
|
|
|
99861
99973
|
return indicatorSpec;
|
|
99862
99974
|
}
|
|
99863
99975
|
_getDefaultSeriesSpec(spec, pickKeys) {
|
|
99864
|
-
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);
|
|
99865
99977
|
return series;
|
|
99866
99978
|
}
|
|
99867
99979
|
transformSpec(spec) {
|
|
@@ -99885,7 +99997,7 @@ class ProgressLikeChartSpecTransformer extends PolarChartSpecTransformer {
|
|
|
99885
99997
|
return false;
|
|
99886
99998
|
}
|
|
99887
99999
|
_getDefaultSeriesSpec(spec) {
|
|
99888
|
-
const series = super._getDefaultSeriesSpec(spec, ['startAngle', 'endAngle', 'centerX', 'centerY']);
|
|
100000
|
+
const series = super._getDefaultSeriesSpec(spec, ['startAngle', 'endAngle', 'centerX', 'centerY', 'clamp']);
|
|
99889
100001
|
series.categoryField = spec.categoryField || spec.radiusField;
|
|
99890
100002
|
series.valueField = spec.valueField || spec.angleField;
|
|
99891
100003
|
return series;
|
|
@@ -100023,6 +100135,7 @@ class RoseChartSpecTransformer extends RoseLikeChartSpecTransformer {
|
|
|
100023
100135
|
_getDefaultSeriesSpec(spec) {
|
|
100024
100136
|
var _a, _b, _c;
|
|
100025
100137
|
const series = super._getDefaultSeriesSpec(spec);
|
|
100138
|
+
this._addSeriesRelatedSpecKeys(['radius', 'outerRadius', 'innerRadius']);
|
|
100026
100139
|
series.radius = (_a = spec.radius) !== null && _a !== void 0 ? _a : POLAR_DEFAULT_RADIUS;
|
|
100027
100140
|
series.outerRadius = (_b = spec.outerRadius) !== null && _b !== void 0 ? _b : POLAR_DEFAULT_RADIUS;
|
|
100028
100141
|
series.innerRadius = (_c = spec.innerRadius) !== null && _c !== void 0 ? _c : 0;
|
|
@@ -100186,6 +100299,7 @@ class RadarChartSpecTransformer extends RoseLikeChartSpecTransformer {
|
|
|
100186
100299
|
var _a, _b, _c, _d;
|
|
100187
100300
|
const series = super._getDefaultSeriesSpec(spec);
|
|
100188
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']);
|
|
100189
100303
|
series.line = spec.line;
|
|
100190
100304
|
series.point = spec.point;
|
|
100191
100305
|
series.stack = spec.stack;
|
|
@@ -100691,7 +100805,7 @@ class CircularProgressChartSpecTransformer extends ProgressLikeChartSpecTransfor
|
|
|
100691
100805
|
_getDefaultSeriesSpec(spec) {
|
|
100692
100806
|
var _a, _b;
|
|
100693
100807
|
const series = super._getDefaultSeriesSpec(spec);
|
|
100694
|
-
this._addSeriesRelatedSpecKeys(['cornerRadius']);
|
|
100808
|
+
this._addSeriesRelatedSpecKeys(['cornerRadius', 'progress', 'track', 'roundCap']);
|
|
100695
100809
|
series.progress = spec.progress;
|
|
100696
100810
|
series.track = spec.track;
|
|
100697
100811
|
series.tickMask = spec.tickMask;
|
|
@@ -100740,6 +100854,7 @@ const registerCircularProgressChart = () => {
|
|
|
100740
100854
|
class GaugeChartSpecTransformer extends ProgressLikeChartSpecTransformer {
|
|
100741
100855
|
_getDefaultSeriesSpec(spec) {
|
|
100742
100856
|
const series = super._getDefaultSeriesSpec(spec);
|
|
100857
|
+
this._addSeriesRelatedSpecKeys(['pin', 'pinBackground', 'pointer']);
|
|
100743
100858
|
series.radiusField = spec.radiusField;
|
|
100744
100859
|
series.pin = spec.pin;
|
|
100745
100860
|
series.pinBackground = spec.pinBackground;
|
|
@@ -100981,6 +101096,7 @@ class LinearProgressChartSpecTransformer extends CartesianChartSpecTransformer {
|
|
|
100981
101096
|
var _a, _b;
|
|
100982
101097
|
const series = super._getDefaultSeriesSpec(spec, ['bandWidth', 'progress', 'track', 'clamp']);
|
|
100983
101098
|
series.direction = (_a = spec.direction) !== null && _a !== void 0 ? _a : 'horizontal';
|
|
101099
|
+
this._addSeriesRelatedSpecKeys(['cornerRadius']);
|
|
100984
101100
|
series.cornerRadius = (_b = spec.cornerRadius) !== null && _b !== void 0 ? _b : 0;
|
|
100985
101101
|
return series;
|
|
100986
101102
|
}
|
|
@@ -101496,6 +101612,7 @@ class RangeAreaChartSpecTransformer extends CartesianChartSpecTransformer {
|
|
|
101496
101612
|
_getDefaultSeriesSpec(spec) {
|
|
101497
101613
|
var _a, _b;
|
|
101498
101614
|
const series = super._getDefaultSeriesSpec(spec);
|
|
101615
|
+
this._addSeriesRelatedSpecKeys(['area', 'point', 'line']);
|
|
101499
101616
|
series.area = spec.area;
|
|
101500
101617
|
series.point = spec.point;
|
|
101501
101618
|
series.line = spec.line;
|
|
@@ -106676,7 +106793,7 @@ const registerScrollBar = () => {
|
|
|
106676
106793
|
};
|
|
106677
106794
|
|
|
106678
106795
|
const indicatorMapper = (data, op) => {
|
|
106679
|
-
const { datum, title, content } = op;
|
|
106796
|
+
const { datum, title, content } = isFunction$1(op) ? op() : op;
|
|
106680
106797
|
const mappedData = [];
|
|
106681
106798
|
const datumResult = datum.call(null);
|
|
106682
106799
|
if (title.visible) {
|
|
@@ -106808,11 +106925,11 @@ class Indicator extends BaseComponent {
|
|
|
106808
106925
|
const displayData = new DataView(this._option.dataSet, { name: `${this.type}_${this.id}_data` });
|
|
106809
106926
|
displayData.transform({
|
|
106810
106927
|
type: 'indicatorFilter',
|
|
106811
|
-
options: {
|
|
106928
|
+
options: () => ({
|
|
106812
106929
|
title: this._title,
|
|
106813
106930
|
content: this._content,
|
|
106814
106931
|
datum: () => this._activeDatum
|
|
106815
|
-
}
|
|
106932
|
+
})
|
|
106816
106933
|
});
|
|
106817
106934
|
displayData.target.addListener('change', this.updateDatum.bind(this));
|
|
106818
106935
|
this._displayData = new CompilableData(this._option, displayData);
|