@visactor/react-vchart 2.1.0-alpha.4 → 2.1.0-alpha.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/index.js +324 -209
- package/build/index.min.js +3 -3
- package/cjs/charts/AreaChart.js +1 -1
- package/cjs/charts/Bar3dChart.js +1 -1
- package/cjs/charts/BarChart.js +1 -1
- package/cjs/charts/BaseChart.js +1 -1
- package/cjs/charts/BoxPlotChart.js +1 -1
- package/cjs/charts/CirclePackingChart.js +1 -1
- package/cjs/charts/CircularProgressChart.js +1 -1
- package/cjs/charts/CommonChart.js +1 -1
- package/cjs/charts/CorrelationChart.js +1 -1
- package/cjs/charts/Funnel3dChart.js +1 -1
- package/cjs/charts/FunnelChart.js +1 -1
- package/cjs/charts/GaugeChart.js +1 -1
- package/cjs/charts/HeatmapChart.js +1 -1
- package/cjs/charts/Histogram3dChart.js +1 -1
- package/cjs/charts/HistogramChart.js +1 -2
- package/cjs/charts/LineChart.js +1 -1
- package/cjs/charts/LinearProgressChart.js +1 -1
- package/cjs/charts/LiquidChart.js +1 -1
- package/cjs/charts/MapChart.js +1 -1
- package/cjs/charts/MosaicChart.js +1 -1
- package/cjs/charts/PictogramChart.js +1 -1
- package/cjs/charts/Pie3dChart.js +1 -1
- package/cjs/charts/PieChart.js +1 -1
- package/cjs/charts/RadarChart.js +1 -1
- package/cjs/charts/RangeAreaChart.js +1 -1
- package/cjs/charts/RangeColumn3dChart.js +1 -1
- package/cjs/charts/RangeColumnChart.js +1 -1
- package/cjs/charts/RoseChart.js +1 -1
- package/cjs/charts/SankeyChart.js +1 -1
- package/cjs/charts/ScatterChart.js +1 -1
- package/cjs/charts/SequenceChart.js +1 -2
- package/cjs/charts/SunburstChart.js +1 -1
- package/cjs/charts/TreemapChart.js +1 -1
- package/cjs/charts/VennChart.js +1 -1
- package/cjs/charts/WaterfallChart.js +1 -1
- package/cjs/charts/WordCloud3dChart.js +1 -1
- package/cjs/charts/WordCloudChart.js +1 -1
- package/cjs/components/MarkArea.js +1 -2
- package/cjs/components/MarkPoint.js +2 -1
- package/cjs/context/chart.js +1 -1
- package/cjs/context/stage.js +1 -1
- package/cjs/series/Area.js +1 -1
- package/cjs/series/Bar.js +1 -1
- package/cjs/series/Bar3d.js +1 -1
- package/cjs/series/BaseSeries.js +1 -1
- package/cjs/series/BoxPlot.js +1 -1
- package/cjs/series/CirclePacking.js +1 -1
- package/cjs/series/CircularProgress.js +1 -1
- package/cjs/series/Correlation.js +1 -1
- package/cjs/series/Dot.js +1 -1
- package/cjs/series/Funnel.js +1 -1
- package/cjs/series/Funnel3d.js +1 -1
- package/cjs/series/Gauge.js +2 -1
- package/cjs/series/GaugePointer.js +1 -1
- package/cjs/series/Heatmap.js +1 -1
- package/cjs/series/Line.js +1 -1
- package/cjs/series/LinearProgress.js +1 -1
- package/cjs/series/Link.js +1 -1
- package/cjs/series/Liquid.js +1 -1
- package/cjs/series/Map.js +1 -1
- package/cjs/series/Mosaic.js +1 -1
- package/cjs/series/Pictogram.js +1 -1
- package/cjs/series/Pie.js +1 -1
- package/cjs/series/Pie3d.js +1 -1
- package/cjs/series/Radar.js +1 -1
- package/cjs/series/RangeArea.js +1 -1
- package/cjs/series/RangeColumn.js +1 -1
- package/cjs/series/RangeColumn3d.js +1 -1
- package/cjs/series/Rose.js +2 -1
- package/cjs/series/Sankey.js +1 -1
- package/cjs/series/Scatter.js +1 -1
- package/cjs/series/Series.js +1 -1
- package/cjs/series/Sunburst.js +1 -1
- package/cjs/series/Treemap.js +1 -1
- package/cjs/series/Venn.js +1 -1
- package/cjs/series/Waterfall.js +1 -1
- package/esm/charts/AreaChart.js +1 -1
- package/esm/charts/Bar3dChart.js +1 -1
- package/esm/charts/BarChart.js +1 -1
- package/esm/charts/BaseChart.js +1 -1
- package/esm/charts/BoxPlotChart.js +1 -1
- package/esm/charts/CirclePackingChart.js +1 -1
- package/esm/charts/CircularProgressChart.js +1 -1
- package/esm/charts/CommonChart.js +1 -1
- package/esm/charts/CorrelationChart.js +1 -1
- package/esm/charts/Funnel3dChart.js +1 -1
- package/esm/charts/FunnelChart.js +1 -1
- package/esm/charts/GaugeChart.js +1 -1
- package/esm/charts/HeatmapChart.js +1 -1
- package/esm/charts/Histogram3dChart.js +1 -1
- package/esm/charts/HistogramChart.js +1 -2
- package/esm/charts/LineChart.js +1 -1
- package/esm/charts/LinearProgressChart.js +1 -1
- package/esm/charts/LiquidChart.js +1 -1
- package/esm/charts/MapChart.js +1 -1
- package/esm/charts/MosaicChart.js +1 -1
- package/esm/charts/PictogramChart.js +1 -1
- package/esm/charts/Pie3dChart.js +1 -1
- package/esm/charts/PieChart.js +1 -1
- package/esm/charts/RadarChart.js +1 -1
- package/esm/charts/RangeAreaChart.js +1 -1
- package/esm/charts/RangeColumn3dChart.js +1 -1
- package/esm/charts/RangeColumnChart.js +1 -1
- package/esm/charts/RoseChart.js +1 -1
- package/esm/charts/SankeyChart.js +1 -1
- package/esm/charts/ScatterChart.js +1 -1
- package/esm/charts/SequenceChart.js +1 -2
- package/esm/charts/SunburstChart.js +1 -1
- package/esm/charts/TreemapChart.js +1 -1
- package/esm/charts/VennChart.js +1 -1
- package/esm/charts/WaterfallChart.js +1 -1
- package/esm/charts/WordCloud3dChart.js +1 -1
- package/esm/charts/WordCloudChart.js +1 -1
- package/esm/components/MarkArea.js +1 -2
- package/esm/components/MarkPoint.js +2 -1
- package/esm/context/chart.js +1 -1
- package/esm/context/stage.js +1 -1
- package/esm/series/Area.js +1 -1
- package/esm/series/Bar.js +1 -1
- package/esm/series/Bar3d.js +1 -1
- package/esm/series/BaseSeries.js +1 -1
- package/esm/series/BoxPlot.js +1 -1
- package/esm/series/CirclePacking.js +1 -1
- package/esm/series/CircularProgress.js +1 -1
- package/esm/series/Correlation.js +1 -1
- package/esm/series/Dot.js +1 -1
- package/esm/series/Funnel.js +1 -1
- package/esm/series/Funnel3d.js +1 -1
- package/esm/series/Gauge.js +2 -1
- package/esm/series/GaugePointer.js +1 -1
- package/esm/series/Heatmap.js +1 -1
- package/esm/series/Line.js +1 -1
- package/esm/series/LinearProgress.js +1 -1
- package/esm/series/Link.js +1 -1
- package/esm/series/Liquid.js +1 -1
- package/esm/series/Map.js +1 -1
- package/esm/series/Mosaic.js +1 -1
- package/esm/series/Pictogram.js +1 -1
- package/esm/series/Pie.js +1 -1
- package/esm/series/Pie3d.js +1 -1
- package/esm/series/Radar.js +1 -1
- package/esm/series/RangeArea.js +1 -1
- package/esm/series/RangeColumn.js +1 -1
- package/esm/series/RangeColumn3d.js +1 -1
- package/esm/series/Rose.js +2 -1
- package/esm/series/Sankey.js +1 -1
- package/esm/series/Scatter.js +1 -1
- package/esm/series/Series.js +1 -1
- package/esm/series/Sunburst.js +1 -1
- package/esm/series/Treemap.js +1 -1
- package/esm/series/Venn.js +1 -1
- package/esm/series/Waterfall.js +1 -1
- package/package.json +5 -5
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({
|
|
@@ -55847,11 +55853,13 @@
|
|
|
55847
55853
|
}
|
|
55848
55854
|
renderMarks() {
|
|
55849
55855
|
var _a;
|
|
55850
|
-
|
|
55856
|
+
let hasCommitedMark = this._hasCommitedMark();
|
|
55857
|
+
const needsLayout = this._layoutState === LayoutState.before;
|
|
55858
|
+
(hasCommitedMark || needsLayout) && (log(`--- start of renderMarks(${this._count}) ---`), this.clearProgressive(), hasCommitedMark && this._rootMarks.forEach(mark => {
|
|
55851
55859
|
mark.render();
|
|
55852
|
-
}),
|
|
55860
|
+
}), needsLayout && (this._layoutState = LayoutState.layouting, null === (_a = this._compileChart) || void 0 === _a || _a.onLayout(), this._layoutState = LayoutState.reevaluate, hasCommitedMark = this._hasCommitedMark(), hasCommitedMark && this._rootMarks.forEach(mark => {
|
|
55853
55861
|
mark.render();
|
|
55854
|
-
}), this.handleLayoutEnd()), this.findProgressiveMarks(), this.updateStateAnimation(), this._doRender(!0), this.doPreProgressive(), log(`--- start of renderMarks(${this._count}) ---`), this._count++);
|
|
55862
|
+
}), this.handleLayoutEnd()), hasCommitedMark && (this.findProgressiveMarks(), this.updateStateAnimation()), this._doRender(!0), hasCommitedMark && this.doPreProgressive(), log(`--- start of renderMarks(${this._count}) ---`), this._count++);
|
|
55855
55863
|
}
|
|
55856
55864
|
reuseOrMorphing(morphConfig = {}) {
|
|
55857
55865
|
const {
|
|
@@ -60612,27 +60620,30 @@
|
|
|
60612
60620
|
};
|
|
60613
60621
|
|
|
60614
60622
|
const lookup = (data, opt) => {
|
|
60615
|
-
|
|
60616
|
-
const
|
|
60617
|
-
|
|
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,
|
|
60618
60629
|
values = opt.values,
|
|
60619
60630
|
defaultValue = opt.default,
|
|
60620
60631
|
as = opt.as || [fields],
|
|
60621
|
-
index =
|
|
60622
|
-
return obj[fields] && map.set(obj[fields]
|
|
60632
|
+
index = fromData.reduce(function (map, obj) {
|
|
60633
|
+
return obj[fields] && map.set(`${obj[fields]}`, obj), map;
|
|
60623
60634
|
}, new Map());
|
|
60624
60635
|
let set;
|
|
60625
60636
|
if (isFunction$1(opt.set)) set = function (d) {
|
|
60626
|
-
const v = index.get(d[key]);
|
|
60637
|
+
const v = index.get(`${d[key]}`);
|
|
60627
60638
|
opt.set(d, v);
|
|
60628
60639
|
};else if (values) {
|
|
60629
60640
|
const m = values.length;
|
|
60630
60641
|
set = function (d) {
|
|
60631
|
-
const v = index.get(d[key]);
|
|
60642
|
+
const v = index.get(`${d[key]}`);
|
|
60632
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]];
|
|
60633
60644
|
};
|
|
60634
60645
|
} else set = function (d) {
|
|
60635
|
-
const v = index.get(d[key]);
|
|
60646
|
+
const v = index.get(`${d[key]}`);
|
|
60636
60647
|
d[as[0]] = isValid$1(v) ? v : defaultValue;
|
|
60637
60648
|
};
|
|
60638
60649
|
return 0 === data.length ? [] : data.map(d => (set(d), d));
|
|
@@ -61510,9 +61521,9 @@
|
|
|
61510
61521
|
type: "dataview"
|
|
61511
61522
|
}), this._viewStackData.transform({
|
|
61512
61523
|
type: "stackSplit",
|
|
61513
|
-
options: {
|
|
61524
|
+
options: () => ({
|
|
61514
61525
|
fields: this.getStackGroupFields()
|
|
61515
|
-
}
|
|
61526
|
+
})
|
|
61516
61527
|
}, !1);
|
|
61517
61528
|
}
|
|
61518
61529
|
_noAnimationDataKey(datum, index) {
|
|
@@ -66747,7 +66758,8 @@
|
|
|
66747
66758
|
const oldSpec = this._spec,
|
|
66748
66759
|
onlyMarkerComponentsRemoved = this._isOnlyMarkerComponentsRemoved(this._spec, spec, currentKeys),
|
|
66749
66760
|
onlyComponentSpecsChanged = this._isOnlyComponentSpecsChanged(this._spec, spec, currentKeys),
|
|
66750
|
-
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);
|
|
66751
66763
|
if (this._spec = spec, onlyMarkerComponentsRemoved) return this._removeMarkerComponentsForEmptySpecs(result), result;
|
|
66752
66764
|
if (this.updateChartConfig(result, oldSpec), result.reMake) return this.setLayoutTag(!0, null, !1), result;
|
|
66753
66765
|
if (this.updateGlobalScale(result), result.reMake) return this.setLayoutTag(!0, null, !1), result;
|
|
@@ -66755,7 +66767,7 @@
|
|
|
66755
66767
|
const componentUpdateResult = this.updateComponentSpec(result);
|
|
66756
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 => {
|
|
66757
66769
|
component.reInit(component.getSpec());
|
|
66758
|
-
}), (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));
|
|
66759
66771
|
}
|
|
66760
66772
|
updateChartConfig(result, oldSpec) {
|
|
66761
66773
|
var _a, _b;
|
|
@@ -66856,6 +66868,15 @@
|
|
|
66856
66868
|
onlySeriesSpecChange = specKeys.every(key => !!isEqual(currentSpecRecord[key], nextSpecRecord[key]) || !!seriesRelatedSpecKeys[key] && (hasSeriesSpecChange = !0, !0));
|
|
66857
66869
|
return hasSeriesSpecChange && onlySeriesSpecChange;
|
|
66858
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
|
+
}
|
|
66859
66880
|
_canSkipChartDataStages(result) {
|
|
66860
66881
|
const effects = result.effects;
|
|
66861
66882
|
return !(!(null == effects ? void 0 : effects.series) || effects.remake || effects.data || effects.scaleDomain || result.reMake);
|
|
@@ -67491,7 +67512,7 @@
|
|
|
67491
67512
|
},
|
|
67492
67513
|
{
|
|
67493
67514
|
fields: fields
|
|
67494
|
-
} = op;
|
|
67515
|
+
} = isFunction$1(op) ? op() : op;
|
|
67495
67516
|
if (!(null == fields ? void 0 : fields.length)) return result;
|
|
67496
67517
|
const lastFieldIndex = fields.length - 1;
|
|
67497
67518
|
let nextNode,
|
|
@@ -69599,12 +69620,17 @@
|
|
|
69599
69620
|
}
|
|
69600
69621
|
}
|
|
69601
69622
|
|
|
69602
|
-
const map$1 = (data, opt) =>
|
|
69603
|
-
|
|
69604
|
-
|
|
69605
|
-
|
|
69606
|
-
|
|
69607
|
-
|
|
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
|
+
};
|
|
69608
69634
|
|
|
69609
69635
|
class MapSeriesTooltipHelper extends BaseSeriesTooltipHelper {
|
|
69610
69636
|
constructor() {
|
|
@@ -70356,10 +70382,10 @@
|
|
|
70356
70382
|
level: TransformLevel.copyDataView
|
|
70357
70383
|
}).transform({
|
|
70358
70384
|
type: "map",
|
|
70359
|
-
options: {
|
|
70385
|
+
options: () => ({
|
|
70360
70386
|
nameMap: this._nameMap,
|
|
70361
70387
|
nameProperty: this._nameProperty
|
|
70362
|
-
}
|
|
70388
|
+
})
|
|
70363
70389
|
}).transform({
|
|
70364
70390
|
type: "lookup",
|
|
70365
70391
|
options: {
|
|
@@ -70368,7 +70394,7 @@
|
|
|
70368
70394
|
return null === (_a = this._data) || void 0 === _a ? void 0 : _a.getLatestData();
|
|
70369
70395
|
},
|
|
70370
70396
|
key: DEFAULT_MAP_LOOK_UP_KEY,
|
|
70371
|
-
fields: this._nameField,
|
|
70397
|
+
fields: () => this._nameField,
|
|
70372
70398
|
set: (feature, datum) => {
|
|
70373
70399
|
datum && Object.keys(datum).forEach(key => {
|
|
70374
70400
|
key in feature || (feature[key] = datum[key]);
|
|
@@ -70514,12 +70540,13 @@
|
|
|
70514
70540
|
|
|
70515
70541
|
const waterfall$1 = (lastData, op) => {
|
|
70516
70542
|
if (!lastData || 0 === lastData.length) return lastData;
|
|
70517
|
-
const
|
|
70543
|
+
const options = isFunction$1(op) ? op() : op,
|
|
70544
|
+
{
|
|
70518
70545
|
indexField: indexField,
|
|
70519
70546
|
total: totalSpec,
|
|
70520
70547
|
groupData: groupData,
|
|
70521
70548
|
calculationMode: calculationMode
|
|
70522
|
-
} =
|
|
70549
|
+
} = options,
|
|
70523
70550
|
totalData = [],
|
|
70524
70551
|
{
|
|
70525
70552
|
dimensionValues: dimensionValues,
|
|
@@ -70545,7 +70572,7 @@
|
|
|
70545
70572
|
positive: temp.end,
|
|
70546
70573
|
negative: temp.end
|
|
70547
70574
|
},
|
|
70548
|
-
indexData = !0 ===
|
|
70575
|
+
indexData = !0 === options.stackInverse ? dimensionData[key].reverse() : dimensionData[key];
|
|
70549
70576
|
if (null == indexData || indexData.forEach((d, i) => {
|
|
70550
70577
|
i === indexData.length - 1 ? d[STACK_FIELD_TOTAL_TOP] = !0 : delete d[STACK_FIELD_TOTAL_TOP];
|
|
70551
70578
|
}), indexData.length > 1) {
|
|
@@ -70557,9 +70584,9 @@
|
|
|
70557
70584
|
} else if (index === indexValues.length - 1) return !0;
|
|
70558
70585
|
return !1;
|
|
70559
70586
|
};
|
|
70560
|
-
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);
|
|
70561
70588
|
}
|
|
70562
|
-
temp = computeNormalData(indexData, key, total, totalData, temp, indexValues, index,
|
|
70589
|
+
temp = computeNormalData(indexData, key, total, totalData, temp, indexValues, index, options), totalData.push(total);
|
|
70563
70590
|
}), totalData;
|
|
70564
70591
|
};
|
|
70565
70592
|
function computeTotalWithMultipleData(indexData, key, total, totalData, temp, indexValues, index, op, isTotalCheck) {
|
|
@@ -70684,12 +70711,12 @@
|
|
|
70684
70711
|
total: total,
|
|
70685
70712
|
seriesField: seriesField,
|
|
70686
70713
|
calculationMode: calculationMode
|
|
70687
|
-
} = op,
|
|
70714
|
+
} = isFunction$1(op) ? op() : op,
|
|
70688
70715
|
totalData = {
|
|
70689
70716
|
[indexField]: (null == total ? void 0 : total.text) || "total",
|
|
70690
70717
|
[valueField]: data.reduce((pre, cur) => precisionAdd(pre, +cur[valueField]), 0)
|
|
70691
70718
|
};
|
|
70692
|
-
return seriesField && (totalData[seriesField] = "total"), "decrease" === calculationMode ?
|
|
70719
|
+
return seriesField && (totalData[seriesField] = "total"), "decrease" === calculationMode ? [totalData, ...data] : [...data, totalData];
|
|
70693
70720
|
};
|
|
70694
70721
|
|
|
70695
70722
|
const Appear_FadeIn$6 = {
|
|
@@ -71186,17 +71213,20 @@
|
|
|
71186
71213
|
return this._seriesField === WaterfallDefaultSeriesField ? [this._theme.seriesFieldName.increase, this._theme.seriesFieldName.decrease, this._theme.seriesFieldName.total] : super.getSeriesKeys();
|
|
71187
71214
|
}
|
|
71188
71215
|
initData() {
|
|
71189
|
-
var _a
|
|
71216
|
+
var _a;
|
|
71190
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({
|
|
71191
71218
|
type: "waterfallFillTotal",
|
|
71192
|
-
options: {
|
|
71193
|
-
|
|
71194
|
-
|
|
71195
|
-
|
|
71196
|
-
|
|
71197
|
-
|
|
71198
|
-
|
|
71199
|
-
|
|
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
|
+
};
|
|
71200
71230
|
}
|
|
71201
71231
|
}, !1));
|
|
71202
71232
|
const totalData = dataViewFromDataView(this.getViewData(), this._dataSet, {
|
|
@@ -71204,17 +71234,20 @@
|
|
|
71204
71234
|
});
|
|
71205
71235
|
this.getViewData().target.removeListener("change", totalData.reRunAllTransform), this._totalData = new CompilableData(this._option, totalData), totalData.transform({
|
|
71206
71236
|
type: "waterfall",
|
|
71207
|
-
options: {
|
|
71208
|
-
|
|
71209
|
-
|
|
71210
|
-
|
|
71211
|
-
|
|
71212
|
-
|
|
71213
|
-
|
|
71214
|
-
|
|
71215
|
-
|
|
71216
|
-
|
|
71217
|
-
|
|
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
|
+
};
|
|
71218
71251
|
}
|
|
71219
71252
|
}, !1), totalData.target.addListener("change", this._reStackTotal);
|
|
71220
71253
|
}
|
|
@@ -71339,14 +71372,16 @@
|
|
|
71339
71372
|
|
|
71340
71373
|
const foldOutlierData = (data, op) => {
|
|
71341
71374
|
const result = [],
|
|
71375
|
+
options = isFunction$1(op) ? op() : op,
|
|
71342
71376
|
{
|
|
71343
71377
|
outliersField: outliersField,
|
|
71344
71378
|
dimensionField: dimensionField,
|
|
71345
71379
|
seriesField: seriesField
|
|
71346
|
-
} =
|
|
71380
|
+
} = options;
|
|
71347
71381
|
return (data[0].latestData || []).forEach(d => {
|
|
71348
|
-
|
|
71349
|
-
|
|
71382
|
+
const rawOutlierValues = d[outliersField],
|
|
71383
|
+
outlierValues = isArray$1(rawOutlierValues) ? rawOutlierValues : [rawOutlierValues];
|
|
71384
|
+
result.push(...outlierValues.map(v => {
|
|
71350
71385
|
const resData = {
|
|
71351
71386
|
[BOX_PLOT_OUTLIER_VALUE_FIELD]: v
|
|
71352
71387
|
};
|
|
@@ -72152,11 +72187,11 @@
|
|
|
72152
72187
|
type: "dataview"
|
|
72153
72188
|
}), outlierDataView.name = `${PREFIX}_series_${this.id}_outlierData`, outlierDataView.transform({
|
|
72154
72189
|
type: "foldOutlierData",
|
|
72155
|
-
options: {
|
|
72190
|
+
options: () => ({
|
|
72156
72191
|
dimensionField: "horizontal" === this._direction ? this._fieldY : this._fieldX,
|
|
72157
72192
|
outliersField: this._outliersField,
|
|
72158
72193
|
seriesField: this._seriesField
|
|
72159
|
-
}
|
|
72194
|
+
})
|
|
72160
72195
|
}), outlierDataView.transform({
|
|
72161
72196
|
type: "addVChartProperty",
|
|
72162
72197
|
options: {
|
|
@@ -73392,7 +73427,22 @@
|
|
|
73392
73427
|
}));
|
|
73393
73428
|
};
|
|
73394
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
|
+
};
|
|
73395
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
|
+
}
|
|
73396
73446
|
getStackGroupFields() {
|
|
73397
73447
|
return this._angleField;
|
|
73398
73448
|
}
|
|
@@ -73782,7 +73832,10 @@
|
|
|
73782
73832
|
super(...arguments), this.type = ComponentTypeEnum.polarLinearAxis, this._zero = !0, this._nice = !0, this._extend = {}, this._scale = new LinearScale();
|
|
73783
73833
|
}
|
|
73784
73834
|
setAttrFromSpec() {
|
|
73835
|
+
var _a, _b;
|
|
73785
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());
|
|
73786
73839
|
}
|
|
73787
73840
|
initScales() {
|
|
73788
73841
|
super.initScales(), this.setScaleNice();
|
|
@@ -73829,6 +73882,9 @@
|
|
|
73829
73882
|
initScales() {
|
|
73830
73883
|
super.initScales(), this.calcScales(this._defaultBandInnerPadding, this._defaultBandOuterPadding);
|
|
73831
73884
|
}
|
|
73885
|
+
reInit(spec) {
|
|
73886
|
+
super.reInit(spec), this._updateData();
|
|
73887
|
+
}
|
|
73832
73888
|
registerTicksTransform() {
|
|
73833
73889
|
const name = `${this.type}-ticks`;
|
|
73834
73890
|
return registerDataSetInstanceTransform(this._option.dataSet, name, polarAngleAxisDiscreteTicks), name;
|
|
@@ -74426,6 +74482,16 @@
|
|
|
74426
74482
|
}
|
|
74427
74483
|
};
|
|
74428
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
|
+
};
|
|
74429
74495
|
class DotSeries extends CartesianSeries {
|
|
74430
74496
|
constructor() {
|
|
74431
74497
|
super(...arguments), this.type = SeriesTypeEnum.dot;
|
|
@@ -74463,6 +74529,13 @@
|
|
|
74463
74529
|
setGridBackground(gridBackground) {
|
|
74464
74530
|
isValid$1(gridBackground) && (this._gridBackground = gridBackground);
|
|
74465
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
|
+
}
|
|
74466
74539
|
initData() {
|
|
74467
74540
|
var _a;
|
|
74468
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({
|
|
@@ -74970,6 +75043,16 @@
|
|
|
74970
75043
|
}
|
|
74971
75044
|
});
|
|
74972
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
|
+
};
|
|
74973
75056
|
class ProgressLikeSeries extends PolarSeries {
|
|
74974
75057
|
constructor() {
|
|
74975
75058
|
super(...arguments), this._arcGroupMark = null, this._getAngleValueStart = datum => {
|
|
@@ -75009,6 +75092,12 @@
|
|
|
75009
75092
|
return this._getAngleValueEndWithoutMask(datum);
|
|
75010
75093
|
};
|
|
75011
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
|
+
}
|
|
75012
75101
|
setAttrFromSpec() {
|
|
75013
75102
|
var _a, _b, _c;
|
|
75014
75103
|
super.setAttrFromSpec();
|
|
@@ -75240,7 +75329,8 @@
|
|
|
75240
75329
|
};
|
|
75241
75330
|
|
|
75242
75331
|
const CIRCULAR_PROGRESS_SERIES_COMPILE_ONLY_KEYS = {
|
|
75243
|
-
cornerRadius: !0
|
|
75332
|
+
cornerRadius: !0,
|
|
75333
|
+
roundCap: !0
|
|
75244
75334
|
};
|
|
75245
75335
|
class CircularProgressSeries extends ProgressLikeSeries {
|
|
75246
75336
|
constructor() {
|
|
@@ -75436,7 +75526,9 @@
|
|
|
75436
75526
|
};
|
|
75437
75527
|
|
|
75438
75528
|
const LINEAR_PROGRESS_SERIES_COMPILE_ONLY_KEYS = {
|
|
75439
|
-
bandWidth: !0
|
|
75529
|
+
bandWidth: !0,
|
|
75530
|
+
cornerRadius: !0,
|
|
75531
|
+
clamp: !0
|
|
75440
75532
|
},
|
|
75441
75533
|
LINEAR_PROGRESS_SERIES_COMPILE_ONLY_SUB_KEYS = {
|
|
75442
75534
|
progress: {
|
|
@@ -80166,12 +80258,12 @@
|
|
|
80166
80258
|
}), registerTextMark(), registerWordCloudAnimation(), Factory.registerSeries(WordCloudSeries.type, WordCloudSeries);
|
|
80167
80259
|
};
|
|
80168
80260
|
|
|
80261
|
+
const resolveOptionValue$2 = option => isFunction$1(option) ? option() : option;
|
|
80169
80262
|
const funnel = (originData, op) => {
|
|
80170
|
-
var _a, _b;
|
|
80263
|
+
var _a, _b, _c, _d;
|
|
80171
80264
|
const data = originData.map(datum => Object.assign({}, datum));
|
|
80172
80265
|
if (!data || 0 === data.length) return data;
|
|
80173
80266
|
const {
|
|
80174
|
-
valueField: valueField,
|
|
80175
80267
|
asTransformRatio: asTransformRatio,
|
|
80176
80268
|
asReachRatio: asReachRatio,
|
|
80177
80269
|
asHeightRatio: asHeightRatio,
|
|
@@ -80180,14 +80272,15 @@
|
|
|
80180
80272
|
asLastValueRatio: asLastValueRatio,
|
|
80181
80273
|
asLastValue: asLastValue,
|
|
80182
80274
|
asCurrentValue: asCurrentValue,
|
|
80183
|
-
asNextValue: asNextValue
|
|
80184
|
-
heightVisual = !1,
|
|
80185
|
-
isCone = !0,
|
|
80186
|
-
range: range
|
|
80275
|
+
asNextValue: asNextValue
|
|
80187
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),
|
|
80188
80281
|
max = data.reduce((m, d) => Math.max(m, Number.parseFloat(d[valueField]) || -1 / 0), -1 / 0),
|
|
80189
80282
|
min = data.reduce((m, d) => Math.min(m, Number.parseFloat(d[valueField]) || 1 / 0), 1 / 0),
|
|
80190
|
-
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];
|
|
80191
80284
|
return data.forEach((d, i) => {
|
|
80192
80285
|
var _a, _b;
|
|
80193
80286
|
const currentValue = Number.parseFloat(d[valueField]),
|
|
@@ -80352,12 +80445,12 @@
|
|
|
80352
80445
|
}), fields;
|
|
80353
80446
|
}
|
|
80354
80447
|
_statisticViewData() {
|
|
80355
|
-
var _a
|
|
80448
|
+
var _a;
|
|
80356
80449
|
super._statisticViewData(), this._data.getDataView().transform({
|
|
80357
80450
|
type: "funnel",
|
|
80358
80451
|
options: {
|
|
80359
|
-
valueField: this.getValueField(),
|
|
80360
|
-
isCone: this._spec.isCone,
|
|
80452
|
+
valueField: () => this.getValueField(),
|
|
80453
|
+
isCone: () => this._spec.isCone,
|
|
80361
80454
|
asCurrentValue: FUNNEL_CURRENT_VALUE,
|
|
80362
80455
|
asTransformRatio: FUNNEL_TRANSFORM_RATIO,
|
|
80363
80456
|
asReachRatio: FUNNEL_REACH_RATIO,
|
|
@@ -80367,12 +80460,9 @@
|
|
|
80367
80460
|
asLastValueRatio: FUNNEL_LAST_VALUE_RATIO,
|
|
80368
80461
|
asLastValue: FUNNEL_LAST_VALUE,
|
|
80369
80462
|
asNextValue: FUNNEL_NEXT_VALUE,
|
|
80370
|
-
range:
|
|
80371
|
-
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,
|
|
80372
|
-
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
|
|
80373
|
-
}
|
|
80463
|
+
range: () => this._spec.range
|
|
80374
80464
|
}
|
|
80375
|
-
}), null === (
|
|
80465
|
+
}), null === (_a = this._viewDataTransform.getDataView()) || void 0 === _a || _a.transform({
|
|
80376
80466
|
type: "funnelTransform",
|
|
80377
80467
|
options: {
|
|
80378
80468
|
asIsTransformLevel: FUNNEL_TRANSFORM_LEVEL
|
|
@@ -81600,21 +81690,27 @@
|
|
|
81600
81690
|
return (null === (_a = data[0]) || void 0 === _a ? void 0 : _a.latestData) ? data[0].latestData : data;
|
|
81601
81691
|
};
|
|
81602
81692
|
const sankeyLayout = (data, op) => {
|
|
81603
|
-
|
|
81604
|
-
|
|
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();
|
|
81605
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 [];
|
|
81606
|
-
const originalData = data[0]
|
|
81607
|
-
|
|
81608
|
-
|
|
81609
|
-
originalData.links.forEach(datum => {
|
|
81610
|
-
const updatedDatum = {};
|
|
81611
|
-
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];
|
|
81612
|
-
updatedData.push(updatedDatum);
|
|
81613
|
-
}), originalData.links = updatedData;
|
|
81614
|
-
}
|
|
81615
|
-
const layout = new SankeyLayout(op),
|
|
81697
|
+
const originalData = data[0],
|
|
81698
|
+
layoutData = normalizeSankeyData(originalData, options),
|
|
81699
|
+
layout = new SankeyLayout(options),
|
|
81616
81700
|
result = [];
|
|
81617
|
-
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;
|
|
81618
81714
|
};
|
|
81619
81715
|
|
|
81620
81716
|
const sankeyNodes = data => {
|
|
@@ -82108,7 +82204,6 @@
|
|
|
82108
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);
|
|
82109
82205
|
}
|
|
82110
82206
|
initData() {
|
|
82111
|
-
var _a, _b, _c, _d;
|
|
82112
82207
|
super.initData();
|
|
82113
82208
|
const viewData = this.getViewData(),
|
|
82114
82209
|
rawData = this.getRawData();
|
|
@@ -82117,38 +82212,41 @@
|
|
|
82117
82212
|
type: "sankeyFormat"
|
|
82118
82213
|
}, !1), viewData.transform({
|
|
82119
82214
|
type: "sankeyLayout",
|
|
82120
|
-
options: {
|
|
82121
|
-
|
|
82122
|
-
|
|
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
|
-
|
|
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
|
+
};
|
|
82152
82250
|
},
|
|
82153
82251
|
level: TransformLevel.sankeyLayout
|
|
82154
82252
|
});
|
|
@@ -82520,14 +82618,16 @@
|
|
|
82520
82618
|
};
|
|
82521
82619
|
|
|
82522
82620
|
const treemapLayout = (data, op) => {
|
|
82523
|
-
|
|
82524
|
-
|
|
82621
|
+
const options = isFunction$1(op) ? op() : op,
|
|
82622
|
+
viewBox = options.getViewBox();
|
|
82623
|
+
if (viewBox) {
|
|
82624
|
+
const res = new TreemapLayout(options).layout(data, viewBox),
|
|
82525
82625
|
nodes = [];
|
|
82526
82626
|
return flattenNodes(res, nodes, {
|
|
82527
|
-
maxDepth: null ==
|
|
82528
|
-
}), nodes.forEach(
|
|
82627
|
+
maxDepth: null == options ? void 0 : options.maxDepth
|
|
82628
|
+
}), nodes.forEach(datum => {
|
|
82529
82629
|
datum && [DEFAULT_HIERARCHY_ROOT, "name"].forEach(key => {
|
|
82530
|
-
datum[key] = datum.datum[datum.depth][
|
|
82630
|
+
datum[key] = datum.datum[datum.depth][options.nameField];
|
|
82531
82631
|
});
|
|
82532
82632
|
}), nodes;
|
|
82533
82633
|
}
|
|
@@ -82610,28 +82710,31 @@
|
|
|
82610
82710
|
}), isValidNumber$1(this._spec.maxDepth) && (this._maxDepth = this._spec.maxDepth - 1);
|
|
82611
82711
|
}
|
|
82612
82712
|
initData() {
|
|
82613
|
-
var _a
|
|
82713
|
+
var _a;
|
|
82614
82714
|
super.initData(), registerDataSetInstanceTransform(this._dataSet, "treemap", treemapLayout), null === (_a = this._data.getDataView()) || void 0 === _a || _a.transform({
|
|
82615
82715
|
type: "treemap",
|
|
82616
|
-
options: {
|
|
82617
|
-
|
|
82618
|
-
|
|
82619
|
-
|
|
82620
|
-
|
|
82621
|
-
|
|
82622
|
-
|
|
82623
|
-
|
|
82624
|
-
|
|
82625
|
-
|
|
82626
|
-
|
|
82627
|
-
|
|
82628
|
-
|
|
82629
|
-
|
|
82630
|
-
|
|
82631
|
-
|
|
82632
|
-
|
|
82633
|
-
|
|
82634
|
-
|
|
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
|
+
};
|
|
82635
82738
|
}
|
|
82636
82739
|
}), this.getViewData() && this._spec.drill && this.initDrillableData(this._dataSet);
|
|
82637
82740
|
}
|
|
@@ -83446,36 +83549,41 @@
|
|
|
83446
83549
|
const CORRELATION_Y = `${PREFIX}_CORRELATION_Y`;
|
|
83447
83550
|
const CORRELATION_SIZE = `${PREFIX}_CORRELATION_SIZE`;
|
|
83448
83551
|
|
|
83552
|
+
const resolveOptionValue$1 = option => isFunction$1(option) ? option() : option;
|
|
83449
83553
|
const correlation$1 = (data, options) => {
|
|
83450
|
-
var _a, _b, _c, _d, _e, _f, _g, _h
|
|
83554
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
83451
83555
|
if (!data || !(null == options ? void 0 : options.view) || !isArray$1(data)) return data;
|
|
83452
|
-
const
|
|
83556
|
+
const dataList = data,
|
|
83557
|
+
viewBox = options.view();
|
|
83453
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;
|
|
83454
|
-
const startAngle = degreeToRadian(null !== (_a = options.startAngle) && void 0 !== _a ? _a : -90),
|
|
83455
|
-
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),
|
|
83456
83561
|
maxRadius = Math.max((viewBox.x1 - viewBox.x0) / 2, (viewBox.y1 - viewBox.y0) / 2),
|
|
83457
|
-
innerRadius = toPercent(null !== (_c = options.innerRadius) && void 0 !== _c ? _c : 0, maxRadius),
|
|
83458
|
-
outerRadius = toPercent(options.outerRadius, maxRadius),
|
|
83459
|
-
|
|
83460
|
-
|
|
83461
|
-
|
|
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),
|
|
83462
83568
|
[min, max] = extent$2(values),
|
|
83463
83569
|
radiusScale = min === max ? val => (innerRadius + outerRadius) / 2 : val => innerRadius + (outerRadius - innerRadius) * (val - min) / (max - min),
|
|
83464
|
-
|
|
83465
|
-
|
|
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;
|
|
83466
83574
|
let sizeScale = datum => defaultSize;
|
|
83467
83575
|
if (sizeAccessor) {
|
|
83468
|
-
const [minSize, maxSize] = sizeAccessor !== fieldAccessor ? extent$2(
|
|
83469
|
-
minR = null !== (
|
|
83470
|
-
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;
|
|
83471
83579
|
minSize !== maxSize && (sizeScale = datum => minR + (maxR - minR) * (sizeAccessor(datum) - minSize) / (maxSize - minSize));
|
|
83472
83580
|
}
|
|
83473
83581
|
const minAngle = Math.min(startAngle, endAngle),
|
|
83474
83582
|
maxAngle = Math.max(startAngle, endAngle),
|
|
83475
|
-
angles = getPartialAngles(minAngle, maxAngle,
|
|
83583
|
+
angles = getPartialAngles(minAngle, maxAngle, dataList.length),
|
|
83476
83584
|
res = [],
|
|
83477
83585
|
searchAngle = (maxAngle - minAngle) / 60;
|
|
83478
|
-
return
|
|
83586
|
+
return dataList.forEach((datum, index) => {
|
|
83479
83587
|
const radius = radiusScale(values[index]),
|
|
83480
83588
|
size = sizeScale(datum);
|
|
83481
83589
|
let x,
|
|
@@ -83506,14 +83614,18 @@
|
|
|
83506
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));
|
|
83507
83615
|
return res;
|
|
83508
83616
|
},
|
|
83509
|
-
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
|
+
});
|
|
83510
83623
|
|
|
83624
|
+
const resolveOptionValue = option => isFunction$1(option) ? option() : option;
|
|
83511
83625
|
const correlationCenter = (data, options) => {
|
|
83512
83626
|
if (!data || !isArray$1(data)) return [];
|
|
83513
|
-
const
|
|
83514
|
-
|
|
83515
|
-
categoryField: categoryField
|
|
83516
|
-
} = options,
|
|
83627
|
+
const keyword = resolveOptionValue(options.keyword),
|
|
83628
|
+
categoryField = resolveOptionValue(options.categoryField),
|
|
83517
83629
|
nodeInfo = data[0].latestData[0];
|
|
83518
83630
|
return {
|
|
83519
83631
|
[categoryField]: keyword,
|
|
@@ -83652,7 +83764,6 @@
|
|
|
83652
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);
|
|
83653
83765
|
}
|
|
83654
83766
|
initData() {
|
|
83655
|
-
var _a, _b, _c;
|
|
83656
83767
|
if (super.initData(), !this._data) return;
|
|
83657
83768
|
registerDataSetInstanceTransform(this._dataSet, "correlation", correlation$1);
|
|
83658
83769
|
const centerDataSet = new DataSet();
|
|
@@ -83665,8 +83776,11 @@
|
|
|
83665
83776
|
}), centerDataView.transform({
|
|
83666
83777
|
type: "correlationCenter",
|
|
83667
83778
|
options: {
|
|
83668
|
-
keyword:
|
|
83669
|
-
|
|
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
|
|
83670
83784
|
}
|
|
83671
83785
|
}), this._centerSeriesData = new CompilableData(this._option, centerDataView);
|
|
83672
83786
|
}
|
|
@@ -83684,14 +83798,14 @@
|
|
|
83684
83798
|
y0: this._viewBox.y1,
|
|
83685
83799
|
y1: this._viewBox.y2
|
|
83686
83800
|
}),
|
|
83687
|
-
field: this._spec.valueField,
|
|
83688
|
-
radiusRange: this._spec.sizeRange,
|
|
83689
|
-
radiusField: this._spec.sizeField,
|
|
83690
|
-
center: [this._spec.centerX, this._spec.centerY],
|
|
83691
|
-
innerRadius: this._spec.innerRadius,
|
|
83692
|
-
outerRadius: this._spec.outerRadius,
|
|
83693
|
-
startAngle: this._spec.startAngle,
|
|
83694
|
-
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
|
|
83695
83809
|
}
|
|
83696
83810
|
});
|
|
83697
83811
|
}
|
|
@@ -84397,10 +84511,11 @@
|
|
|
84397
84511
|
}
|
|
84398
84512
|
|
|
84399
84513
|
const vennLayout = (data, op) => {
|
|
84400
|
-
const
|
|
84514
|
+
const options = isFunction$1(op) ? op() : op,
|
|
84515
|
+
viewBox = options.getViewBox();
|
|
84401
84516
|
return viewBox && (null == data ? void 0 : data.length) ? vennTransform(Object.assign({
|
|
84402
|
-
setField:
|
|
84403
|
-
valueField:
|
|
84517
|
+
setField: options.setField,
|
|
84518
|
+
valueField: options.valueField
|
|
84404
84519
|
}, viewBox), data) : [];
|
|
84405
84520
|
};
|
|
84406
84521
|
|
|
@@ -84484,7 +84599,7 @@
|
|
|
84484
84599
|
var _a;
|
|
84485
84600
|
super.initData(), registerDataSetInstanceTransform(this._dataSet, "venn", vennLayout), null === (_a = this._data.getDataView()) || void 0 === _a || _a.transform({
|
|
84486
84601
|
type: "venn",
|
|
84487
|
-
options: {
|
|
84602
|
+
options: () => ({
|
|
84488
84603
|
getViewBox: () => this._viewBox.empty() ? null : {
|
|
84489
84604
|
x0: this._viewBox.x1,
|
|
84490
84605
|
x1: this._viewBox.x2,
|
|
@@ -84493,7 +84608,7 @@
|
|
|
84493
84608
|
},
|
|
84494
84609
|
setField: this._categoryField,
|
|
84495
84610
|
valueField: this._valueField
|
|
84496
|
-
}
|
|
84611
|
+
})
|
|
84497
84612
|
});
|
|
84498
84613
|
}
|
|
84499
84614
|
compile() {
|
|
@@ -84796,7 +84911,7 @@
|
|
|
84796
84911
|
}), indicatorSpec;
|
|
84797
84912
|
}
|
|
84798
84913
|
_getDefaultSeriesSpec(spec, pickKeys) {
|
|
84799
|
-
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);
|
|
84800
84915
|
}
|
|
84801
84916
|
transformSpec(spec) {
|
|
84802
84917
|
super.transformSpec(spec), isArray$1(spec.dataZoom) && spec.dataZoom.length > 0 && spec.dataZoom.forEach(zoom => {
|
|
@@ -84810,7 +84925,7 @@
|
|
|
84810
84925
|
return !1;
|
|
84811
84926
|
}
|
|
84812
84927
|
_getDefaultSeriesSpec(spec) {
|
|
84813
|
-
const series = super._getDefaultSeriesSpec(spec, ["startAngle", "endAngle", "centerX", "centerY"]);
|
|
84928
|
+
const series = super._getDefaultSeriesSpec(spec, ["startAngle", "endAngle", "centerX", "centerY", "clamp"]);
|
|
84814
84929
|
return series.categoryField = spec.categoryField || spec.radiusField, series.valueField = spec.valueField || spec.angleField, series;
|
|
84815
84930
|
}
|
|
84816
84931
|
_transformProgressAxisSpec(spec, angleAxisDefaultSpec, radiusAxisDefaultSpec, angleAxisAppendSpec, radiusAxisAppendSpec) {
|
|
@@ -84889,7 +85004,7 @@
|
|
|
84889
85004
|
_getDefaultSeriesSpec(spec) {
|
|
84890
85005
|
var _a, _b, _c;
|
|
84891
85006
|
const series = super._getDefaultSeriesSpec(spec);
|
|
84892
|
-
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;
|
|
84893
85008
|
}
|
|
84894
85009
|
transformSpec(spec) {
|
|
84895
85010
|
var _a;
|
|
@@ -85014,7 +85129,7 @@
|
|
|
85014
85129
|
var _a, _b, _c, _d;
|
|
85015
85130
|
const series = super._getDefaultSeriesSpec(spec),
|
|
85016
85131
|
areaTheme = null === (_b = (_a = this._option).getTheme) || void 0 === _b ? void 0 : _b.call(_a, "series", "radar", "area");
|
|
85017
|
-
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({
|
|
85018
85133
|
visible: null !== (_c = null == areaTheme ? void 0 : areaTheme.visible) && void 0 !== _c && _c
|
|
85019
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;
|
|
85020
85135
|
}
|
|
@@ -85363,7 +85478,7 @@
|
|
|
85363
85478
|
_getDefaultSeriesSpec(spec) {
|
|
85364
85479
|
var _a, _b;
|
|
85365
85480
|
const series = super._getDefaultSeriesSpec(spec);
|
|
85366
|
-
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;
|
|
85367
85482
|
}
|
|
85368
85483
|
transformSpec(spec) {
|
|
85369
85484
|
super.transformSpec(spec), this._transformProgressAxisSpec(spec, {
|
|
@@ -85394,7 +85509,7 @@
|
|
|
85394
85509
|
class GaugeChartSpecTransformer extends ProgressLikeChartSpecTransformer {
|
|
85395
85510
|
_getDefaultSeriesSpec(spec) {
|
|
85396
85511
|
const series = super._getDefaultSeriesSpec(spec);
|
|
85397
|
-
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;
|
|
85398
85513
|
}
|
|
85399
85514
|
_getDefaultCircularProgressSeriesSpec(spec) {
|
|
85400
85515
|
const series = super._getDefaultSeriesSpec(spec);
|
|
@@ -85514,7 +85629,7 @@
|
|
|
85514
85629
|
_getDefaultSeriesSpec(spec) {
|
|
85515
85630
|
var _a, _b;
|
|
85516
85631
|
const series = super._getDefaultSeriesSpec(spec, ["bandWidth", "progress", "track", "clamp"]);
|
|
85517
|
-
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;
|
|
85518
85633
|
}
|
|
85519
85634
|
transformSpec(spec) {
|
|
85520
85635
|
var _a, _b;
|
|
@@ -85762,7 +85877,7 @@
|
|
|
85762
85877
|
_getDefaultSeriesSpec(spec) {
|
|
85763
85878
|
var _a, _b;
|
|
85764
85879
|
const series = super._getDefaultSeriesSpec(spec);
|
|
85765
|
-
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;
|
|
85766
85881
|
}
|
|
85767
85882
|
transformSpec(spec) {
|
|
85768
85883
|
super.transformSpec(spec), setDefaultCrosshairForCartesianChart(spec);
|
|
@@ -89836,7 +89951,7 @@
|
|
|
89836
89951
|
datum: datum,
|
|
89837
89952
|
title: title,
|
|
89838
89953
|
content: content
|
|
89839
|
-
} = op,
|
|
89954
|
+
} = isFunction$1(op) ? op() : op,
|
|
89840
89955
|
mappedData = [],
|
|
89841
89956
|
datumResult = datum.call(null);
|
|
89842
89957
|
return title.visible && mappedData.push({
|
|
@@ -89937,11 +90052,11 @@
|
|
|
89937
90052
|
});
|
|
89938
90053
|
displayData.transform({
|
|
89939
90054
|
type: "indicatorFilter",
|
|
89940
|
-
options: {
|
|
90055
|
+
options: () => ({
|
|
89941
90056
|
title: this._title,
|
|
89942
90057
|
content: this._content,
|
|
89943
90058
|
datum: () => this._activeDatum
|
|
89944
|
-
}
|
|
90059
|
+
})
|
|
89945
90060
|
}), displayData.target.addListener("change", this.updateDatum.bind(this)), this._displayData = new CompilableData(this._option, displayData);
|
|
89946
90061
|
}
|
|
89947
90062
|
updateLayoutAttribute() {
|