@visactor/react-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/index.js +319 -206
- package/build/index.min.js +3 -3
- package/package.json +7 -7
package/build/index.js
CHANGED
|
@@ -14275,13 +14275,11 @@
|
|
|
14275
14275
|
};
|
|
14276
14276
|
}
|
|
14277
14277
|
recomputeCurrentStatePatch() {
|
|
14278
|
-
var _a, _b
|
|
14278
|
+
var _a, _b;
|
|
14279
14279
|
if (!(null === (_a = this.currentStates) || void 0 === _a ? void 0 : _a.length)) return this.effectiveStates = [], this.resolvedStatePatch = void 0, void this.syncSharedStateActiveRegistrations();
|
|
14280
|
-
const stateResolveBaseAttrs =
|
|
14281
|
-
|
|
14282
|
-
|
|
14283
|
-
const transition = stateModel.useStates(this.currentStates),
|
|
14284
|
-
effectiveStates = null !== (_d = transition.effectiveStates) && void 0 !== _d ? _d : transition.states,
|
|
14280
|
+
const stateResolveBaseAttrs = this.getStateResolveBaseAttrs(),
|
|
14281
|
+
transition = this.createStateModel(stateResolveBaseAttrs).useStates(this.currentStates),
|
|
14282
|
+
effectiveStates = null !== (_b = transition.effectiveStates) && void 0 !== _b ? _b : transition.states,
|
|
14285
14283
|
resolvedStateAttrs = this.stateEngine && this.compiledStateDefinitions ? Object.assign({}, this.stateEngine.resolvedPatch) : this.getStateStyleResolver(this.stateMergeMode).resolve(stateResolveBaseAttrs, this.states, this.stateProxy, transition.states, this.stateSort);
|
|
14286
14284
|
this.currentStates = transition.states, this.effectiveStates = [...effectiveStates], this.resolvedStatePatch = resolvedStateAttrs, this.syncSharedStateActiveRegistrations();
|
|
14287
14285
|
}
|
|
@@ -14874,7 +14872,15 @@
|
|
|
14874
14872
|
var _a;
|
|
14875
14873
|
return null === (_a = this.states) || void 0 === _a ? void 0 : _a[stateName];
|
|
14876
14874
|
}
|
|
14877
|
-
|
|
14875
|
+
getStateResolveBaseAttrs() {
|
|
14876
|
+
var _a;
|
|
14877
|
+
return null !== (_a = this.baseAttributes) && void 0 !== _a ? _a : this.attribute;
|
|
14878
|
+
}
|
|
14879
|
+
syncStateResolveContext(stateResolveBaseAttrs = this.getStateResolveBaseAttrs()) {
|
|
14880
|
+
var _a;
|
|
14881
|
+
return null === (_a = this.stateEngine) || void 0 === _a || _a.setResolveContext(this, stateResolveBaseAttrs), stateResolveBaseAttrs;
|
|
14882
|
+
}
|
|
14883
|
+
createStateModel(stateResolveBaseAttrs = this.getStateResolveBaseAttrs()) {
|
|
14878
14884
|
const {
|
|
14879
14885
|
compiledDefinitions: compiledDefinitions,
|
|
14880
14886
|
stateProxyEligibility: stateProxyEligibility,
|
|
@@ -14887,7 +14893,7 @@
|
|
|
14887
14893
|
stateProxyEligibility: stateProxyEligibility,
|
|
14888
14894
|
states: this.states,
|
|
14889
14895
|
mergeMode: this.stateMergeMode
|
|
14890
|
-
}), 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({
|
|
14896
|
+
}), 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({
|
|
14891
14897
|
states: this.states,
|
|
14892
14898
|
currentStates: this.currentStates,
|
|
14893
14899
|
stateSort: this.stateSort,
|
|
@@ -14957,18 +14963,18 @@
|
|
|
14957
14963
|
};
|
|
14958
14964
|
}
|
|
14959
14965
|
resolveGraphicStateTransition(states, previousStates, forceResolverRefresh = !1) {
|
|
14960
|
-
var _a, _b
|
|
14966
|
+
var _a, _b;
|
|
14961
14967
|
let transition = this.resolveSimpleLocalStateTransition(states, previousStates);
|
|
14962
14968
|
const isSimpleLocalTransition = !!transition;
|
|
14963
14969
|
let resolvedStateAttrs;
|
|
14964
14970
|
if (transition) resolvedStateAttrs = transition.resolvedStateAttrs;else {
|
|
14965
|
-
const stateResolveBaseAttrs =
|
|
14966
|
-
stateModel = this.createStateModel();
|
|
14967
|
-
|
|
14971
|
+
const stateResolveBaseAttrs = this.getStateResolveBaseAttrs(),
|
|
14972
|
+
stateModel = this.createStateModel(stateResolveBaseAttrs);
|
|
14973
|
+
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);
|
|
14968
14974
|
}
|
|
14969
14975
|
return {
|
|
14970
14976
|
transition: transition,
|
|
14971
|
-
effectiveStates: null !== (
|
|
14977
|
+
effectiveStates: null !== (_b = transition.effectiveStates) && void 0 !== _b ? _b : transition.states,
|
|
14972
14978
|
resolvedStateAttrs: resolvedStateAttrs,
|
|
14973
14979
|
isSimpleLocalTransition: isSimpleLocalTransition
|
|
14974
14980
|
};
|
|
@@ -15139,10 +15145,10 @@
|
|
|
15139
15145
|
}
|
|
15140
15146
|
}
|
|
15141
15147
|
invalidateResolver() {
|
|
15142
|
-
var _a, _b
|
|
15148
|
+
var _a, _b;
|
|
15143
15149
|
if (!this.stateEngine || !(null === (_a = this.currentStates) || void 0 === _a ? void 0 : _a.length) || !this.compiledStateDefinitions) return;
|
|
15144
|
-
|
|
15145
|
-
this.
|
|
15150
|
+
this.syncStateResolveContext();
|
|
15151
|
+
this.resolverEpoch = (null !== (_b = this.resolverEpoch) && void 0 !== _b ? _b : 0) + 1, this.stateEngine.invalidateResolverCache();
|
|
15146
15152
|
const transition = this.stateEngine.applyStates(this.currentStates),
|
|
15147
15153
|
resolvedStateAttrs = Object.assign({}, this.stateEngine.resolvedPatch);
|
|
15148
15154
|
this.effectiveStates = [...transition.effectiveStates], this.resolvedStatePatch = resolvedStateAttrs, this.sharedStateDirty = !1, this.syncSharedStateActiveRegistrations(), this.stopStateAnimates(), this._restoreAttributeFromStaticTruth({
|
|
@@ -60614,27 +60620,30 @@
|
|
|
60614
60620
|
};
|
|
60615
60621
|
|
|
60616
60622
|
const lookup = (data, opt) => {
|
|
60617
|
-
|
|
60618
|
-
const
|
|
60619
|
-
|
|
60623
|
+
var _a;
|
|
60624
|
+
const fromData = null === (_a = opt.from) || void 0 === _a ? void 0 : _a.call(opt);
|
|
60625
|
+
if (!fromData) return data;
|
|
60626
|
+
const fields = (option = opt.fields, isFunction$1(option) ? option() : option);
|
|
60627
|
+
var option;
|
|
60628
|
+
const key = opt.key,
|
|
60620
60629
|
values = opt.values,
|
|
60621
60630
|
defaultValue = opt.default,
|
|
60622
60631
|
as = opt.as || [fields],
|
|
60623
|
-
index =
|
|
60624
|
-
return obj[fields] && map.set(obj[fields]
|
|
60632
|
+
index = fromData.reduce(function (map, obj) {
|
|
60633
|
+
return obj[fields] && map.set(`${obj[fields]}`, obj), map;
|
|
60625
60634
|
}, new Map());
|
|
60626
60635
|
let set;
|
|
60627
60636
|
if (isFunction$1(opt.set)) set = function (d) {
|
|
60628
|
-
const v = index.get(d[key]);
|
|
60637
|
+
const v = index.get(`${d[key]}`);
|
|
60629
60638
|
opt.set(d, v);
|
|
60630
60639
|
};else if (values) {
|
|
60631
60640
|
const m = values.length;
|
|
60632
60641
|
set = function (d) {
|
|
60633
|
-
const v = index.get(d[key]);
|
|
60642
|
+
const v = index.get(`${d[key]}`);
|
|
60634
60643
|
if (isNil$1(v)) for (let i = 0; i < m; ++i) d[as[i]] = defaultValue;else for (let i = 0; i < m; ++i) d[as[i]] = v[values[i]];
|
|
60635
60644
|
};
|
|
60636
60645
|
} else set = function (d) {
|
|
60637
|
-
const v = index.get(d[key]);
|
|
60646
|
+
const v = index.get(`${d[key]}`);
|
|
60638
60647
|
d[as[0]] = isValid$1(v) ? v : defaultValue;
|
|
60639
60648
|
};
|
|
60640
60649
|
return 0 === data.length ? [] : data.map(d => (set(d), d));
|
|
@@ -61512,9 +61521,9 @@
|
|
|
61512
61521
|
type: "dataview"
|
|
61513
61522
|
}), this._viewStackData.transform({
|
|
61514
61523
|
type: "stackSplit",
|
|
61515
|
-
options: {
|
|
61524
|
+
options: () => ({
|
|
61516
61525
|
fields: this.getStackGroupFields()
|
|
61517
|
-
}
|
|
61526
|
+
})
|
|
61518
61527
|
}, !1);
|
|
61519
61528
|
}
|
|
61520
61529
|
_noAnimationDataKey(datum, index) {
|
|
@@ -66749,7 +66758,8 @@
|
|
|
66749
66758
|
const oldSpec = this._spec,
|
|
66750
66759
|
onlyMarkerComponentsRemoved = this._isOnlyMarkerComponentsRemoved(this._spec, spec, currentKeys),
|
|
66751
66760
|
onlyComponentSpecsChanged = this._isOnlyComponentSpecsChanged(this._spec, spec, currentKeys),
|
|
66752
|
-
onlySeriesSpecsChanged = this._isOnlySeriesSpecsChanged(this._spec, spec, currentKeys)
|
|
66761
|
+
onlySeriesSpecsChanged = this._isOnlySeriesSpecsChanged(this._spec, spec, currentKeys),
|
|
66762
|
+
onlyComponentOrSeriesSpecsChanged = !(!onlyComponentSpecsChanged && !onlySeriesSpecsChanged) || this._isOnlyComponentOrSeriesSpecsChanged(this._spec, spec, currentKeys);
|
|
66753
66763
|
if (this._spec = spec, onlyMarkerComponentsRemoved) return this._removeMarkerComponentsForEmptySpecs(result), result;
|
|
66754
66764
|
if (this.updateChartConfig(result, oldSpec), result.reMake) return this.setLayoutTag(!0, null, !1), result;
|
|
66755
66765
|
if (this.updateGlobalScale(result), result.reMake) return this.setLayoutTag(!0, null, !1), result;
|
|
@@ -66757,7 +66767,7 @@
|
|
|
66757
66767
|
const componentUpdateResult = this.updateComponentSpec(result);
|
|
66758
66768
|
return result.reMake ? (this.setLayoutTag(!0, null, !1), result) : (!onlyComponentSpecsChanged && (null === (_a = result.effects) || void 0 === _a ? void 0 : _a.localOnly) && delete result.effects.localOnly, isUpdateSpecResultLocalOnly(result) ? result : onlyComponentSpecsChanged && !componentUpdateResult.hasNonComponentOnlyUpdate && (isUpdateSpecResultComponentOnly(result) || this._isComponentScaleDomainOnlyUpdate(result)) ? (componentUpdateResult.componentOnlyUpdatedComponents.forEach(component => {
|
|
66759
66769
|
component.reInit(component.getSpec());
|
|
66760
|
-
}), (null === (_b = result.effects) || void 0 === _b ? void 0 : _b.layout) && this.setLayoutTag(!0, null, !1), result) : (this.setLayoutTag(!0, null, !1), this.updateSeriesSpec(result), result.reMake || (this.reInit(),
|
|
66770
|
+
}), (null === (_b = result.effects) || void 0 === _b ? void 0 : _b.layout) && this.setLayoutTag(!0, null, !1), result) : (this.setLayoutTag(!0, null, !1), this.updateSeriesSpec(result), result.reMake || (this.reInit(), onlyComponentOrSeriesSpecsChanged && this._canSkipChartDataStages(result) || (this.updateDataSpec(), this.reDataFlow(), this._reRunStackDataFlow(), this.getAllModels().forEach(model => model.onDataUpdate()))), result));
|
|
66761
66771
|
}
|
|
66762
66772
|
updateChartConfig(result, oldSpec) {
|
|
66763
66773
|
var _a, _b;
|
|
@@ -66858,6 +66868,15 @@
|
|
|
66858
66868
|
onlySeriesSpecChange = specKeys.every(key => !!isEqual(currentSpecRecord[key], nextSpecRecord[key]) || !!seriesRelatedSpecKeys[key] && (hasSeriesSpecChange = !0, !0));
|
|
66859
66869
|
return hasSeriesSpecChange && onlySeriesSpecChange;
|
|
66860
66870
|
}
|
|
66871
|
+
_isOnlyComponentOrSeriesSpecsChanged(currentSpec, nextSpec, specKeys) {
|
|
66872
|
+
var _a, _b;
|
|
66873
|
+
let hasComponentOrSeriesSpecChange = !1;
|
|
66874
|
+
const currentSpecRecord = currentSpec,
|
|
66875
|
+
nextSpecRecord = nextSpec,
|
|
66876
|
+
seriesRelatedSpecKeys = null !== (_b = null === (_a = this._specTransformer) || void 0 === _a ? void 0 : _a.getSeriesRelatedSpecKeys()) && void 0 !== _b ? _b : {},
|
|
66877
|
+
onlyComponentOrSeriesSpecChange = specKeys.every(key => !!isEqual(currentSpecRecord[key], nextSpecRecord[key]) || !(!this._isComponentSpecKey(key) && !seriesRelatedSpecKeys[key]) && (hasComponentOrSeriesSpecChange = !0, !0));
|
|
66878
|
+
return hasComponentOrSeriesSpecChange && onlyComponentOrSeriesSpecChange;
|
|
66879
|
+
}
|
|
66861
66880
|
_canSkipChartDataStages(result) {
|
|
66862
66881
|
const effects = result.effects;
|
|
66863
66882
|
return !(!(null == effects ? void 0 : effects.series) || effects.remake || effects.data || effects.scaleDomain || result.reMake);
|
|
@@ -67493,7 +67512,7 @@
|
|
|
67493
67512
|
},
|
|
67494
67513
|
{
|
|
67495
67514
|
fields: fields
|
|
67496
|
-
} = op;
|
|
67515
|
+
} = isFunction$1(op) ? op() : op;
|
|
67497
67516
|
if (!(null == fields ? void 0 : fields.length)) return result;
|
|
67498
67517
|
const lastFieldIndex = fields.length - 1;
|
|
67499
67518
|
let nextNode,
|
|
@@ -69601,12 +69620,17 @@
|
|
|
69601
69620
|
}
|
|
69602
69621
|
}
|
|
69603
69622
|
|
|
69604
|
-
const map$1 = (data, opt) =>
|
|
69605
|
-
|
|
69606
|
-
|
|
69607
|
-
|
|
69608
|
-
|
|
69609
|
-
|
|
69623
|
+
const map$1 = (data, opt) => {
|
|
69624
|
+
const options = isFunction$1(opt) ? opt() : opt,
|
|
69625
|
+
features = data.features;
|
|
69626
|
+
return features && features.forEach((f, index) => {
|
|
69627
|
+
var _a, _b;
|
|
69628
|
+
f[DEFAULT_DATA_INDEX] = index;
|
|
69629
|
+
const name = null === (_a = f.properties) || void 0 === _a ? void 0 : _a[options.nameProperty],
|
|
69630
|
+
mappedName = null === (_b = options.nameMap) || void 0 === _b ? void 0 : _b[`${name}`];
|
|
69631
|
+
f[DEFAULT_MAP_LOOK_UP_KEY] = mappedName || name;
|
|
69632
|
+
}), features;
|
|
69633
|
+
};
|
|
69610
69634
|
|
|
69611
69635
|
class MapSeriesTooltipHelper extends BaseSeriesTooltipHelper {
|
|
69612
69636
|
constructor() {
|
|
@@ -70358,10 +70382,10 @@
|
|
|
70358
70382
|
level: TransformLevel.copyDataView
|
|
70359
70383
|
}).transform({
|
|
70360
70384
|
type: "map",
|
|
70361
|
-
options: {
|
|
70385
|
+
options: () => ({
|
|
70362
70386
|
nameMap: this._nameMap,
|
|
70363
70387
|
nameProperty: this._nameProperty
|
|
70364
|
-
}
|
|
70388
|
+
})
|
|
70365
70389
|
}).transform({
|
|
70366
70390
|
type: "lookup",
|
|
70367
70391
|
options: {
|
|
@@ -70370,7 +70394,7 @@
|
|
|
70370
70394
|
return null === (_a = this._data) || void 0 === _a ? void 0 : _a.getLatestData();
|
|
70371
70395
|
},
|
|
70372
70396
|
key: DEFAULT_MAP_LOOK_UP_KEY,
|
|
70373
|
-
fields: this._nameField,
|
|
70397
|
+
fields: () => this._nameField,
|
|
70374
70398
|
set: (feature, datum) => {
|
|
70375
70399
|
datum && Object.keys(datum).forEach(key => {
|
|
70376
70400
|
key in feature || (feature[key] = datum[key]);
|
|
@@ -70516,12 +70540,13 @@
|
|
|
70516
70540
|
|
|
70517
70541
|
const waterfall$1 = (lastData, op) => {
|
|
70518
70542
|
if (!lastData || 0 === lastData.length) return lastData;
|
|
70519
|
-
const
|
|
70543
|
+
const options = isFunction$1(op) ? op() : op,
|
|
70544
|
+
{
|
|
70520
70545
|
indexField: indexField,
|
|
70521
70546
|
total: totalSpec,
|
|
70522
70547
|
groupData: groupData,
|
|
70523
70548
|
calculationMode: calculationMode
|
|
70524
|
-
} =
|
|
70549
|
+
} = options,
|
|
70525
70550
|
totalData = [],
|
|
70526
70551
|
{
|
|
70527
70552
|
dimensionValues: dimensionValues,
|
|
@@ -70547,7 +70572,7 @@
|
|
|
70547
70572
|
positive: temp.end,
|
|
70548
70573
|
negative: temp.end
|
|
70549
70574
|
},
|
|
70550
|
-
indexData = !0 ===
|
|
70575
|
+
indexData = !0 === options.stackInverse ? dimensionData[key].reverse() : dimensionData[key];
|
|
70551
70576
|
if (null == indexData || indexData.forEach((d, i) => {
|
|
70552
70577
|
i === indexData.length - 1 ? d[STACK_FIELD_TOTAL_TOP] = !0 : delete d[STACK_FIELD_TOTAL_TOP];
|
|
70553
70578
|
}), indexData.length > 1) {
|
|
@@ -70559,9 +70584,9 @@
|
|
|
70559
70584
|
} else if (index === indexValues.length - 1) return !0;
|
|
70560
70585
|
return !1;
|
|
70561
70586
|
};
|
|
70562
|
-
if (indexData.some(d => isTotalCheck(d))) return temp = computeTotalWithMultipleData(indexData, key, total, totalData, temp, indexValues, index,
|
|
70587
|
+
if (indexData.some(d => isTotalCheck(d))) return temp = computeTotalWithMultipleData(indexData, key, total, totalData, temp, indexValues, index, options, isTotalCheck), void totalData.push(total);
|
|
70563
70588
|
}
|
|
70564
|
-
temp = computeNormalData(indexData, key, total, totalData, temp, indexValues, index,
|
|
70589
|
+
temp = computeNormalData(indexData, key, total, totalData, temp, indexValues, index, options), totalData.push(total);
|
|
70565
70590
|
}), totalData;
|
|
70566
70591
|
};
|
|
70567
70592
|
function computeTotalWithMultipleData(indexData, key, total, totalData, temp, indexValues, index, op, isTotalCheck) {
|
|
@@ -70686,12 +70711,12 @@
|
|
|
70686
70711
|
total: total,
|
|
70687
70712
|
seriesField: seriesField,
|
|
70688
70713
|
calculationMode: calculationMode
|
|
70689
|
-
} = op,
|
|
70714
|
+
} = isFunction$1(op) ? op() : op,
|
|
70690
70715
|
totalData = {
|
|
70691
70716
|
[indexField]: (null == total ? void 0 : total.text) || "total",
|
|
70692
70717
|
[valueField]: data.reduce((pre, cur) => precisionAdd(pre, +cur[valueField]), 0)
|
|
70693
70718
|
};
|
|
70694
|
-
return seriesField && (totalData[seriesField] = "total"), "decrease" === calculationMode ?
|
|
70719
|
+
return seriesField && (totalData[seriesField] = "total"), "decrease" === calculationMode ? [totalData, ...data] : [...data, totalData];
|
|
70695
70720
|
};
|
|
70696
70721
|
|
|
70697
70722
|
const Appear_FadeIn$6 = {
|
|
@@ -71188,17 +71213,20 @@
|
|
|
71188
71213
|
return this._seriesField === WaterfallDefaultSeriesField ? [this._theme.seriesFieldName.increase, this._theme.seriesFieldName.decrease, this._theme.seriesFieldName.total] : super.getSeriesKeys();
|
|
71189
71214
|
}
|
|
71190
71215
|
initData() {
|
|
71191
|
-
var _a
|
|
71216
|
+
var _a;
|
|
71192
71217
|
super.initData(), registerDataSetInstanceTransform(this._dataSet, "waterfallFillTotal", waterfallFillTotal), registerDataSetInstanceTransform(this._dataSet, "waterfall", waterfall$1), (isNil$1(this._spec.total) || "end" === this._spec.total.type) && (null === (_a = this._rawData) || void 0 === _a || _a.transform({
|
|
71193
71218
|
type: "waterfallFillTotal",
|
|
71194
|
-
options: {
|
|
71195
|
-
|
|
71196
|
-
|
|
71197
|
-
|
|
71198
|
-
|
|
71199
|
-
|
|
71200
|
-
|
|
71201
|
-
|
|
71219
|
+
options: () => {
|
|
71220
|
+
var _a;
|
|
71221
|
+
return {
|
|
71222
|
+
indexField: this.getGroupFields()[0],
|
|
71223
|
+
valueField: this.getStackValueField(),
|
|
71224
|
+
seriesField: this.getSeriesField(),
|
|
71225
|
+
seriesFieldName: this._theme.seriesFieldName,
|
|
71226
|
+
total: this._spec.total,
|
|
71227
|
+
calculationMode: null !== (_a = this._spec.calculationMode) && void 0 !== _a ? _a : "increase",
|
|
71228
|
+
stackInverse: this.getRegion().getStackInverse()
|
|
71229
|
+
};
|
|
71202
71230
|
}
|
|
71203
71231
|
}, !1));
|
|
71204
71232
|
const totalData = dataViewFromDataView(this.getViewData(), this._dataSet, {
|
|
@@ -71206,17 +71234,20 @@
|
|
|
71206
71234
|
});
|
|
71207
71235
|
this.getViewData().target.removeListener("change", totalData.reRunAllTransform), this._totalData = new CompilableData(this._option, totalData), totalData.transform({
|
|
71208
71236
|
type: "waterfall",
|
|
71209
|
-
options: {
|
|
71210
|
-
|
|
71211
|
-
|
|
71212
|
-
|
|
71213
|
-
|
|
71214
|
-
|
|
71215
|
-
|
|
71216
|
-
|
|
71217
|
-
|
|
71218
|
-
|
|
71219
|
-
|
|
71237
|
+
options: () => {
|
|
71238
|
+
var _a;
|
|
71239
|
+
return {
|
|
71240
|
+
indexField: this.getGroupFields()[0],
|
|
71241
|
+
valueField: this.getStackValueField(),
|
|
71242
|
+
seriesField: this.getSeriesField(),
|
|
71243
|
+
seriesFieldName: this._theme.seriesFieldName,
|
|
71244
|
+
startAs: STACK_FIELD_START,
|
|
71245
|
+
endAs: STACK_FIELD_END,
|
|
71246
|
+
total: this._spec.total,
|
|
71247
|
+
calculationMode: null !== (_a = this._spec.calculationMode) && void 0 !== _a ? _a : "increase",
|
|
71248
|
+
groupData: () => this.getGroups().groupData,
|
|
71249
|
+
stackInverse: this.getRegion().getStackInverse()
|
|
71250
|
+
};
|
|
71220
71251
|
}
|
|
71221
71252
|
}, !1), totalData.target.addListener("change", this._reStackTotal);
|
|
71222
71253
|
}
|
|
@@ -71341,14 +71372,16 @@
|
|
|
71341
71372
|
|
|
71342
71373
|
const foldOutlierData = (data, op) => {
|
|
71343
71374
|
const result = [],
|
|
71375
|
+
options = isFunction$1(op) ? op() : op,
|
|
71344
71376
|
{
|
|
71345
71377
|
outliersField: outliersField,
|
|
71346
71378
|
dimensionField: dimensionField,
|
|
71347
71379
|
seriesField: seriesField
|
|
71348
|
-
} =
|
|
71380
|
+
} = options;
|
|
71349
71381
|
return (data[0].latestData || []).forEach(d => {
|
|
71350
|
-
|
|
71351
|
-
|
|
71382
|
+
const rawOutlierValues = d[outliersField],
|
|
71383
|
+
outlierValues = isArray$1(rawOutlierValues) ? rawOutlierValues : [rawOutlierValues];
|
|
71384
|
+
result.push(...outlierValues.map(v => {
|
|
71352
71385
|
const resData = {
|
|
71353
71386
|
[BOX_PLOT_OUTLIER_VALUE_FIELD]: v
|
|
71354
71387
|
};
|
|
@@ -72154,11 +72187,11 @@
|
|
|
72154
72187
|
type: "dataview"
|
|
72155
72188
|
}), outlierDataView.name = `${PREFIX}_series_${this.id}_outlierData`, outlierDataView.transform({
|
|
72156
72189
|
type: "foldOutlierData",
|
|
72157
|
-
options: {
|
|
72190
|
+
options: () => ({
|
|
72158
72191
|
dimensionField: "horizontal" === this._direction ? this._fieldY : this._fieldX,
|
|
72159
72192
|
outliersField: this._outliersField,
|
|
72160
72193
|
seriesField: this._seriesField
|
|
72161
|
-
}
|
|
72194
|
+
})
|
|
72162
72195
|
}), outlierDataView.transform({
|
|
72163
72196
|
type: "addVChartProperty",
|
|
72164
72197
|
options: {
|
|
@@ -73394,7 +73427,22 @@
|
|
|
73394
73427
|
}));
|
|
73395
73428
|
};
|
|
73396
73429
|
|
|
73430
|
+
const ROSE_LIKE_SERIES_COMPILE_ONLY_KEYS = {
|
|
73431
|
+
radius: !0,
|
|
73432
|
+
outerRadius: !0,
|
|
73433
|
+
innerRadius: !0,
|
|
73434
|
+
startAngle: !0,
|
|
73435
|
+
endAngle: !0,
|
|
73436
|
+
centerX: !0,
|
|
73437
|
+
centerY: !0
|
|
73438
|
+
};
|
|
73397
73439
|
class RoseLikeSeries extends PolarSeries {
|
|
73440
|
+
_getSpecUpdatePolicy() {
|
|
73441
|
+
const policy = super._getSpecUpdatePolicy();
|
|
73442
|
+
return Object.assign(Object.assign({}, policy), {
|
|
73443
|
+
compileOnlyKeys: Object.assign(Object.assign({}, policy.compileOnlyKeys), ROSE_LIKE_SERIES_COMPILE_ONLY_KEYS)
|
|
73444
|
+
});
|
|
73445
|
+
}
|
|
73398
73446
|
getStackGroupFields() {
|
|
73399
73447
|
return this._angleField;
|
|
73400
73448
|
}
|
|
@@ -73784,7 +73832,10 @@
|
|
|
73784
73832
|
super(...arguments), this.type = ComponentTypeEnum.polarLinearAxis, this._zero = !0, this._nice = !0, this._extend = {}, this._scale = new LinearScale();
|
|
73785
73833
|
}
|
|
73786
73834
|
setAttrFromSpec() {
|
|
73835
|
+
var _a, _b;
|
|
73787
73836
|
super.setAttrFromSpec(), this.setExtraAttrFromSpec();
|
|
73837
|
+
const tickTransform = null === (_b = null === (_a = this._tickData) || void 0 === _a ? void 0 : _a[0]) || void 0 === _b ? void 0 : _b.getDataView().transformsArr.find(t => t.type === this.registerTicksTransform());
|
|
73838
|
+
tickTransform && (tickTransform.options = this._tickTransformOption());
|
|
73788
73839
|
}
|
|
73789
73840
|
initScales() {
|
|
73790
73841
|
super.initScales(), this.setScaleNice();
|
|
@@ -73831,6 +73882,9 @@
|
|
|
73831
73882
|
initScales() {
|
|
73832
73883
|
super.initScales(), this.calcScales(this._defaultBandInnerPadding, this._defaultBandOuterPadding);
|
|
73833
73884
|
}
|
|
73885
|
+
reInit(spec) {
|
|
73886
|
+
super.reInit(spec), this._updateData();
|
|
73887
|
+
}
|
|
73834
73888
|
registerTicksTransform() {
|
|
73835
73889
|
const name = `${this.type}-ticks`;
|
|
73836
73890
|
return registerDataSetInstanceTransform(this._option.dataSet, name, polarAngleAxisDiscreteTicks), name;
|
|
@@ -74428,6 +74482,16 @@
|
|
|
74428
74482
|
}
|
|
74429
74483
|
};
|
|
74430
74484
|
|
|
74485
|
+
const DOT_SERIES_COMPILE_ONLY_KEYS = {
|
|
74486
|
+
highLightSeriesGroup: !0,
|
|
74487
|
+
titleField: !0,
|
|
74488
|
+
subTitleField: !0
|
|
74489
|
+
},
|
|
74490
|
+
DOT_SERIES_COMPILE_ONLY_SUB_KEYS = {
|
|
74491
|
+
grid: {
|
|
74492
|
+
background: !0
|
|
74493
|
+
}
|
|
74494
|
+
};
|
|
74431
74495
|
class DotSeries extends CartesianSeries {
|
|
74432
74496
|
constructor() {
|
|
74433
74497
|
super(...arguments), this.type = SeriesTypeEnum.dot;
|
|
@@ -74465,6 +74529,13 @@
|
|
|
74465
74529
|
setGridBackground(gridBackground) {
|
|
74466
74530
|
isValid$1(gridBackground) && (this._gridBackground = gridBackground);
|
|
74467
74531
|
}
|
|
74532
|
+
_getSpecUpdatePolicy() {
|
|
74533
|
+
const policy = super._getSpecUpdatePolicy();
|
|
74534
|
+
return Object.assign(Object.assign({}, policy), {
|
|
74535
|
+
compileOnlyKeys: Object.assign(Object.assign({}, policy.compileOnlyKeys), DOT_SERIES_COMPILE_ONLY_KEYS),
|
|
74536
|
+
compileOnlySubKeys: Object.assign(Object.assign({}, policy.compileOnlySubKeys), DOT_SERIES_COMPILE_ONLY_SUB_KEYS)
|
|
74537
|
+
});
|
|
74538
|
+
}
|
|
74468
74539
|
initData() {
|
|
74469
74540
|
var _a;
|
|
74470
74541
|
super.initData(), this._xDimensionStatisticsDomain = this.getRawData().latestData.map(d => d[this._fieldY[0]]), registerDataSetInstanceTransform(this._option.dataSet, "objFlat", objFlat), registerDataSetInstanceTransform(this._option.dataSet, "copyDataView", copyDataView), registerDataSetInstanceParser(this._option.dataSet, "dataview", dataViewParser), null === (_a = this.getViewData()) || void 0 === _a || _a.transform({
|
|
@@ -74972,6 +75043,16 @@
|
|
|
74972
75043
|
}
|
|
74973
75044
|
});
|
|
74974
75045
|
|
|
75046
|
+
const PROGRESS_LIKE_SERIES_COMPILE_ONLY_KEYS = {
|
|
75047
|
+
radius: !0,
|
|
75048
|
+
outerRadius: !0,
|
|
75049
|
+
innerRadius: !0,
|
|
75050
|
+
startAngle: !0,
|
|
75051
|
+
endAngle: !0,
|
|
75052
|
+
centerX: !0,
|
|
75053
|
+
centerY: !0,
|
|
75054
|
+
clamp: !0
|
|
75055
|
+
};
|
|
74975
75056
|
class ProgressLikeSeries extends PolarSeries {
|
|
74976
75057
|
constructor() {
|
|
74977
75058
|
super(...arguments), this._arcGroupMark = null, this._getAngleValueStart = datum => {
|
|
@@ -75011,6 +75092,12 @@
|
|
|
75011
75092
|
return this._getAngleValueEndWithoutMask(datum);
|
|
75012
75093
|
};
|
|
75013
75094
|
}
|
|
75095
|
+
_getSpecUpdatePolicy() {
|
|
75096
|
+
const policy = super._getSpecUpdatePolicy();
|
|
75097
|
+
return Object.assign(Object.assign({}, policy), {
|
|
75098
|
+
compileOnlyKeys: Object.assign(Object.assign({}, policy.compileOnlyKeys), PROGRESS_LIKE_SERIES_COMPILE_ONLY_KEYS)
|
|
75099
|
+
});
|
|
75100
|
+
}
|
|
75014
75101
|
setAttrFromSpec() {
|
|
75015
75102
|
var _a, _b, _c;
|
|
75016
75103
|
super.setAttrFromSpec();
|
|
@@ -75242,7 +75329,8 @@
|
|
|
75242
75329
|
};
|
|
75243
75330
|
|
|
75244
75331
|
const CIRCULAR_PROGRESS_SERIES_COMPILE_ONLY_KEYS = {
|
|
75245
|
-
cornerRadius: !0
|
|
75332
|
+
cornerRadius: !0,
|
|
75333
|
+
roundCap: !0
|
|
75246
75334
|
};
|
|
75247
75335
|
class CircularProgressSeries extends ProgressLikeSeries {
|
|
75248
75336
|
constructor() {
|
|
@@ -75438,7 +75526,9 @@
|
|
|
75438
75526
|
};
|
|
75439
75527
|
|
|
75440
75528
|
const LINEAR_PROGRESS_SERIES_COMPILE_ONLY_KEYS = {
|
|
75441
|
-
bandWidth: !0
|
|
75529
|
+
bandWidth: !0,
|
|
75530
|
+
cornerRadius: !0,
|
|
75531
|
+
clamp: !0
|
|
75442
75532
|
},
|
|
75443
75533
|
LINEAR_PROGRESS_SERIES_COMPILE_ONLY_SUB_KEYS = {
|
|
75444
75534
|
progress: {
|
|
@@ -80168,12 +80258,12 @@
|
|
|
80168
80258
|
}), registerTextMark(), registerWordCloudAnimation(), Factory.registerSeries(WordCloudSeries.type, WordCloudSeries);
|
|
80169
80259
|
};
|
|
80170
80260
|
|
|
80261
|
+
const resolveOptionValue$2 = option => isFunction$1(option) ? option() : option;
|
|
80171
80262
|
const funnel = (originData, op) => {
|
|
80172
|
-
var _a, _b;
|
|
80263
|
+
var _a, _b, _c, _d;
|
|
80173
80264
|
const data = originData.map(datum => Object.assign({}, datum));
|
|
80174
80265
|
if (!data || 0 === data.length) return data;
|
|
80175
80266
|
const {
|
|
80176
|
-
valueField: valueField,
|
|
80177
80267
|
asTransformRatio: asTransformRatio,
|
|
80178
80268
|
asReachRatio: asReachRatio,
|
|
80179
80269
|
asHeightRatio: asHeightRatio,
|
|
@@ -80182,14 +80272,15 @@
|
|
|
80182
80272
|
asLastValueRatio: asLastValueRatio,
|
|
80183
80273
|
asLastValue: asLastValue,
|
|
80184
80274
|
asCurrentValue: asCurrentValue,
|
|
80185
|
-
asNextValue: asNextValue
|
|
80186
|
-
heightVisual = !1,
|
|
80187
|
-
isCone = !0,
|
|
80188
|
-
range: range
|
|
80275
|
+
asNextValue: asNextValue
|
|
80189
80276
|
} = op,
|
|
80277
|
+
valueField = resolveOptionValue$2(op.valueField),
|
|
80278
|
+
heightVisual = null !== (_a = resolveOptionValue$2(op.heightVisual)) && void 0 !== _a && _a,
|
|
80279
|
+
isCone = null === (_b = resolveOptionValue$2(op.isCone)) || void 0 === _b || _b,
|
|
80280
|
+
range = resolveOptionValue$2(op.range),
|
|
80190
80281
|
max = data.reduce((m, d) => Math.max(m, Number.parseFloat(d[valueField]) || -1 / 0), -1 / 0),
|
|
80191
80282
|
min = data.reduce((m, d) => Math.min(m, Number.parseFloat(d[valueField]) || 1 / 0), 1 / 0),
|
|
80192
|
-
rangeArr = [null !== (
|
|
80283
|
+
rangeArr = [null !== (_c = null == range ? void 0 : range.min) && void 0 !== _c ? _c : min, null !== (_d = null == range ? void 0 : range.max) && void 0 !== _d ? _d : max];
|
|
80193
80284
|
return data.forEach((d, i) => {
|
|
80194
80285
|
var _a, _b;
|
|
80195
80286
|
const currentValue = Number.parseFloat(d[valueField]),
|
|
@@ -80354,12 +80445,12 @@
|
|
|
80354
80445
|
}), fields;
|
|
80355
80446
|
}
|
|
80356
80447
|
_statisticViewData() {
|
|
80357
|
-
var _a
|
|
80448
|
+
var _a;
|
|
80358
80449
|
super._statisticViewData(), this._data.getDataView().transform({
|
|
80359
80450
|
type: "funnel",
|
|
80360
80451
|
options: {
|
|
80361
|
-
valueField: this.getValueField(),
|
|
80362
|
-
isCone: this._spec.isCone,
|
|
80452
|
+
valueField: () => this.getValueField(),
|
|
80453
|
+
isCone: () => this._spec.isCone,
|
|
80363
80454
|
asCurrentValue: FUNNEL_CURRENT_VALUE,
|
|
80364
80455
|
asTransformRatio: FUNNEL_TRANSFORM_RATIO,
|
|
80365
80456
|
asReachRatio: FUNNEL_REACH_RATIO,
|
|
@@ -80369,12 +80460,9 @@
|
|
|
80369
80460
|
asLastValueRatio: FUNNEL_LAST_VALUE_RATIO,
|
|
80370
80461
|
asLastValue: FUNNEL_LAST_VALUE,
|
|
80371
80462
|
asNextValue: FUNNEL_NEXT_VALUE,
|
|
80372
|
-
range:
|
|
80373
|
-
min: null !== (_b = null === (_a = this._spec.range) || void 0 === _a ? void 0 : _a.min) && void 0 !== _b ? _b : null === (_d = null === (_c = this.getViewDataStatistics().latestData) || void 0 === _c ? void 0 : _c[this.getValueField()]) || void 0 === _d ? void 0 : _d.min,
|
|
80374
|
-
max: null !== (_f = null === (_e = this._spec.range) || void 0 === _e ? void 0 : _e.max) && void 0 !== _f ? _f : null === (_h = null === (_g = this.getViewDataStatistics().latestData) || void 0 === _g ? void 0 : _g[this.getValueField()]) || void 0 === _h ? void 0 : _h.max
|
|
80375
|
-
}
|
|
80463
|
+
range: () => this._spec.range
|
|
80376
80464
|
}
|
|
80377
|
-
}), null === (
|
|
80465
|
+
}), null === (_a = this._viewDataTransform.getDataView()) || void 0 === _a || _a.transform({
|
|
80378
80466
|
type: "funnelTransform",
|
|
80379
80467
|
options: {
|
|
80380
80468
|
asIsTransformLevel: FUNNEL_TRANSFORM_LEVEL
|
|
@@ -81602,21 +81690,27 @@
|
|
|
81602
81690
|
return (null === (_a = data[0]) || void 0 === _a ? void 0 : _a.latestData) ? data[0].latestData : data;
|
|
81603
81691
|
};
|
|
81604
81692
|
const sankeyLayout = (data, op) => {
|
|
81605
|
-
|
|
81606
|
-
|
|
81693
|
+
const options = isFunction$1(op) ? op() : op;
|
|
81694
|
+
if (!data || !(null == options ? void 0 : options.view) || !data.length) return [];
|
|
81695
|
+
const view = options.view();
|
|
81607
81696
|
if (view.x1 - view.x0 == 0 || view.y1 - view.y0 == 0 || view.x1 - view.x0 == -1 / 0 || view.x1 - view.x0 == 1 / 0 || view.y1 - view.y0 == -1 / 0 || view.y1 - view.y0 == 1 / 0) return [];
|
|
81608
|
-
const originalData = data[0]
|
|
81609
|
-
|
|
81610
|
-
|
|
81611
|
-
originalData.links.forEach(datum => {
|
|
81612
|
-
const updatedDatum = {};
|
|
81613
|
-
for (const key in datum) key === op.sourceField ? updatedDatum.source = datum[op.sourceField] : key === op.targetField ? updatedDatum.target = datum[op.targetField] : key === op.valueField ? updatedDatum.value = datum[op.valueField] : updatedDatum[key] = datum[key];
|
|
81614
|
-
updatedData.push(updatedDatum);
|
|
81615
|
-
}), originalData.links = updatedData;
|
|
81616
|
-
}
|
|
81617
|
-
const layout = new SankeyLayout(op),
|
|
81697
|
+
const originalData = data[0],
|
|
81698
|
+
layoutData = normalizeSankeyData(originalData, options),
|
|
81699
|
+
layout = new SankeyLayout(options),
|
|
81618
81700
|
result = [];
|
|
81619
|
-
return result.push(layout.layout(
|
|
81701
|
+
return result.push(layout.layout(layoutData, view)), result;
|
|
81702
|
+
};
|
|
81703
|
+
const normalizeSankeyData = (data, options) => {
|
|
81704
|
+
if ("source" === options.sourceField && "target" === options.targetField && "value" === options.valueField) return data;
|
|
81705
|
+
const links = data.links;
|
|
81706
|
+
return links ? Object.assign(Object.assign({}, data), {
|
|
81707
|
+
links: links.map(link => {
|
|
81708
|
+
const updatedLink = {};
|
|
81709
|
+
return Object.keys(link).forEach(key => {
|
|
81710
|
+
key === options.sourceField ? updatedLink.source = link[options.sourceField] : key === options.targetField ? updatedLink.target = link[options.targetField] : key === options.valueField ? updatedLink.value = link[options.valueField] : updatedLink[key] = link[key];
|
|
81711
|
+
}), updatedLink;
|
|
81712
|
+
})
|
|
81713
|
+
}) : data;
|
|
81620
81714
|
};
|
|
81621
81715
|
|
|
81622
81716
|
const sankeyNodes = data => {
|
|
@@ -82110,7 +82204,6 @@
|
|
|
82110
82204
|
super.setAttrFromSpec(), this.setCategoryField(this._spec.categoryField), this.setValueField(this._spec.valueField), this.setSeriesField(null !== (_a = this._spec.seriesField) && void 0 !== _a ? _a : this._spec.categoryField);
|
|
82111
82205
|
}
|
|
82112
82206
|
initData() {
|
|
82113
|
-
var _a, _b, _c, _d;
|
|
82114
82207
|
super.initData();
|
|
82115
82208
|
const viewData = this.getViewData(),
|
|
82116
82209
|
rawData = this.getRawData();
|
|
@@ -82119,38 +82212,41 @@
|
|
|
82119
82212
|
type: "sankeyFormat"
|
|
82120
82213
|
}, !1), viewData.transform({
|
|
82121
82214
|
type: "sankeyLayout",
|
|
82122
|
-
options: {
|
|
82123
|
-
|
|
82124
|
-
|
|
82125
|
-
|
|
82126
|
-
|
|
82127
|
-
|
|
82128
|
-
|
|
82129
|
-
|
|
82130
|
-
|
|
82131
|
-
|
|
82132
|
-
|
|
82133
|
-
|
|
82134
|
-
|
|
82135
|
-
|
|
82136
|
-
|
|
82137
|
-
|
|
82138
|
-
|
|
82139
|
-
|
|
82140
|
-
|
|
82141
|
-
|
|
82142
|
-
|
|
82143
|
-
|
|
82144
|
-
|
|
82145
|
-
|
|
82146
|
-
|
|
82147
|
-
|
|
82148
|
-
|
|
82149
|
-
|
|
82150
|
-
|
|
82151
|
-
|
|
82152
|
-
|
|
82153
|
-
|
|
82215
|
+
options: () => {
|
|
82216
|
+
var _a, _b, _c, _d;
|
|
82217
|
+
return {
|
|
82218
|
+
view: () => ({
|
|
82219
|
+
x0: this._viewBox.x1,
|
|
82220
|
+
x1: this._viewBox.x2,
|
|
82221
|
+
y0: this._viewBox.y1,
|
|
82222
|
+
y1: this._viewBox.y2
|
|
82223
|
+
}),
|
|
82224
|
+
sourceField: this._spec.sourceField,
|
|
82225
|
+
targetField: this._spec.targetField,
|
|
82226
|
+
valueField: this._spec.valueField,
|
|
82227
|
+
direction: this.direction,
|
|
82228
|
+
crossNodeAlign: this._spec.crossNodeAlign,
|
|
82229
|
+
nodeAlign: null !== (_a = this._spec.nodeAlign) && void 0 !== _a ? _a : "justify",
|
|
82230
|
+
nodeGap: null !== (_b = this._spec.nodeGap) && void 0 !== _b ? _b : 8,
|
|
82231
|
+
nodeWidth: null !== (_c = this._spec.nodeWidth) && void 0 !== _c ? _c : 10,
|
|
82232
|
+
linkWidth: this._spec.linkWidth,
|
|
82233
|
+
minStepWidth: this._spec.minStepWidth,
|
|
82234
|
+
minNodeHeight: null !== (_d = this._spec.minNodeHeight) && void 0 !== _d ? _d : 4,
|
|
82235
|
+
maxNodeHeight: this._spec.maxNodeHeight,
|
|
82236
|
+
minLinkHeight: this._spec.minLinkHeight,
|
|
82237
|
+
maxLinkHeight: this._spec.maxLinkHeight,
|
|
82238
|
+
iterations: this._spec.iterations,
|
|
82239
|
+
nodeKey: this._spec.nodeKey,
|
|
82240
|
+
linkSortBy: this._spec.linkSortBy,
|
|
82241
|
+
nodeSortBy: this._spec.nodeSortBy,
|
|
82242
|
+
setNodeLayer: this._spec.setNodeLayer,
|
|
82243
|
+
dropIsolatedNode: this._spec.dropIsolatedNode,
|
|
82244
|
+
nodeHeight: this._spec.nodeHeight,
|
|
82245
|
+
linkHeight: this._spec.linkHeight,
|
|
82246
|
+
equalNodeHeight: this._spec.equalNodeHeight,
|
|
82247
|
+
linkOverlap: this._spec.linkOverlap,
|
|
82248
|
+
inverse: this._spec.inverse
|
|
82249
|
+
};
|
|
82154
82250
|
},
|
|
82155
82251
|
level: TransformLevel.sankeyLayout
|
|
82156
82252
|
});
|
|
@@ -82522,14 +82618,16 @@
|
|
|
82522
82618
|
};
|
|
82523
82619
|
|
|
82524
82620
|
const treemapLayout = (data, op) => {
|
|
82525
|
-
|
|
82526
|
-
|
|
82621
|
+
const options = isFunction$1(op) ? op() : op,
|
|
82622
|
+
viewBox = options.getViewBox();
|
|
82623
|
+
if (viewBox) {
|
|
82624
|
+
const res = new TreemapLayout(options).layout(data, viewBox),
|
|
82527
82625
|
nodes = [];
|
|
82528
82626
|
return flattenNodes(res, nodes, {
|
|
82529
|
-
maxDepth: null ==
|
|
82530
|
-
}), nodes.forEach(
|
|
82627
|
+
maxDepth: null == options ? void 0 : options.maxDepth
|
|
82628
|
+
}), nodes.forEach(datum => {
|
|
82531
82629
|
datum && [DEFAULT_HIERARCHY_ROOT, "name"].forEach(key => {
|
|
82532
|
-
datum[key] = datum.datum[datum.depth][
|
|
82630
|
+
datum[key] = datum.datum[datum.depth][options.nameField];
|
|
82533
82631
|
});
|
|
82534
82632
|
}), nodes;
|
|
82535
82633
|
}
|
|
@@ -82612,28 +82710,31 @@
|
|
|
82612
82710
|
}), isValidNumber$1(this._spec.maxDepth) && (this._maxDepth = this._spec.maxDepth - 1);
|
|
82613
82711
|
}
|
|
82614
82712
|
initData() {
|
|
82615
|
-
var _a
|
|
82713
|
+
var _a;
|
|
82616
82714
|
super.initData(), registerDataSetInstanceTransform(this._dataSet, "treemap", treemapLayout), null === (_a = this._data.getDataView()) || void 0 === _a || _a.transform({
|
|
82617
82715
|
type: "treemap",
|
|
82618
|
-
options: {
|
|
82619
|
-
|
|
82620
|
-
|
|
82621
|
-
|
|
82622
|
-
|
|
82623
|
-
|
|
82624
|
-
|
|
82625
|
-
|
|
82626
|
-
|
|
82627
|
-
|
|
82628
|
-
|
|
82629
|
-
|
|
82630
|
-
|
|
82631
|
-
|
|
82632
|
-
|
|
82633
|
-
|
|
82634
|
-
|
|
82635
|
-
|
|
82636
|
-
|
|
82716
|
+
options: () => {
|
|
82717
|
+
var _a, _b, _c, _d;
|
|
82718
|
+
return {
|
|
82719
|
+
nameField: this._categoryField,
|
|
82720
|
+
valueField: this._valueField,
|
|
82721
|
+
getViewBox: () => this._viewBox.empty() ? null : {
|
|
82722
|
+
x0: this._viewBox.x1,
|
|
82723
|
+
x1: this._viewBox.x2,
|
|
82724
|
+
y0: this._viewBox.y1,
|
|
82725
|
+
y1: this._viewBox.y2
|
|
82726
|
+
},
|
|
82727
|
+
maxDepth: this._maxDepth,
|
|
82728
|
+
gapWidth: this._spec.gapWidth,
|
|
82729
|
+
padding: this._spec.nodePadding,
|
|
82730
|
+
splitType: this._spec.splitType,
|
|
82731
|
+
aspectRatio: this._spec.aspectRatio,
|
|
82732
|
+
labelPadding: (null === (_a = this._spec.nonLeafLabel) || void 0 === _a ? void 0 : _a.visible) ? null === (_b = this._spec.nonLeafLabel) || void 0 === _b ? void 0 : _b.padding : 0,
|
|
82733
|
+
labelPosition: null === (_c = this._spec.nonLeafLabel) || void 0 === _c ? void 0 : _c.position,
|
|
82734
|
+
minVisibleArea: null !== (_d = this._spec.minVisibleArea) && void 0 !== _d ? _d : 10,
|
|
82735
|
+
minChildrenVisibleArea: this._spec.minChildrenVisibleArea,
|
|
82736
|
+
minChildrenVisibleSize: this._spec.minChildrenVisibleSize
|
|
82737
|
+
};
|
|
82637
82738
|
}
|
|
82638
82739
|
}), this.getViewData() && this._spec.drill && this.initDrillableData(this._dataSet);
|
|
82639
82740
|
}
|
|
@@ -83448,36 +83549,41 @@
|
|
|
83448
83549
|
const CORRELATION_Y = `${PREFIX}_CORRELATION_Y`;
|
|
83449
83550
|
const CORRELATION_SIZE = `${PREFIX}_CORRELATION_SIZE`;
|
|
83450
83551
|
|
|
83552
|
+
const resolveOptionValue$1 = option => isFunction$1(option) ? option() : option;
|
|
83451
83553
|
const correlation$1 = (data, options) => {
|
|
83452
|
-
var _a, _b, _c, _d, _e, _f, _g, _h
|
|
83554
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
83453
83555
|
if (!data || !(null == options ? void 0 : options.view) || !isArray$1(data)) return data;
|
|
83454
|
-
const
|
|
83556
|
+
const dataList = data,
|
|
83557
|
+
viewBox = options.view();
|
|
83455
83558
|
if (viewBox.x1 - viewBox.x0 == 0 || viewBox.y1 - viewBox.y0 == 0 || viewBox.x1 - viewBox.x0 == -1 / 0 || viewBox.x1 - viewBox.x0 == 1 / 0 || viewBox.y1 - viewBox.y0 == -1 / 0 || viewBox.y1 - viewBox.y0 == 1 / 0) return data;
|
|
83456
|
-
const startAngle = degreeToRadian(null !== (_a = options.startAngle) && void 0 !== _a ? _a : -90),
|
|
83457
|
-
endAngle = degreeToRadian(null !== (_b = options.endAngle) && void 0 !== _b ? _b : 270),
|
|
83559
|
+
const startAngle = degreeToRadian(null !== (_a = resolveOptionValue$1(options.startAngle)) && void 0 !== _a ? _a : -90),
|
|
83560
|
+
endAngle = degreeToRadian(null !== (_b = resolveOptionValue$1(options.endAngle)) && void 0 !== _b ? _b : 270),
|
|
83458
83561
|
maxRadius = Math.max((viewBox.x1 - viewBox.x0) / 2, (viewBox.y1 - viewBox.y0) / 2),
|
|
83459
|
-
innerRadius = toPercent(null !== (_c = options.innerRadius) && void 0 !== _c ? _c : 0, maxRadius),
|
|
83460
|
-
outerRadius = toPercent(options.outerRadius, maxRadius),
|
|
83461
|
-
|
|
83462
|
-
|
|
83463
|
-
|
|
83562
|
+
innerRadius = toPercent(null !== (_c = resolveOptionValue$1(options.innerRadius)) && void 0 !== _c ? _c : 0, maxRadius),
|
|
83563
|
+
outerRadius = toPercent(resolveOptionValue$1(options.outerRadius), maxRadius),
|
|
83564
|
+
centerOption = resolveOptionValue$1(options.center),
|
|
83565
|
+
center = [isNumber$2(null == centerOption ? void 0 : centerOption[0]) ? centerOption[0] : viewBox.x0 + toPercent(null !== (_d = null == centerOption ? void 0 : centerOption[0]) && void 0 !== _d ? _d : "50%", viewBox.x1 - viewBox.x0), isNumber$2(null == centerOption ? void 0 : centerOption[1]) ? centerOption[1] : viewBox.y0 + toPercent(null !== (_e = null == centerOption ? void 0 : centerOption[1]) && void 0 !== _e ? _e : "50%", viewBox.y1 - viewBox.y0)],
|
|
83566
|
+
fieldAccessor = field$2(resolveOptionValue$1(options.field)),
|
|
83567
|
+
values = dataList.map(fieldAccessor),
|
|
83464
83568
|
[min, max] = extent$2(values),
|
|
83465
83569
|
radiusScale = min === max ? val => (innerRadius + outerRadius) / 2 : val => innerRadius + (outerRadius - innerRadius) * (val - min) / (max - min),
|
|
83466
|
-
|
|
83467
|
-
|
|
83570
|
+
radiusField = resolveOptionValue$1(options.radiusField),
|
|
83571
|
+
radiusRange = resolveOptionValue$1(options.radiusRange),
|
|
83572
|
+
sizeAccessor = isNil$1(radiusField) ? fieldAccessor : field$2(radiusField),
|
|
83573
|
+
defaultSize = null !== (_f = null == radiusRange ? void 0 : radiusRange[1]) && void 0 !== _f ? _f : 5;
|
|
83468
83574
|
let sizeScale = datum => defaultSize;
|
|
83469
83575
|
if (sizeAccessor) {
|
|
83470
|
-
const [minSize, maxSize] = sizeAccessor !== fieldAccessor ? extent$2(
|
|
83471
|
-
minR = null !== (
|
|
83472
|
-
maxR = null !== (
|
|
83576
|
+
const [minSize, maxSize] = sizeAccessor !== fieldAccessor ? extent$2(dataList.map(sizeAccessor)) : [min, max],
|
|
83577
|
+
minR = null !== (_g = null == radiusRange ? void 0 : radiusRange[0]) && void 0 !== _g ? _g : 5,
|
|
83578
|
+
maxR = null !== (_h = null == radiusRange ? void 0 : radiusRange[1]) && void 0 !== _h ? _h : 5;
|
|
83473
83579
|
minSize !== maxSize && (sizeScale = datum => minR + (maxR - minR) * (sizeAccessor(datum) - minSize) / (maxSize - minSize));
|
|
83474
83580
|
}
|
|
83475
83581
|
const minAngle = Math.min(startAngle, endAngle),
|
|
83476
83582
|
maxAngle = Math.max(startAngle, endAngle),
|
|
83477
|
-
angles = getPartialAngles(minAngle, maxAngle,
|
|
83583
|
+
angles = getPartialAngles(minAngle, maxAngle, dataList.length),
|
|
83478
83584
|
res = [],
|
|
83479
83585
|
searchAngle = (maxAngle - minAngle) / 60;
|
|
83480
|
-
return
|
|
83586
|
+
return dataList.forEach((datum, index) => {
|
|
83481
83587
|
const radius = radiusScale(values[index]),
|
|
83482
83588
|
size = sizeScale(datum);
|
|
83483
83589
|
let x,
|
|
@@ -83508,14 +83614,18 @@
|
|
|
83508
83614
|
for (; i < count;) j < stepCount && (res.push(startAngle + (j % 2 ? Math.floor(j / 2) + Math.floor(stepCount / 2) : j / 2) * stepAngle * stepSign), j++), i++, j === stepCount && (j = 0, stepIndex += 1, stepSign *= -1, 0 === offsetAngle ? offsetAngle = stepAngle / 2 : offsetAngle /= 2, startAngle = -1 === stepSign ? maxAngle - offsetAngle : minAngle + offsetAngle, stepIndex >= 2 && (stepAngle /= 2, stepCount *= 2));
|
|
83509
83615
|
return res;
|
|
83510
83616
|
},
|
|
83511
|
-
hasOverlap = (item, arr) => !(!arr || !arr.length) && arr.some(entry =>
|
|
83617
|
+
hasOverlap = (item, arr) => !(!arr || !arr.length) && arr.some(entry => {
|
|
83618
|
+
const x = entry.x,
|
|
83619
|
+
y = entry.y,
|
|
83620
|
+
size = entry.size;
|
|
83621
|
+
return Math.pow(item.x - x, 2) + Math.pow(item.y - y, 2) < Math.pow(item.size + size, 2);
|
|
83622
|
+
});
|
|
83512
83623
|
|
|
83624
|
+
const resolveOptionValue = option => isFunction$1(option) ? option() : option;
|
|
83513
83625
|
const correlationCenter = (data, options) => {
|
|
83514
83626
|
if (!data || !isArray$1(data)) return [];
|
|
83515
|
-
const
|
|
83516
|
-
|
|
83517
|
-
categoryField: categoryField
|
|
83518
|
-
} = options,
|
|
83627
|
+
const keyword = resolveOptionValue(options.keyword),
|
|
83628
|
+
categoryField = resolveOptionValue(options.categoryField),
|
|
83519
83629
|
nodeInfo = data[0].latestData[0];
|
|
83520
83630
|
return {
|
|
83521
83631
|
[categoryField]: keyword,
|
|
@@ -83654,7 +83764,6 @@
|
|
|
83654
83764
|
super.setAttrFromSpec(), this.setCategoryField(this._spec.categoryField), this.setValueField(this._spec.valueField), this.setSeriesField(this._spec.seriesField), this.setSizeField(this._spec.sizeField), this.setSizeRange(this._spec.sizeRange);
|
|
83655
83765
|
}
|
|
83656
83766
|
initData() {
|
|
83657
|
-
var _a, _b, _c;
|
|
83658
83767
|
if (super.initData(), !this._data) return;
|
|
83659
83768
|
registerDataSetInstanceTransform(this._dataSet, "correlation", correlation$1);
|
|
83660
83769
|
const centerDataSet = new DataSet();
|
|
@@ -83667,8 +83776,11 @@
|
|
|
83667
83776
|
}), centerDataView.transform({
|
|
83668
83777
|
type: "correlationCenter",
|
|
83669
83778
|
options: {
|
|
83670
|
-
keyword:
|
|
83671
|
-
|
|
83779
|
+
keyword: () => {
|
|
83780
|
+
var _a, _b, _c;
|
|
83781
|
+
return null !== (_c = null === (_b = null === (_a = this._spec.centerLabel) || void 0 === _a ? void 0 : _a.style) || void 0 === _b ? void 0 : _b.text) && void 0 !== _c ? _c : "";
|
|
83782
|
+
},
|
|
83783
|
+
categoryField: () => this._spec.categoryField
|
|
83672
83784
|
}
|
|
83673
83785
|
}), this._centerSeriesData = new CompilableData(this._option, centerDataView);
|
|
83674
83786
|
}
|
|
@@ -83686,14 +83798,14 @@
|
|
|
83686
83798
|
y0: this._viewBox.y1,
|
|
83687
83799
|
y1: this._viewBox.y2
|
|
83688
83800
|
}),
|
|
83689
|
-
field: this._spec.valueField,
|
|
83690
|
-
radiusRange: this._spec.sizeRange,
|
|
83691
|
-
radiusField: this._spec.sizeField,
|
|
83692
|
-
center: [this._spec.centerX, this._spec.centerY],
|
|
83693
|
-
innerRadius: this._spec.innerRadius,
|
|
83694
|
-
outerRadius: this._spec.outerRadius,
|
|
83695
|
-
startAngle: this._spec.startAngle,
|
|
83696
|
-
endAngle: this._spec.endAngle
|
|
83801
|
+
field: () => this._spec.valueField,
|
|
83802
|
+
radiusRange: () => this._spec.sizeRange,
|
|
83803
|
+
radiusField: () => this._spec.sizeField,
|
|
83804
|
+
center: () => [this._spec.centerX, this._spec.centerY],
|
|
83805
|
+
innerRadius: () => this._spec.innerRadius,
|
|
83806
|
+
outerRadius: () => this._spec.outerRadius,
|
|
83807
|
+
startAngle: () => this._spec.startAngle,
|
|
83808
|
+
endAngle: () => this._spec.endAngle
|
|
83697
83809
|
}
|
|
83698
83810
|
});
|
|
83699
83811
|
}
|
|
@@ -84399,10 +84511,11 @@
|
|
|
84399
84511
|
}
|
|
84400
84512
|
|
|
84401
84513
|
const vennLayout = (data, op) => {
|
|
84402
|
-
const
|
|
84514
|
+
const options = isFunction$1(op) ? op() : op,
|
|
84515
|
+
viewBox = options.getViewBox();
|
|
84403
84516
|
return viewBox && (null == data ? void 0 : data.length) ? vennTransform(Object.assign({
|
|
84404
|
-
setField:
|
|
84405
|
-
valueField:
|
|
84517
|
+
setField: options.setField,
|
|
84518
|
+
valueField: options.valueField
|
|
84406
84519
|
}, viewBox), data) : [];
|
|
84407
84520
|
};
|
|
84408
84521
|
|
|
@@ -84486,7 +84599,7 @@
|
|
|
84486
84599
|
var _a;
|
|
84487
84600
|
super.initData(), registerDataSetInstanceTransform(this._dataSet, "venn", vennLayout), null === (_a = this._data.getDataView()) || void 0 === _a || _a.transform({
|
|
84488
84601
|
type: "venn",
|
|
84489
|
-
options: {
|
|
84602
|
+
options: () => ({
|
|
84490
84603
|
getViewBox: () => this._viewBox.empty() ? null : {
|
|
84491
84604
|
x0: this._viewBox.x1,
|
|
84492
84605
|
x1: this._viewBox.x2,
|
|
@@ -84495,7 +84608,7 @@
|
|
|
84495
84608
|
},
|
|
84496
84609
|
setField: this._categoryField,
|
|
84497
84610
|
valueField: this._valueField
|
|
84498
|
-
}
|
|
84611
|
+
})
|
|
84499
84612
|
});
|
|
84500
84613
|
}
|
|
84501
84614
|
compile() {
|
|
@@ -84798,7 +84911,7 @@
|
|
|
84798
84911
|
}), indicatorSpec;
|
|
84799
84912
|
}
|
|
84800
84913
|
_getDefaultSeriesSpec(spec, pickKeys) {
|
|
84801
|
-
return super._getDefaultSeriesSpec(spec, ["radius", "outerRadius", "innerRadius", "startAngle", "endAngle", "sortDataByAxis"], pickKeys);
|
|
84914
|
+
return super._getDefaultSeriesSpec(spec, ["radius", "outerRadius", "innerRadius", "startAngle", "endAngle", "centerX", "centerY", "sortDataByAxis"], pickKeys);
|
|
84802
84915
|
}
|
|
84803
84916
|
transformSpec(spec) {
|
|
84804
84917
|
super.transformSpec(spec), isArray$1(spec.dataZoom) && spec.dataZoom.length > 0 && spec.dataZoom.forEach(zoom => {
|
|
@@ -84812,7 +84925,7 @@
|
|
|
84812
84925
|
return !1;
|
|
84813
84926
|
}
|
|
84814
84927
|
_getDefaultSeriesSpec(spec) {
|
|
84815
|
-
const series = super._getDefaultSeriesSpec(spec, ["startAngle", "endAngle", "centerX", "centerY"]);
|
|
84928
|
+
const series = super._getDefaultSeriesSpec(spec, ["startAngle", "endAngle", "centerX", "centerY", "clamp"]);
|
|
84816
84929
|
return series.categoryField = spec.categoryField || spec.radiusField, series.valueField = spec.valueField || spec.angleField, series;
|
|
84817
84930
|
}
|
|
84818
84931
|
_transformProgressAxisSpec(spec, angleAxisDefaultSpec, radiusAxisDefaultSpec, angleAxisAppendSpec, radiusAxisAppendSpec) {
|
|
@@ -84891,7 +85004,7 @@
|
|
|
84891
85004
|
_getDefaultSeriesSpec(spec) {
|
|
84892
85005
|
var _a, _b, _c;
|
|
84893
85006
|
const series = super._getDefaultSeriesSpec(spec);
|
|
84894
|
-
return series.radius = null !== (_a = spec.radius) && void 0 !== _a ? _a : POLAR_DEFAULT_RADIUS, series.outerRadius = null !== (_b = spec.outerRadius) && void 0 !== _b ? _b : POLAR_DEFAULT_RADIUS, series.innerRadius = null !== (_c = spec.innerRadius) && void 0 !== _c ? _c : 0, series.stack = spec.stack, series.percent = spec.percent, series;
|
|
85007
|
+
return this._addSeriesRelatedSpecKeys(["radius", "outerRadius", "innerRadius"]), series.radius = null !== (_a = spec.radius) && void 0 !== _a ? _a : POLAR_DEFAULT_RADIUS, series.outerRadius = null !== (_b = spec.outerRadius) && void 0 !== _b ? _b : POLAR_DEFAULT_RADIUS, series.innerRadius = null !== (_c = spec.innerRadius) && void 0 !== _c ? _c : 0, series.stack = spec.stack, series.percent = spec.percent, series;
|
|
84895
85008
|
}
|
|
84896
85009
|
transformSpec(spec) {
|
|
84897
85010
|
var _a;
|
|
@@ -85016,7 +85129,7 @@
|
|
|
85016
85129
|
var _a, _b, _c, _d;
|
|
85017
85130
|
const series = super._getDefaultSeriesSpec(spec),
|
|
85018
85131
|
areaTheme = null === (_b = (_a = this._option).getTheme) || void 0 === _b ? void 0 : _b.call(_a, "series", "radar", "area");
|
|
85019
|
-
return series.line = spec.line, series.point = spec.point, series.stack = spec.stack, series.percent = spec.percent, series.area = mergeSpec({
|
|
85132
|
+
return this._addSeriesRelatedSpecKeys(["line", "point", "area"]), series.line = spec.line, series.point = spec.point, series.stack = spec.stack, series.percent = spec.percent, series.area = mergeSpec({
|
|
85020
85133
|
visible: null !== (_c = null == areaTheme ? void 0 : areaTheme.visible) && void 0 !== _c && _c
|
|
85021
85134
|
}, spec.area), series.seriesMark = null !== (_d = spec.seriesMark) && void 0 !== _d ? _d : "area", series.activePoint = spec.activePoint, series.pointDis = spec.pointDis, series.pointDisMul = spec.pointDisMul, series.markOverlap = spec.markOverlap, series;
|
|
85022
85135
|
}
|
|
@@ -85365,7 +85478,7 @@
|
|
|
85365
85478
|
_getDefaultSeriesSpec(spec) {
|
|
85366
85479
|
var _a, _b;
|
|
85367
85480
|
const series = super._getDefaultSeriesSpec(spec);
|
|
85368
|
-
return this._addSeriesRelatedSpecKeys(["cornerRadius"]), series.progress = spec.progress, series.track = spec.track, series.tickMask = spec.tickMask, series.cornerRadius = null !== (_a = spec.cornerRadius) && void 0 !== _a ? _a : 0, series.roundCap = null !== (_b = spec.roundCap) && void 0 !== _b && _b, series;
|
|
85481
|
+
return this._addSeriesRelatedSpecKeys(["cornerRadius", "progress", "track", "roundCap"]), series.progress = spec.progress, series.track = spec.track, series.tickMask = spec.tickMask, series.cornerRadius = null !== (_a = spec.cornerRadius) && void 0 !== _a ? _a : 0, series.roundCap = null !== (_b = spec.roundCap) && void 0 !== _b && _b, series;
|
|
85369
85482
|
}
|
|
85370
85483
|
transformSpec(spec) {
|
|
85371
85484
|
super.transformSpec(spec), this._transformProgressAxisSpec(spec, {
|
|
@@ -85396,7 +85509,7 @@
|
|
|
85396
85509
|
class GaugeChartSpecTransformer extends ProgressLikeChartSpecTransformer {
|
|
85397
85510
|
_getDefaultSeriesSpec(spec) {
|
|
85398
85511
|
const series = super._getDefaultSeriesSpec(spec);
|
|
85399
|
-
return series.radiusField = spec.radiusField, series.pin = spec.pin, series.pinBackground = spec.pinBackground, series.pointer = spec.pointer, series;
|
|
85512
|
+
return this._addSeriesRelatedSpecKeys(["pin", "pinBackground", "pointer"]), series.radiusField = spec.radiusField, series.pin = spec.pin, series.pinBackground = spec.pinBackground, series.pointer = spec.pointer, series;
|
|
85400
85513
|
}
|
|
85401
85514
|
_getDefaultCircularProgressSeriesSpec(spec) {
|
|
85402
85515
|
const series = super._getDefaultSeriesSpec(spec);
|
|
@@ -85516,7 +85629,7 @@
|
|
|
85516
85629
|
_getDefaultSeriesSpec(spec) {
|
|
85517
85630
|
var _a, _b;
|
|
85518
85631
|
const series = super._getDefaultSeriesSpec(spec, ["bandWidth", "progress", "track", "clamp"]);
|
|
85519
|
-
return series.direction = null !== (_a = spec.direction) && void 0 !== _a ? _a : "horizontal", series.cornerRadius = null !== (_b = spec.cornerRadius) && void 0 !== _b ? _b : 0, series;
|
|
85632
|
+
return series.direction = null !== (_a = spec.direction) && void 0 !== _a ? _a : "horizontal", this._addSeriesRelatedSpecKeys(["cornerRadius"]), series.cornerRadius = null !== (_b = spec.cornerRadius) && void 0 !== _b ? _b : 0, series;
|
|
85520
85633
|
}
|
|
85521
85634
|
transformSpec(spec) {
|
|
85522
85635
|
var _a, _b;
|
|
@@ -85764,7 +85877,7 @@
|
|
|
85764
85877
|
_getDefaultSeriesSpec(spec) {
|
|
85765
85878
|
var _a, _b;
|
|
85766
85879
|
const series = super._getDefaultSeriesSpec(spec);
|
|
85767
|
-
return series.area = spec.area, series.point = spec.point, series.line = spec.line, "horizontal" === spec.direction ? series.xField = null !== (_a = spec.xField) && void 0 !== _a ? _a : [spec.minField, spec.maxField] : series.yField = null !== (_b = spec.yField) && void 0 !== _b ? _b : [spec.minField, spec.maxField], series.stack = !1, series;
|
|
85880
|
+
return this._addSeriesRelatedSpecKeys(["area", "point", "line"]), series.area = spec.area, series.point = spec.point, series.line = spec.line, "horizontal" === spec.direction ? series.xField = null !== (_a = spec.xField) && void 0 !== _a ? _a : [spec.minField, spec.maxField] : series.yField = null !== (_b = spec.yField) && void 0 !== _b ? _b : [spec.minField, spec.maxField], series.stack = !1, series;
|
|
85768
85881
|
}
|
|
85769
85882
|
transformSpec(spec) {
|
|
85770
85883
|
super.transformSpec(spec), setDefaultCrosshairForCartesianChart(spec);
|
|
@@ -89838,7 +89951,7 @@
|
|
|
89838
89951
|
datum: datum,
|
|
89839
89952
|
title: title,
|
|
89840
89953
|
content: content
|
|
89841
|
-
} = op,
|
|
89954
|
+
} = isFunction$1(op) ? op() : op,
|
|
89842
89955
|
mappedData = [],
|
|
89843
89956
|
datumResult = datum.call(null);
|
|
89844
89957
|
return title.visible && mappedData.push({
|
|
@@ -89939,11 +90052,11 @@
|
|
|
89939
90052
|
});
|
|
89940
90053
|
displayData.transform({
|
|
89941
90054
|
type: "indicatorFilter",
|
|
89942
|
-
options: {
|
|
90055
|
+
options: () => ({
|
|
89943
90056
|
title: this._title,
|
|
89944
90057
|
content: this._content,
|
|
89945
90058
|
datum: () => this._activeDatum
|
|
89946
|
-
}
|
|
90059
|
+
})
|
|
89947
90060
|
}), displayData.target.addListener("change", this.updateDatum.bind(this)), this._displayData = new CompilableData(this._option, displayData);
|
|
89948
90061
|
}
|
|
89949
90062
|
updateLayoutAttribute() {
|