@visactor/vchart 1.5.2 → 1.6.0-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/es5/index.js +1 -1
- package/build/index.js +605 -363
- package/build/index.min.js +1 -1
- package/build/tsconfig.tsbuildinfo +1 -1
- package/cjs/chart/bar/bar.js +2 -1
- package/cjs/chart/bar/bar.js.map +1 -1
- package/cjs/chart/base-chart.d.ts +4 -6
- package/cjs/chart/base-chart.js +44 -45
- package/cjs/chart/base-chart.js.map +1 -1
- package/cjs/chart/correlation/correlation.js.map +1 -1
- package/cjs/chart/gauge/gauge.js +3 -2
- package/cjs/chart/gauge/gauge.js.map +1 -1
- package/cjs/chart/interface/chart.d.ts +3 -3
- package/cjs/chart/interface/chart.js.map +1 -1
- package/cjs/chart/range-column/range-column.js +2 -1
- package/cjs/chart/range-column/range-column.js.map +1 -1
- package/cjs/chart/sequence/sequence.js +0 -1
- package/cjs/chart/sequence/sequence.js.map +1 -1
- package/cjs/component/axis/util.d.ts +3 -3
- package/cjs/component/axis/util.js +14 -10
- package/cjs/component/axis/util.js.map +1 -1
- package/cjs/component/base/base-component.d.ts +1 -2
- package/cjs/component/base/base-component.js +2 -39
- package/cjs/component/base/base-component.js.map +1 -1
- package/cjs/component/base/util.d.ts +2 -3
- package/cjs/component/base/util.js +16 -19
- package/cjs/component/base/util.js.map +1 -1
- package/cjs/component/brush/brush.js +1 -1
- package/cjs/component/brush/brush.js.map +1 -1
- package/cjs/component/crosshair/util.d.ts +3 -3
- package/cjs/component/crosshair/util.js +7 -5
- package/cjs/component/crosshair/util.js.map +1 -1
- package/cjs/component/tooltip/handler/base.d.ts +4 -5
- package/cjs/component/tooltip/handler/base.js +18 -16
- package/cjs/component/tooltip/handler/base.js.map +1 -1
- package/cjs/component/tooltip/handler/dom/dom-tooltip-handler.js +14 -3
- package/cjs/component/tooltip/handler/dom/dom-tooltip-handler.js.map +1 -1
- package/cjs/component/tooltip/handler/utils/attribute.d.ts +3 -3
- package/cjs/component/tooltip/handler/utils/attribute.js.map +1 -1
- package/cjs/component/tooltip/interface/spec.d.ts +2 -1
- package/cjs/component/tooltip/interface/spec.js.map +1 -1
- package/cjs/component/util.d.ts +4 -0
- package/cjs/component/util.js +14 -0
- package/cjs/component/util.js.map +1 -0
- package/cjs/constant/waterfall.js +1 -2
- package/cjs/constant/word-cloud.js +2 -1
- package/cjs/core/index.d.ts +1 -1
- package/cjs/core/index.js +1 -1
- package/cjs/core/index.js.map +1 -1
- package/cjs/core/interface.d.ts +7 -1
- package/cjs/core/interface.js.map +1 -1
- package/cjs/core/vchart.d.ts +2 -2
- package/cjs/core/vchart.js +30 -30
- package/cjs/core/vchart.js.map +1 -1
- package/cjs/interaction/config.js +1 -2
- package/cjs/interaction/dimension-trigger.js +2 -1
- package/cjs/layout/base-layout.js +1 -1
- package/cjs/layout/index.js +1 -1
- package/cjs/layout/interface.js +1 -1
- package/cjs/mark/arc-3d.js +1 -1
- package/cjs/mark/arc.js +1 -1
- package/cjs/mark/area.js +1 -1
- package/cjs/mark/base/base-mark.js +4 -5
- package/cjs/mark/base/base-mark.js.map +1 -1
- package/cjs/mark/box-plot.js +1 -1
- package/cjs/model/base-model.d.ts +4 -2
- package/cjs/model/base-model.js +51 -11
- package/cjs/model/base-model.js.map +1 -1
- package/cjs/model/interface.d.ts +10 -3
- package/cjs/model/interface.js.map +1 -1
- package/cjs/series/area/area.d.ts +1 -1
- package/cjs/series/area/area.js +1 -1
- package/cjs/series/area/area.js.map +1 -1
- package/cjs/series/bar/bar.d.ts +14 -3
- package/cjs/series/bar/bar.js +100 -14
- package/cjs/series/bar/bar.js.map +1 -1
- package/cjs/series/bar/constant.js +4 -0
- package/cjs/series/bar/constant.js.map +1 -1
- package/cjs/series/bar/interface.d.ts +2 -0
- package/cjs/series/bar/interface.js.map +1 -1
- package/cjs/series/base/base-series.d.ts +4 -3
- package/cjs/series/base/base-series.js +12 -46
- package/cjs/series/base/base-series.js.map +1 -1
- package/cjs/series/dot/dot.js +3 -4
- package/cjs/series/dot/dot.js.map +1 -1
- package/cjs/series/gauge/gauge-pointer.d.ts +1 -0
- package/cjs/series/gauge/gauge-pointer.js +1 -1
- package/cjs/series/gauge/gauge-pointer.js.map +1 -1
- package/cjs/series/heatmap/heatmap.js +1 -1
- package/cjs/series/heatmap/heatmap.js.map +1 -1
- package/cjs/series/interface/theme.d.ts +2 -0
- package/cjs/series/interface/theme.js +3 -2
- package/cjs/series/interface/theme.js.map +1 -1
- package/cjs/series/interface/type.d.ts +2 -1
- package/cjs/series/interface/type.js +2 -1
- package/cjs/series/interface/type.js.map +1 -1
- package/cjs/series/link/link.js +1 -1
- package/cjs/series/link/link.js.map +1 -1
- package/cjs/series/map/map.js +1 -1
- package/cjs/series/map/map.js.map +1 -1
- package/cjs/series/polar/progress-like/progress-like.d.ts +1 -1
- package/cjs/series/polar/progress-like/progress-like.js +2 -3
- package/cjs/series/polar/progress-like/progress-like.js.map +1 -1
- package/cjs/series/progress/circular/circular.js +4 -4
- package/cjs/series/progress/circular/circular.js.map +1 -1
- package/cjs/series/range-area/interface.d.ts +2 -1
- package/cjs/series/range-area/interface.js.map +1 -1
- package/cjs/series/range-column/range-column.js +8 -7
- package/cjs/series/range-column/range-column.js.map +1 -1
- package/cjs/series/rose/rose.d.ts +1 -1
- package/cjs/series/rose/rose.js +2 -2
- package/cjs/series/rose/rose.js.map +1 -1
- package/cjs/series/sankey/sankey.js +14 -16
- package/cjs/series/sankey/sankey.js.map +1 -1
- package/cjs/series/waterfall/waterfall.d.ts +1 -1
- package/cjs/series/waterfall/waterfall.js +7 -7
- package/cjs/series/waterfall/waterfall.js.map +1 -1
- package/cjs/series/word-cloud/base.js +34 -35
- package/cjs/series/word-cloud/base.js.map +1 -1
- package/cjs/series/word-cloud/word-cloud-3d.js +32 -32
- package/cjs/series/word-cloud/word-cloud-3d.js.map +1 -1
- package/cjs/theme/builtin/common/mark.js +10 -0
- package/cjs/theme/builtin/common/mark.js.map +1 -1
- package/cjs/theme/builtin/index.d.ts +4 -1
- package/cjs/theme/builtin/index.js +13 -8
- package/cjs/theme/builtin/index.js.map +1 -1
- package/cjs/theme/color-scheme/util.js +2 -1
- package/cjs/theme/color-scheme/util.js.map +1 -1
- package/cjs/theme/theme-manager.js +4 -3
- package/cjs/theme/theme-manager.js.map +1 -1
- package/cjs/theme/util.d.ts +5 -0
- package/cjs/theme/util.js +34 -0
- package/cjs/theme/util.js.map +1 -0
- package/cjs/typings/tooltip/tooltip.d.ts +2 -1
- package/cjs/typings/tooltip/tooltip.js.map +1 -1
- package/cjs/util/spec/merge-theme.d.ts +4 -1
- package/cjs/util/spec/merge-theme.js +22 -13
- package/cjs/util/spec/merge-theme.js.map +1 -1
- package/cjs/util/spec/preprocess.js +1 -0
- package/cjs/util/spec/preprocess.js.map +1 -1
- package/esm/chart/bar/bar.js +2 -1
- package/esm/chart/bar/bar.js.map +1 -1
- package/esm/chart/base-chart.d.ts +4 -6
- package/esm/chart/base-chart.js +42 -42
- package/esm/chart/base-chart.js.map +1 -1
- package/esm/chart/correlation/correlation.js.map +1 -1
- package/esm/chart/gauge/gauge.js +3 -2
- package/esm/chart/gauge/gauge.js.map +1 -1
- package/esm/chart/interface/chart.d.ts +3 -3
- package/esm/chart/interface/chart.js.map +1 -1
- package/esm/chart/range-column/range-column.js +2 -1
- package/esm/chart/range-column/range-column.js.map +1 -1
- package/esm/chart/sequence/sequence.js +0 -1
- package/esm/chart/sequence/sequence.js.map +1 -1
- package/esm/component/axis/util.d.ts +3 -3
- package/esm/component/axis/util.js +10 -8
- package/esm/component/axis/util.js.map +1 -1
- package/esm/component/base/base-component.d.ts +1 -2
- package/esm/component/base/base-component.js +3 -40
- package/esm/component/base/base-component.js.map +1 -1
- package/esm/component/base/util.d.ts +2 -3
- package/esm/component/base/util.js +19 -16
- package/esm/component/base/util.js.map +1 -1
- package/esm/component/brush/brush.js +1 -1
- package/esm/component/brush/brush.js.map +1 -1
- package/esm/component/crosshair/util.d.ts +3 -3
- package/esm/component/crosshair/util.js +8 -4
- package/esm/component/crosshair/util.js.map +1 -1
- package/esm/component/tooltip/handler/base.d.ts +4 -5
- package/esm/component/tooltip/handler/base.js +17 -14
- package/esm/component/tooltip/handler/base.js.map +1 -1
- package/esm/component/tooltip/handler/dom/dom-tooltip-handler.js +14 -3
- package/esm/component/tooltip/handler/dom/dom-tooltip-handler.js.map +1 -1
- package/esm/component/tooltip/handler/utils/attribute.d.ts +3 -3
- package/esm/component/tooltip/handler/utils/attribute.js.map +1 -1
- package/esm/component/tooltip/interface/spec.d.ts +2 -1
- package/esm/component/tooltip/interface/spec.js.map +1 -1
- package/esm/component/util.d.ts +4 -0
- package/esm/component/util.js +6 -0
- package/esm/component/util.js.map +1 -0
- package/esm/constant/waterfall.js +1 -2
- package/esm/constant/word-cloud.js +2 -1
- package/esm/core/index.d.ts +1 -1
- package/esm/core/index.js +1 -1
- package/esm/core/index.js.map +1 -1
- package/esm/core/interface.d.ts +7 -1
- package/esm/core/interface.js.map +1 -1
- package/esm/core/vchart.d.ts +2 -2
- package/esm/core/vchart.js +31 -25
- package/esm/core/vchart.js.map +1 -1
- package/esm/interaction/config.js +1 -2
- package/esm/interaction/dimension-trigger.js +2 -1
- package/esm/layout/base-layout.js +1 -1
- package/esm/layout/index.js +1 -1
- package/esm/layout/interface.js +1 -1
- package/esm/mark/arc-3d.js +1 -1
- package/esm/mark/arc.js +1 -1
- package/esm/mark/area.js +1 -1
- package/esm/mark/base/base-mark.js +4 -5
- package/esm/mark/base/base-mark.js.map +1 -1
- package/esm/mark/box-plot.js +1 -1
- package/esm/model/base-model.d.ts +4 -2
- package/esm/model/base-model.js +53 -10
- package/esm/model/base-model.js.map +1 -1
- package/esm/model/interface.d.ts +10 -3
- package/esm/model/interface.js.map +1 -1
- package/esm/series/area/area.d.ts +1 -1
- package/esm/series/area/area.js +1 -1
- package/esm/series/area/area.js.map +1 -1
- package/esm/series/bar/bar.d.ts +14 -3
- package/esm/series/bar/bar.js +109 -13
- package/esm/series/bar/bar.js.map +1 -1
- package/esm/series/bar/constant.js +4 -0
- package/esm/series/bar/constant.js.map +1 -1
- package/esm/series/bar/interface.d.ts +2 -0
- package/esm/series/bar/interface.js.map +1 -1
- package/esm/series/base/base-series.d.ts +4 -3
- package/esm/series/base/base-series.js +14 -46
- package/esm/series/base/base-series.js.map +1 -1
- package/esm/series/dot/dot.js +2 -4
- package/esm/series/dot/dot.js.map +1 -1
- package/esm/series/gauge/gauge-pointer.d.ts +1 -0
- package/esm/series/gauge/gauge-pointer.js +1 -1
- package/esm/series/gauge/gauge-pointer.js.map +1 -1
- package/esm/series/heatmap/heatmap.js +1 -1
- package/esm/series/heatmap/heatmap.js.map +1 -1
- package/esm/series/interface/theme.d.ts +2 -0
- package/esm/series/interface/theme.js +4 -1
- package/esm/series/interface/theme.js.map +1 -1
- package/esm/series/interface/type.d.ts +2 -1
- package/esm/series/interface/type.js +2 -1
- package/esm/series/interface/type.js.map +1 -1
- package/esm/series/link/link.js +1 -1
- package/esm/series/link/link.js.map +1 -1
- package/esm/series/map/map.js +1 -1
- package/esm/series/map/map.js.map +1 -1
- package/esm/series/polar/progress-like/progress-like.d.ts +1 -1
- package/esm/series/polar/progress-like/progress-like.js +2 -3
- package/esm/series/polar/progress-like/progress-like.js.map +1 -1
- package/esm/series/progress/circular/circular.js +4 -4
- package/esm/series/progress/circular/circular.js.map +1 -1
- package/esm/series/range-area/interface.d.ts +2 -1
- package/esm/series/range-area/interface.js.map +1 -1
- package/esm/series/range-column/range-column.js +8 -7
- package/esm/series/range-column/range-column.js.map +1 -1
- package/esm/series/rose/rose.d.ts +1 -1
- package/esm/series/rose/rose.js +1 -1
- package/esm/series/rose/rose.js.map +1 -1
- package/esm/series/sankey/sankey.js +6 -8
- package/esm/series/sankey/sankey.js.map +1 -1
- package/esm/series/waterfall/waterfall.d.ts +1 -1
- package/esm/series/waterfall/waterfall.js +7 -7
- package/esm/series/waterfall/waterfall.js.map +1 -1
- package/esm/series/word-cloud/base.js +33 -35
- package/esm/series/word-cloud/base.js.map +1 -1
- package/esm/series/word-cloud/word-cloud-3d.js +32 -32
- package/esm/series/word-cloud/word-cloud-3d.js.map +1 -1
- package/esm/theme/builtin/common/mark.js +10 -0
- package/esm/theme/builtin/common/mark.js.map +1 -1
- package/esm/theme/builtin/index.d.ts +4 -1
- package/esm/theme/builtin/index.js +15 -6
- package/esm/theme/builtin/index.js.map +1 -1
- package/esm/theme/color-scheme/util.js +1 -1
- package/esm/theme/color-scheme/util.js.map +1 -1
- package/esm/theme/theme-manager.js +5 -4
- package/esm/theme/theme-manager.js.map +1 -1
- package/esm/theme/util.d.ts +5 -0
- package/esm/theme/util.js +34 -0
- package/esm/theme/util.js.map +1 -0
- package/esm/typings/tooltip/tooltip.d.ts +2 -1
- package/esm/typings/tooltip/tooltip.js.map +1 -1
- package/esm/util/spec/merge-theme.d.ts +4 -1
- package/esm/util/spec/merge-theme.js +18 -10
- package/esm/util/spec/merge-theme.js.map +1 -1
- package/esm/util/spec/preprocess.js +2 -1
- package/esm/util/spec/preprocess.js.map +1 -1
- package/package.json +5 -5
package/build/index.js
CHANGED
|
@@ -26874,7 +26874,7 @@
|
|
|
26874
26874
|
return isObject$2(obj) && obj.type === 'palette' && !!obj.key;
|
|
26875
26875
|
}
|
|
26876
26876
|
function isProgressiveDataColorScheme(obj) {
|
|
26877
|
-
if (!isArray$1(obj)) {
|
|
26877
|
+
if (!isArray$1(obj) || obj.length === 0) {
|
|
26878
26878
|
return false;
|
|
26879
26879
|
}
|
|
26880
26880
|
return obj.every(item => {
|
|
@@ -28408,11 +28408,10 @@
|
|
|
28408
28408
|
}, this.graphicItem.setAttributes(this.graphicItem.attribute), this.clearGraphicAttributes(), this.mark.needAnimate() && (this.setPrevGraphicAttributes({}), this.setNextGraphicAttributes(attributes), this.setFinalGraphicAttributes(attributes)));
|
|
28409
28409
|
}
|
|
28410
28410
|
updateGraphicItem(config) {
|
|
28411
|
-
var _a;
|
|
28412
28411
|
if (!this.graphicItem) return;
|
|
28413
28412
|
isNil$1(config.clip) || this.graphicItem.setAttribute("clip", config.clip), isNil$1(config.interactive) || this.graphicItem.setAttribute("pickable", config.interactive), isNil$1(config.zIndex) || this.graphicItem.setAttribute("zIndex", config.zIndex), this.diffState === DiffState.exit ? this.graphicItem.releaseStatus = "willRelease" : this.graphicItem.releaseStatus = void 0;
|
|
28414
|
-
const
|
|
28415
|
-
|
|
28413
|
+
const stateAnimation = this.mark.animate.getAnimationConfigs("state");
|
|
28414
|
+
0 !== stateAnimation.length && (this.graphicItem.stateAnimateConfig = stateAnimation[0].originConfig);
|
|
28416
28415
|
}
|
|
28417
28416
|
getGraphicItem() {
|
|
28418
28417
|
return this.graphicItem;
|
|
@@ -28487,9 +28486,8 @@
|
|
|
28487
28486
|
});
|
|
28488
28487
|
}
|
|
28489
28488
|
clearStates(hasAnimation) {
|
|
28490
|
-
|
|
28491
|
-
|
|
28492
|
-
this.states = [], this.graphicItem && this.graphicItem.clearStates(stateAnimation), this.runtimeStatesEncoder && (this.runtimeStatesEncoder = {});
|
|
28489
|
+
const stateAnimationEnable = isBoolean$1(hasAnimation) ? hasAnimation : 0 !== this.mark.animate.getAnimationConfigs("state").length;
|
|
28490
|
+
this.states = [], this.graphicItem && this.graphicItem.clearStates(stateAnimationEnable), this.runtimeStatesEncoder && (this.runtimeStatesEncoder = {});
|
|
28493
28491
|
}
|
|
28494
28492
|
_updateRuntimeStates(state, attrs) {
|
|
28495
28493
|
this.runtimeStatesEncoder || (this.runtimeStatesEncoder = {}), this.runtimeStatesEncoder[state] = attrs;
|
|
@@ -28511,15 +28509,15 @@
|
|
|
28511
28509
|
}), this.useStates(nextStates));
|
|
28512
28510
|
}
|
|
28513
28511
|
useStates(states, hasAnimation) {
|
|
28514
|
-
var _a
|
|
28512
|
+
var _a;
|
|
28515
28513
|
if (!this.graphicItem) return;
|
|
28516
28514
|
this.mark.emit(HOOK_EVENT.BEFORE_ELEMENT_STATE, {
|
|
28517
28515
|
states: states
|
|
28518
28516
|
}, this), this.states = states.slice();
|
|
28519
28517
|
const stateSort = null === (_a = this.mark.getSpec()) || void 0 === _a ? void 0 : _a.stateSort;
|
|
28520
28518
|
stateSort && this.states.sort(stateSort);
|
|
28521
|
-
const
|
|
28522
|
-
this.graphicItem.stateProxy = this.getStateAttrs, this.graphicItem.useStates(this.states,
|
|
28519
|
+
const stateAnimationEnable = isBoolean$1(hasAnimation) ? hasAnimation : 0 !== this.mark.animate.getAnimationConfigs("state").length;
|
|
28520
|
+
this.graphicItem.stateProxy = this.getStateAttrs, this.graphicItem.useStates(this.states, stateAnimationEnable), this.mark.emit(HOOK_EVENT.AFTER_ELEMENT_STATE, {
|
|
28523
28521
|
states: states
|
|
28524
28522
|
}, this);
|
|
28525
28523
|
}
|
|
@@ -38031,7 +38029,10 @@
|
|
|
38031
38029
|
count = 0;
|
|
38032
38030
|
this.logger.canLogInfo() && (dt = Date.now(), this.logger.debug(`-- START PROPAGATION (${this._updateCounter}) -----`)), this._beforeEvaluate();
|
|
38033
38031
|
try {
|
|
38034
|
-
for (; this._heap.size() > 0;) grammar = this._heap.pop(), grammar.rank === grammar.qrank
|
|
38032
|
+
for (; this._heap.size() > 0;) if (grammar = this._heap.pop(), grammar.rank === grammar.qrank) {
|
|
38033
|
+
if (next = grammar.run(), next && next.then && (next = yield next), !this._isRunning) return !1;
|
|
38034
|
+
this._logGrammarRunInfo(grammar), this._enqueueTargets(grammar), count += 1;
|
|
38035
|
+
} else this._enqueue(grammar);
|
|
38035
38036
|
} catch (err) {
|
|
38036
38037
|
this._heap.clear(), error = err;
|
|
38037
38038
|
}
|
|
@@ -38047,6 +38048,9 @@
|
|
|
38047
38048
|
for (this.logger.canLogInfo() && (dt = Date.now(), this.logger.debug(`-- START PROPAGATION (${this._updateCounter}) -----`)), this._beforeEvaluate(); this._heap.size() > 0;) grammar = this._heap.pop(), grammar.rank === grammar.qrank ? (grammar.runSync(), this._logGrammarRunInfo(grammar), this._enqueueTargets(grammar), count += 1) : this._enqueue(grammar);
|
|
38048
38049
|
return this._isRunning = !1, this.logger.canLogInfo() && (dt = Date.now() - dt, this.logger.info(`> ${count} grammars updated; ${dt} ms`)), this._afterRunner && this._afterRunner(this), this._finishFirstRender = !0, !0;
|
|
38049
38050
|
}
|
|
38051
|
+
stop() {
|
|
38052
|
+
this._isRunning && (this._isRunning = !1);
|
|
38053
|
+
}
|
|
38050
38054
|
runBefore(callback) {
|
|
38051
38055
|
this._beforeRunner = callback;
|
|
38052
38056
|
}
|
|
@@ -38054,7 +38058,7 @@
|
|
|
38054
38058
|
this._afterRunner = callback;
|
|
38055
38059
|
}
|
|
38056
38060
|
release() {
|
|
38057
|
-
this._heap && (this._heap.clear(), this._heap = null), this.logger = null, this._committed = null;
|
|
38061
|
+
this.stop(), this._heap && (this._heap.clear(), this._heap = null), this.logger = null, this._committed = null;
|
|
38058
38062
|
}
|
|
38059
38063
|
}
|
|
38060
38064
|
|
|
@@ -42979,13 +42983,12 @@
|
|
|
42979
42983
|
}), this.clearGraphicAttributes();
|
|
42980
42984
|
}
|
|
42981
42985
|
useStates(states, hasAnimation) {
|
|
42982
|
-
var _a;
|
|
42983
42986
|
if (!this.graphicItem) return;
|
|
42984
42987
|
this.mark.emit(HOOK_EVENT.BEFORE_ELEMENT_STATE, {
|
|
42985
42988
|
states: states
|
|
42986
42989
|
}, this), this.states = states.slice();
|
|
42987
|
-
const
|
|
42988
|
-
this.graphicItem.glyphStateProxy = this.getStateAttrs, this.graphicItem.useStates(this.states,
|
|
42990
|
+
const stateAnimationEnable = isBoolean$1(hasAnimation) ? hasAnimation : 0 !== this.mark.animate.getAnimationConfigs("state").length;
|
|
42991
|
+
this.graphicItem.glyphStateProxy = this.getStateAttrs, this.graphicItem.useStates(this.states, stateAnimationEnable), this.mark.emit(HOOK_EVENT.AFTER_ELEMENT_STATE, {
|
|
42989
42992
|
states: states
|
|
42990
42993
|
}, this);
|
|
42991
42994
|
}
|
|
@@ -43543,6 +43546,10 @@
|
|
|
43543
43546
|
constructor(mark, config) {
|
|
43544
43547
|
this.state = null, this.immediateConfigs = [], this.isEnabled = !0, this.disabledStates = [], this.animators = new Map(), this.elementRecorder = new WeakMap(), this.timelineCount = {}, this.mark = mark, this.configs = normalizeAnimationConfig(null != config ? config : {});
|
|
43545
43548
|
}
|
|
43549
|
+
getAnimationConfigs(animationState) {
|
|
43550
|
+
var _a;
|
|
43551
|
+
return this.isEnabled ? (null !== (_a = this.configs) && void 0 !== _a ? _a : []).filter(config => config.state === animationState) : [];
|
|
43552
|
+
}
|
|
43546
43553
|
updateConfig(config) {
|
|
43547
43554
|
this.configs = normalizeAnimationConfig(null != config ? config : {});
|
|
43548
43555
|
}
|
|
@@ -45841,6 +45848,18 @@
|
|
|
45841
45848
|
},
|
|
45842
45849
|
dataLabels: []
|
|
45843
45850
|
};
|
|
45851
|
+
const lineDataLabel = {
|
|
45852
|
+
type: "line-data",
|
|
45853
|
+
data: [{
|
|
45854
|
+
text: ""
|
|
45855
|
+
}],
|
|
45856
|
+
position: "top",
|
|
45857
|
+
overlap: {
|
|
45858
|
+
avoidBaseMark: !1,
|
|
45859
|
+
clampForce: !1
|
|
45860
|
+
},
|
|
45861
|
+
smartInvert: !1
|
|
45862
|
+
};
|
|
45844
45863
|
const lineLabel = {
|
|
45845
45864
|
type: "line",
|
|
45846
45865
|
data: [{
|
|
@@ -45983,6 +46002,7 @@
|
|
|
45983
46002
|
rectLabel: rectLabel,
|
|
45984
46003
|
symbolLabel: symbolLabel$1,
|
|
45985
46004
|
arcLabel: arcLabel,
|
|
46005
|
+
lineDataLabel: lineDataLabel,
|
|
45986
46006
|
datazoom: datazoom,
|
|
45987
46007
|
continuousPlayer: continuousPlayer,
|
|
45988
46008
|
discretePlayer: discretePlayer,
|
|
@@ -46400,7 +46420,7 @@
|
|
|
46400
46420
|
this.event(eventConfig);
|
|
46401
46421
|
}), (null === (_j = spec.interactions) || void 0 === _j ? void 0 : _j.length) && spec.interactions.forEach(interaction => {
|
|
46402
46422
|
this.interaction(interaction.type, interaction);
|
|
46403
|
-
}), this.emit(HOOK_EVENT.AFTER_PARSE_VIEW), this._needBuildLayoutTree = !0, this._layoutState = LayoutState.before, this;
|
|
46423
|
+
}), !1 === spec.animation ? this.animate.disable() : this.animate.enable(), this.emit(HOOK_EVENT.AFTER_PARSE_VIEW), this._needBuildLayoutTree = !0, this._layoutState = LayoutState.before, this;
|
|
46404
46424
|
}
|
|
46405
46425
|
updateSpec(spec) {
|
|
46406
46426
|
return this.removeAllInteractions(), this.removeAllGrammars(), this.parseSpec(spec);
|
|
@@ -47642,14 +47662,15 @@
|
|
|
47642
47662
|
var _a;
|
|
47643
47663
|
const labelTheme = null === (_a = null == theme ? void 0 : theme.components) || void 0 === _a ? void 0 : _a.dataLabel,
|
|
47644
47664
|
dataLabels = marks.map((mark, index) => {
|
|
47645
|
-
var _a, _b, _c, _d, _e, _f;
|
|
47665
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
47646
47666
|
const labelParameters = Object.assign(Object.assign({}, parameters), {
|
|
47647
47667
|
labelIndex: index
|
|
47648
47668
|
});
|
|
47649
47669
|
let currentTheme = {};
|
|
47650
47670
|
switch (mark.markType) {
|
|
47651
47671
|
case GrammarMarkType.line:
|
|
47652
|
-
|
|
47672
|
+
case GrammarMarkType.area:
|
|
47673
|
+
currentTheme = null === (_a = null == theme ? void 0 : theme.components) || void 0 === _a ? void 0 : _a.lineDataLabel;
|
|
47653
47674
|
break;
|
|
47654
47675
|
case GrammarMarkType.rect:
|
|
47655
47676
|
case GrammarMarkType.interval:
|
|
@@ -47669,17 +47690,22 @@
|
|
|
47669
47690
|
default:
|
|
47670
47691
|
currentTheme = null === (_e = null == theme ? void 0 : theme.components) || void 0 === _e ? void 0 : _e.pointLabel;
|
|
47671
47692
|
}
|
|
47672
|
-
const data = []
|
|
47693
|
+
const data = [],
|
|
47694
|
+
themeDatum = null !== (_g = null === (_f = null == currentTheme ? void 0 : currentTheme.data) || void 0 === _f ? void 0 : _f[0]) && void 0 !== _g ? _g : {};
|
|
47673
47695
|
mark.elements.forEach(element => {
|
|
47674
|
-
|
|
47675
|
-
|
|
47696
|
+
if ("willRelease" !== element.getGraphicItem().releaseStatus) if (mark.isCollectionMark()) {
|
|
47697
|
+
element.getDatum().forEach(entry => {
|
|
47698
|
+
const attributes = invokeEncoder(encoder, entry, element, labelParameters);
|
|
47699
|
+
data.push(merge$1({}, themeDatum, attributes));
|
|
47700
|
+
});
|
|
47701
|
+
} else {
|
|
47676
47702
|
const attributes = invokeEncoder(encoder, element.getDatum(), element, labelParameters),
|
|
47677
|
-
datum = merge$1({},
|
|
47703
|
+
datum = merge$1({}, themeDatum, attributes);
|
|
47678
47704
|
data.push(datum);
|
|
47679
47705
|
}
|
|
47680
47706
|
});
|
|
47681
47707
|
const addition = invokeFunctionType(labelStyle, labelParameters, mark),
|
|
47682
|
-
graphicItemName = null === (
|
|
47708
|
+
graphicItemName = null === (_h = mark.graphicItem) || void 0 === _h ? void 0 : _h.name;
|
|
47683
47709
|
return merge$1({}, currentTheme, {
|
|
47684
47710
|
data: data,
|
|
47685
47711
|
baseMarkGroupName: graphicItemName,
|
|
@@ -49285,6 +49311,12 @@
|
|
|
49285
49311
|
style: {
|
|
49286
49312
|
stroke: false
|
|
49287
49313
|
}
|
|
49314
|
+
},
|
|
49315
|
+
barBackground: {
|
|
49316
|
+
visible: false,
|
|
49317
|
+
style: {
|
|
49318
|
+
fill: { type: 'palette', key: 'primaryFontColor', a: 0.06 }
|
|
49319
|
+
}
|
|
49288
49320
|
}
|
|
49289
49321
|
};
|
|
49290
49322
|
|
|
@@ -50418,6 +50450,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
50418
50450
|
SeriesMarkNameEnum["ripplePoint"] = "ripplePoint";
|
|
50419
50451
|
SeriesMarkNameEnum["centerPoint"] = "centerPoint";
|
|
50420
50452
|
SeriesMarkNameEnum["centerLabel"] = "centerLabel";
|
|
50453
|
+
SeriesMarkNameEnum["barBackground"] = "barBackground";
|
|
50421
50454
|
})(SeriesMarkNameEnum || (SeriesMarkNameEnum = {}));
|
|
50422
50455
|
const seriesMarkNameSet = new Set(Object.values(SeriesMarkNameEnum));
|
|
50423
50456
|
|
|
@@ -50450,7 +50483,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
50450
50483
|
[SeriesMarkNameEnum.label]: { name: SeriesMarkNameEnum.label, type: MarkTypeEnum.text }
|
|
50451
50484
|
};
|
|
50452
50485
|
|
|
50453
|
-
const barSeriesMark = Object.assign(Object.assign({}, baseSeriesMark), { [SeriesMarkNameEnum.bar]: { name: SeriesMarkNameEnum.bar, type: MarkTypeEnum.rect } });
|
|
50486
|
+
const barSeriesMark = Object.assign(Object.assign({}, baseSeriesMark), { [SeriesMarkNameEnum.bar]: { name: SeriesMarkNameEnum.bar, type: MarkTypeEnum.rect }, [SeriesMarkNameEnum.barBackground]: { name: SeriesMarkNameEnum.barBackground, type: MarkTypeEnum.rect } });
|
|
50454
50487
|
const bar3dSeriesMark = Object.assign(Object.assign({}, baseSeriesMark), { [SeriesMarkNameEnum.bar3d]: { name: SeriesMarkNameEnum.bar3d, type: MarkTypeEnum.rect3d } });
|
|
50455
50488
|
|
|
50456
50489
|
const lineLikeSeriesMark = {
|
|
@@ -50510,6 +50543,8 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
50510
50543
|
|
|
50511
50544
|
const correlationSeriesMark = Object.assign(Object.assign({}, baseSeriesMark), { [SeriesMarkNameEnum.nodePoint]: { name: SeriesMarkNameEnum.nodePoint, type: MarkTypeEnum.symbol }, [SeriesMarkNameEnum.ripplePoint]: { name: SeriesMarkNameEnum.ripplePoint, type: MarkTypeEnum.ripple }, [SeriesMarkNameEnum.centerPoint]: { name: SeriesMarkNameEnum.centerPoint, type: MarkTypeEnum.symbol }, [SeriesMarkNameEnum.centerLabel]: { name: SeriesMarkNameEnum.centerLabel, type: MarkTypeEnum.text } });
|
|
50512
50545
|
|
|
50546
|
+
const rangeAreaSeriesMark = Object.assign({}, areaSeriesMark);
|
|
50547
|
+
|
|
50513
50548
|
const seriesMarkInfoMap = {
|
|
50514
50549
|
[SeriesTypeEnum.bar]: barSeriesMark,
|
|
50515
50550
|
[SeriesTypeEnum.bar3d]: bar3dSeriesMark,
|
|
@@ -50539,7 +50574,8 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
50539
50574
|
[SeriesTypeEnum.rangeColumn]: rangeColumnSeriesMark,
|
|
50540
50575
|
[SeriesTypeEnum.circlePacking]: circlePackingSeriesMark,
|
|
50541
50576
|
[SeriesTypeEnum.heatmap]: heatmapSeriesMark,
|
|
50542
|
-
[SeriesTypeEnum.correlation]: correlationSeriesMark
|
|
50577
|
+
[SeriesTypeEnum.correlation]: correlationSeriesMark,
|
|
50578
|
+
[SeriesTypeEnum.rangeArea]: rangeAreaSeriesMark
|
|
50543
50579
|
};
|
|
50544
50580
|
|
|
50545
50581
|
function baseMerge(target, source, shallowArray = false) {
|
|
@@ -50656,32 +50692,37 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
50656
50692
|
if (!theme) {
|
|
50657
50693
|
return theme;
|
|
50658
50694
|
}
|
|
50659
|
-
|
|
50660
|
-
if (colorScheme) {
|
|
50661
|
-
colorScheme = Object.keys(colorScheme).reduce((scheme, key) => {
|
|
50662
|
-
const value = colorScheme[key];
|
|
50663
|
-
scheme[key] = transformColorSchemeToStandardStruct(value);
|
|
50664
|
-
return scheme;
|
|
50665
|
-
}, {});
|
|
50666
|
-
}
|
|
50695
|
+
const colorScheme = transformColorSchemeToMerge(theme.colorScheme);
|
|
50667
50696
|
let { series } = theme;
|
|
50668
50697
|
const { mark: markByType, markByName } = theme;
|
|
50669
50698
|
if (markByType || markByName) {
|
|
50670
50699
|
series = Object.keys(seriesMarkInfoMap).reduce((newSeriesTheme, key) => {
|
|
50671
50700
|
var _a;
|
|
50672
50701
|
const value = (_a = series === null || series === void 0 ? void 0 : series[key]) !== null && _a !== void 0 ? _a : {};
|
|
50673
|
-
|
|
50674
|
-
Object.values(seriesMarkInfoMap[key]).forEach(({ type, name }) => {
|
|
50675
|
-
var _a, _b;
|
|
50676
|
-
newValue[name] = mergeSpec({}, (_a = markByType === null || markByType === void 0 ? void 0 : markByType[array(type)[0]]) !== null && _a !== void 0 ? _a : {}, (_b = markByName === null || markByName === void 0 ? void 0 : markByName[name]) !== null && _b !== void 0 ? _b : {}, value[name]);
|
|
50677
|
-
});
|
|
50678
|
-
newSeriesTheme[key] = Object.assign(Object.assign({}, value), newValue);
|
|
50702
|
+
newSeriesTheme[key] = transformSeriesThemeToMerge(value, key, markByType, markByName);
|
|
50679
50703
|
return newSeriesTheme;
|
|
50680
50704
|
}, {});
|
|
50681
50705
|
}
|
|
50682
50706
|
return Object.assign(Object.assign({}, theme), { colorScheme,
|
|
50683
50707
|
series });
|
|
50684
50708
|
}
|
|
50709
|
+
function transformColorSchemeToMerge(colorScheme) {
|
|
50710
|
+
if (colorScheme) {
|
|
50711
|
+
colorScheme = Object.keys(colorScheme).reduce((scheme, key) => {
|
|
50712
|
+
const value = colorScheme[key];
|
|
50713
|
+
scheme[key] = transformColorSchemeToStandardStruct(value);
|
|
50714
|
+
return scheme;
|
|
50715
|
+
}, {});
|
|
50716
|
+
}
|
|
50717
|
+
return colorScheme;
|
|
50718
|
+
}
|
|
50719
|
+
function transformSeriesThemeToMerge(seriesTheme, seriesType, markByType, markByName) {
|
|
50720
|
+
const newTheme = {};
|
|
50721
|
+
Object.values(seriesMarkInfoMap[seriesType]).forEach(({ type, name }) => {
|
|
50722
|
+
newTheme[name] = mergeSpec({}, markByType === null || markByType === void 0 ? void 0 : markByType[array(type)[0]], markByName === null || markByName === void 0 ? void 0 : markByName[name], seriesTheme === null || seriesTheme === void 0 ? void 0 : seriesTheme[name]);
|
|
50723
|
+
});
|
|
50724
|
+
return Object.assign(Object.assign({}, seriesTheme), newTheme);
|
|
50725
|
+
}
|
|
50685
50726
|
|
|
50686
50727
|
const colorScheme = {
|
|
50687
50728
|
default: {
|
|
@@ -50728,18 +50769,19 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
50728
50769
|
}
|
|
50729
50770
|
};
|
|
50730
50771
|
|
|
50731
|
-
const
|
|
50732
|
-
[lightTheme.name
|
|
50733
|
-
[darkTheme.name
|
|
50734
|
-
|
|
50772
|
+
const builtinThemes = {
|
|
50773
|
+
[lightTheme.name]: lightTheme,
|
|
50774
|
+
[darkTheme.name]: darkTheme
|
|
50775
|
+
};
|
|
50735
50776
|
const defaultThemeName = lightTheme.name;
|
|
50736
|
-
const themes = new Map([
|
|
50737
|
-
const
|
|
50738
|
-
|
|
50739
|
-
|
|
50740
|
-
|
|
50741
|
-
|
|
50742
|
-
|
|
50777
|
+
const themes = new Map(Object.keys(builtinThemes).map(key => [key, builtinThemes[key]]));
|
|
50778
|
+
const hasThemeMerged = new Map(Object.keys(builtinThemes).map(key => [key, key === defaultThemeName]));
|
|
50779
|
+
const getMergedTheme = (theme) => mergeTheme({}, themes.get(defaultThemeName), theme);
|
|
50780
|
+
const defaultChartLevelTheme = {
|
|
50781
|
+
background: getActualColor(builtinThemes[defaultThemeName].background, builtinThemes[defaultThemeName].colorScheme),
|
|
50782
|
+
fontFamily: builtinThemes[defaultThemeName].fontFamily,
|
|
50783
|
+
colorScheme: builtinThemes[defaultThemeName].colorScheme
|
|
50784
|
+
};
|
|
50743
50785
|
|
|
50744
50786
|
class InstanceManager {
|
|
50745
50787
|
static registerInstance(instance) {
|
|
@@ -50772,12 +50814,16 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
50772
50814
|
return;
|
|
50773
50815
|
}
|
|
50774
50816
|
ThemeManager.themes.set(name, getMergedTheme(theme));
|
|
50817
|
+
hasThemeMerged.set(name, true);
|
|
50775
50818
|
}
|
|
50776
50819
|
static getTheme(name) {
|
|
50820
|
+
if (hasThemeMerged.has(name) && !hasThemeMerged.get(name)) {
|
|
50821
|
+
ThemeManager.registerTheme(name, ThemeManager.themes.get(name));
|
|
50822
|
+
}
|
|
50777
50823
|
return ThemeManager.themes.get(name) || ThemeManager.getDefaultTheme();
|
|
50778
50824
|
}
|
|
50779
50825
|
static removeTheme(name) {
|
|
50780
|
-
return ThemeManager.themes.delete(name);
|
|
50826
|
+
return ThemeManager.themes.delete(name) && hasThemeMerged.delete(name);
|
|
50781
50827
|
}
|
|
50782
50828
|
static themeExist(name) {
|
|
50783
50829
|
if (!isString$1(name)) {
|
|
@@ -50877,6 +50923,9 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
50877
50923
|
}
|
|
50878
50924
|
|
|
50879
50925
|
function preprocessSpecOrTheme(type, obj, colorScheme, seriesType) {
|
|
50926
|
+
if (isNil$1(obj)) {
|
|
50927
|
+
return obj;
|
|
50928
|
+
}
|
|
50880
50929
|
if (isArray$1(obj)) {
|
|
50881
50930
|
return obj.map(element => {
|
|
50882
50931
|
if (isObject$2(element) && !isFunction$1(element)) {
|
|
@@ -53709,6 +53758,55 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
53709
53758
|
}
|
|
53710
53759
|
}
|
|
53711
53760
|
|
|
53761
|
+
const mergeThemeAndGet = (path, currentThemeName, optionTheme, specTheme, colorScheme) => {
|
|
53762
|
+
if (isString$1(specTheme) && ThemeManager.themeExist(specTheme)) {
|
|
53763
|
+
return getMergedValue(getThemeValue(path, specTheme, colorScheme));
|
|
53764
|
+
}
|
|
53765
|
+
else if (isString$1(optionTheme) && ThemeManager.themeExist(optionTheme)) {
|
|
53766
|
+
return getMergedValue(getThemeValue(path, optionTheme, colorScheme), getThemeValue(path, specTheme, colorScheme));
|
|
53767
|
+
}
|
|
53768
|
+
return getMergedValue(getThemeValue(path, currentThemeName, colorScheme), getThemeValue(path, optionTheme, colorScheme), getThemeValue(path, specTheme, colorScheme));
|
|
53769
|
+
};
|
|
53770
|
+
const getThemeValue = (path, theme, colorScheme) => {
|
|
53771
|
+
let themeObject;
|
|
53772
|
+
if (isString$1(theme) && ThemeManager.themeExist(theme)) {
|
|
53773
|
+
themeObject = ThemeManager.getTheme(theme);
|
|
53774
|
+
}
|
|
53775
|
+
else if (isObject$2(theme)) {
|
|
53776
|
+
themeObject = theme;
|
|
53777
|
+
}
|
|
53778
|
+
if (isNil$1(themeObject)) {
|
|
53779
|
+
return undefined;
|
|
53780
|
+
}
|
|
53781
|
+
const paths = path.split('.');
|
|
53782
|
+
const colorSchemePath = 'colorScheme';
|
|
53783
|
+
if (path === colorSchemePath) {
|
|
53784
|
+
return transformColorSchemeToMerge(themeObject.colorScheme);
|
|
53785
|
+
}
|
|
53786
|
+
const backgroundPath = 'background';
|
|
53787
|
+
if (path === backgroundPath) {
|
|
53788
|
+
return getActualColor(themeObject.background, colorScheme);
|
|
53789
|
+
}
|
|
53790
|
+
const seriesPath = 'series';
|
|
53791
|
+
if (paths.length === 2 && paths[0] === seriesPath) {
|
|
53792
|
+
const { markByName, mark } = themeObject;
|
|
53793
|
+
return transformSeriesThemeToMerge(get$1(themeObject, paths), paths[1], mark, markByName);
|
|
53794
|
+
}
|
|
53795
|
+
return get$1(themeObject, paths);
|
|
53796
|
+
};
|
|
53797
|
+
const getMergedValue = (...sources) => {
|
|
53798
|
+
const tmpKey = '__TMP_KEY__';
|
|
53799
|
+
const obj = mergeSpec({}, ...sources.map(source => ({
|
|
53800
|
+
[tmpKey]: source
|
|
53801
|
+
})));
|
|
53802
|
+
return obj[tmpKey];
|
|
53803
|
+
};
|
|
53804
|
+
const getThemeFromOption = (path, option) => {
|
|
53805
|
+
var _a, _b;
|
|
53806
|
+
const { globalTheme = defaultThemeName, optionTheme, specTheme, chartLevelTheme = defaultChartLevelTheme } = (_b = (_a = option.getThemeConfig) === null || _a === void 0 ? void 0 : _a.call(option)) !== null && _b !== void 0 ? _b : {};
|
|
53807
|
+
return mergeThemeAndGet(path, globalTheme, optionTheme, specTheme, chartLevelTheme === null || chartLevelTheme === void 0 ? void 0 : chartLevelTheme.colorScheme);
|
|
53808
|
+
};
|
|
53809
|
+
|
|
53712
53810
|
class BaseModel extends LayoutItem {
|
|
53713
53811
|
getData() {
|
|
53714
53812
|
return this._data;
|
|
@@ -53848,19 +53946,26 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
53848
53946
|
this.setAttrFromSpec();
|
|
53849
53947
|
}
|
|
53850
53948
|
_initTheme(theme) {
|
|
53851
|
-
|
|
53949
|
+
if (theme) {
|
|
53950
|
+
this._theme = theme;
|
|
53951
|
+
}
|
|
53952
|
+
else {
|
|
53953
|
+
this._theme = this._getTheme();
|
|
53954
|
+
}
|
|
53852
53955
|
this._mergeMarkTheme();
|
|
53956
|
+
this._mergeThemeToSpec();
|
|
53853
53957
|
}
|
|
53854
|
-
|
|
53855
|
-
|
|
53958
|
+
_getTheme() {
|
|
53959
|
+
return undefined;
|
|
53856
53960
|
}
|
|
53857
53961
|
_mergeMarkTheme() {
|
|
53858
53962
|
var _a, _b;
|
|
53859
|
-
const
|
|
53860
|
-
if (isNil$1(
|
|
53963
|
+
const config = (_b = (_a = this._option).getThemeConfig) === null || _b === void 0 ? void 0 : _b.call(_a);
|
|
53964
|
+
if (isNil$1(config) || isNil$1(this._theme)) {
|
|
53861
53965
|
return;
|
|
53862
53966
|
}
|
|
53863
|
-
const
|
|
53967
|
+
const markThemeByType = getThemeFromOption('mark', this._option);
|
|
53968
|
+
const markThemeByName = getThemeFromOption('markByName', this._option);
|
|
53864
53969
|
this.getMarkInfoList().forEach(({ type, name }) => {
|
|
53865
53970
|
var _a, _b;
|
|
53866
53971
|
this._theme[name] = mergeSpec({}, (_a = markThemeByType === null || markThemeByType === void 0 ? void 0 : markThemeByType[array(type)[0]]) !== null && _a !== void 0 ? _a : {}, (_b = markThemeByName === null || markThemeByName === void 0 ? void 0 : markThemeByName[name]) !== null && _b !== void 0 ? _b : {}, this._theme[name]);
|
|
@@ -53890,17 +53995,28 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
53890
53995
|
return obj;
|
|
53891
53996
|
}
|
|
53892
53997
|
_prepareSpecAfterMergingTheme(obj) {
|
|
53893
|
-
var _a, _b, _c;
|
|
53894
53998
|
if (!arguments.length) {
|
|
53895
53999
|
obj = this._spec;
|
|
53896
54000
|
}
|
|
53897
|
-
const newObj = preprocessSpecOrTheme('spec', obj,
|
|
54001
|
+
const newObj = preprocessSpecOrTheme('spec', obj, this.getColorScheme(), this.modelType === 'series' ? this.type : undefined);
|
|
53898
54002
|
if (!arguments.length) {
|
|
53899
54003
|
this._spec = newObj;
|
|
53900
54004
|
}
|
|
53901
54005
|
return newObj;
|
|
53902
54006
|
}
|
|
53903
|
-
setCurrentTheme(
|
|
54007
|
+
setCurrentTheme(noRender) {
|
|
54008
|
+
return __awaiter$h(this, void 0, void 0, function* () {
|
|
54009
|
+
const modifyConfig = () => {
|
|
54010
|
+
this.reInit(this._getTheme());
|
|
54011
|
+
return { change: true, reMake: false };
|
|
54012
|
+
};
|
|
54013
|
+
if (noRender) {
|
|
54014
|
+
modifyConfig();
|
|
54015
|
+
}
|
|
54016
|
+
else {
|
|
54017
|
+
yield this._option.globalInstance.updateCustomConfigAndRerender(modifyConfig);
|
|
54018
|
+
}
|
|
54019
|
+
});
|
|
53904
54020
|
}
|
|
53905
54021
|
updateLayoutAttribute() {
|
|
53906
54022
|
}
|
|
@@ -53970,6 +54086,14 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
53970
54086
|
_getDataIdKey() {
|
|
53971
54087
|
return undefined;
|
|
53972
54088
|
}
|
|
54089
|
+
getColorScheme() {
|
|
54090
|
+
var _a, _b, _c;
|
|
54091
|
+
return ((_c = (_b = (_a = this._option).getThemeConfig) === null || _b === void 0 ? void 0 : _b.call(_a).chartLevelTheme) !== null && _c !== void 0 ? _c : defaultChartLevelTheme).colorScheme;
|
|
54092
|
+
}
|
|
54093
|
+
_getChartLevelTheme() {
|
|
54094
|
+
var _a, _b, _c;
|
|
54095
|
+
return (_c = (_b = (_a = this._option).getThemeConfig) === null || _b === void 0 ? void 0 : _b.call(_a).chartLevelTheme) !== null && _c !== void 0 ? _c : defaultChartLevelTheme;
|
|
54096
|
+
}
|
|
53973
54097
|
}
|
|
53974
54098
|
|
|
53975
54099
|
function isStateAttrChangeable(key, stateStyle, facetField) {
|
|
@@ -56484,7 +56608,6 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
56484
56608
|
}
|
|
56485
56609
|
}
|
|
56486
56610
|
_computeGradientAttr(gradientStyle, data, opt) {
|
|
56487
|
-
var _a, _b;
|
|
56488
56611
|
const { gradient, scale, field } = gradientStyle, rest = __rest$8(gradientStyle, ["gradient", "scale", "field"]);
|
|
56489
56612
|
const markData = this.getDataView();
|
|
56490
56613
|
let colorScale = scale;
|
|
@@ -56498,7 +56621,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
56498
56621
|
colorField = globalField;
|
|
56499
56622
|
}
|
|
56500
56623
|
}
|
|
56501
|
-
const themeColor = computeActualDataScheme(getDataScheme(
|
|
56624
|
+
const themeColor = computeActualDataScheme(getDataScheme(this.model.getColorScheme(), this.model.modelType === 'series' ? this.model.type : undefined), this.model.getDefaultColorDomain());
|
|
56502
56625
|
const computeStyle = {};
|
|
56503
56626
|
const mergedStyle = Object.assign(Object.assign({}, DEFAULT_GRADIENT_CONFIG[gradient]), rest);
|
|
56504
56627
|
Object.keys(mergedStyle).forEach(key => {
|
|
@@ -56530,7 +56653,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
56530
56653
|
return computeStyle;
|
|
56531
56654
|
}
|
|
56532
56655
|
_computeBorderAttr(borderStyle, data, opt) {
|
|
56533
|
-
var _a
|
|
56656
|
+
var _a;
|
|
56534
56657
|
const { scale, field } = borderStyle, mergedStyle = __rest$8(borderStyle, ["scale", "field"]);
|
|
56535
56658
|
const computeStyle = {};
|
|
56536
56659
|
Object.keys(mergedStyle).forEach(key => {
|
|
@@ -56543,7 +56666,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
56543
56666
|
}
|
|
56544
56667
|
});
|
|
56545
56668
|
if (!('stroke' in computeStyle)) {
|
|
56546
|
-
const themeColor = computeActualDataScheme(getDataScheme(
|
|
56669
|
+
const themeColor = computeActualDataScheme(getDataScheme(this.model.getColorScheme(), this.model.modelType === 'series' ? this.model.type : undefined), this.model.getDefaultColorDomain());
|
|
56547
56670
|
let colorScale = scale;
|
|
56548
56671
|
let colorField = field;
|
|
56549
56672
|
if ((!scale || !field) && this.model.modelType === 'series') {
|
|
@@ -56557,7 +56680,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
56557
56680
|
computeStyle.stroke = (colorScale === null || colorScale === void 0 ? void 0 : colorScale.scale(data[colorField])) || themeColor[0];
|
|
56558
56681
|
}
|
|
56559
56682
|
}
|
|
56560
|
-
else if (GradientType.includes((
|
|
56683
|
+
else if (GradientType.includes((_a = mergedStyle.stroke) === null || _a === void 0 ? void 0 : _a.gradient)) {
|
|
56561
56684
|
computeStyle.stroke = this._computeGradientAttr(mergedStyle.stroke, data, opt);
|
|
56562
56685
|
}
|
|
56563
56686
|
return computeStyle;
|
|
@@ -57249,6 +57372,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
57249
57372
|
}
|
|
57250
57373
|
};
|
|
57251
57374
|
this._observer = null;
|
|
57375
|
+
this._currentChartLevelTheme = {};
|
|
57252
57376
|
this._context = {};
|
|
57253
57377
|
this._onResize = debounce((...args) => {
|
|
57254
57378
|
const { width, height } = this._getCurSize();
|
|
@@ -57292,7 +57416,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
57292
57416
|
this._event = new Event$1(this._eventDispatcher, mode);
|
|
57293
57417
|
this._compiler.initView();
|
|
57294
57418
|
(_d = this.getStage()) === null || _d === void 0 ? void 0 : _d.setTheme({
|
|
57295
|
-
text: { fontFamily: this.
|
|
57419
|
+
text: { fontFamily: this._currentChartLevelTheme.fontFamily }
|
|
57296
57420
|
});
|
|
57297
57421
|
this._initDataSet(this._option.dataSet);
|
|
57298
57422
|
this._autoSize = isTrueBrowser(mode) ? (_f = (_e = spec.autoFit) !== null && _e !== void 0 ? _e : this._option.autoFit) !== null && _f !== void 0 ? _f : true : false;
|
|
@@ -57326,7 +57450,15 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
57326
57450
|
performanceHook: this._option.performanceHook,
|
|
57327
57451
|
viewBox: this._viewBox,
|
|
57328
57452
|
animation: this._option.animation,
|
|
57329
|
-
|
|
57453
|
+
getThemeConfig: () => {
|
|
57454
|
+
var _a;
|
|
57455
|
+
return ({
|
|
57456
|
+
globalTheme: this._currentThemeName,
|
|
57457
|
+
optionTheme: this._option.theme,
|
|
57458
|
+
specTheme: (_a = this._spec) === null || _a === void 0 ? void 0 : _a.theme,
|
|
57459
|
+
chartLevelTheme: this._currentChartLevelTheme
|
|
57460
|
+
});
|
|
57461
|
+
},
|
|
57330
57462
|
layout: this._option.layout,
|
|
57331
57463
|
onError: this._onError
|
|
57332
57464
|
});
|
|
@@ -57668,7 +57800,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
57668
57800
|
this._spec = spec;
|
|
57669
57801
|
if (!isEqual$1(lastSpec.theme, spec.theme)) {
|
|
57670
57802
|
this._updateCurrentTheme();
|
|
57671
|
-
(_a = this._chart) === null || _a === void 0 ? void 0 : _a.setCurrentTheme(
|
|
57803
|
+
(_a = this._chart) === null || _a === void 0 ? void 0 : _a.setCurrentTheme();
|
|
57672
57804
|
}
|
|
57673
57805
|
const reSize = this._updateChartConfiguration(lastSpec);
|
|
57674
57806
|
(_c = (_b = this._compiler) === null || _b === void 0 ? void 0 : _b.getVGrammarView()) === null || _c === void 0 ? void 0 : _c.updateLayoutTag();
|
|
@@ -57807,6 +57939,9 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
57807
57939
|
}
|
|
57808
57940
|
off(eType, handler) {
|
|
57809
57941
|
var _a;
|
|
57942
|
+
if (!this._userEvents || this._userEvents.length === 0) {
|
|
57943
|
+
return;
|
|
57944
|
+
}
|
|
57810
57945
|
if (handler) {
|
|
57811
57946
|
const index = this._userEvents.findIndex(e => e.eType === eType && e.handler === handler);
|
|
57812
57947
|
if (index >= 0) {
|
|
@@ -57843,34 +57978,20 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
57843
57978
|
this._chart.setHovered(datum, filter, region);
|
|
57844
57979
|
}
|
|
57845
57980
|
_updateCurrentTheme(nextThemeName) {
|
|
57846
|
-
var _a, _b
|
|
57847
|
-
|
|
57848
|
-
|
|
57849
|
-
|
|
57850
|
-
if (ThemeManager.themeExist(nextThemeName)) {
|
|
57851
|
-
const newTheme = ThemeManager.getTheme(nextThemeName);
|
|
57852
|
-
optionTheme = !optionTheme || isString$1(optionTheme) ? {} : optionTheme;
|
|
57853
|
-
specTheme = !specTheme || isString$1(specTheme) ? {} : specTheme;
|
|
57854
|
-
finalTheme = mergeTheme({}, newTheme, optionTheme, specTheme);
|
|
57981
|
+
var _a, _b;
|
|
57982
|
+
const optionTheme = this._option.theme;
|
|
57983
|
+
const specTheme = (_a = this._spec) === null || _a === void 0 ? void 0 : _a.theme;
|
|
57984
|
+
if (nextThemeName) {
|
|
57855
57985
|
this._currentThemeName = nextThemeName;
|
|
57856
57986
|
}
|
|
57857
|
-
|
|
57858
|
-
|
|
57859
|
-
|
|
57860
|
-
|
|
57861
|
-
|
|
57862
|
-
|
|
57863
|
-
|
|
57864
|
-
|
|
57865
|
-
}
|
|
57866
|
-
else {
|
|
57867
|
-
const baseTheme = getThemeObject(this._currentThemeName);
|
|
57868
|
-
finalTheme = mergeTheme({}, baseTheme, getThemeObject(optionTheme), getThemeObject(specTheme));
|
|
57869
|
-
}
|
|
57870
|
-
}
|
|
57871
|
-
this._currentTheme = preprocessSpecOrTheme('theme', finalTheme, finalTheme.colorScheme);
|
|
57872
|
-
setPoptipTheme(preprocessSpecOrTheme('mark-theme', mergeSpec({}, (_b = this._currentTheme.component) === null || _b === void 0 ? void 0 : _b.poptip)));
|
|
57873
|
-
(_c = this._compiler) === null || _c === void 0 ? void 0 : _c.setBackground(this._getBackground());
|
|
57987
|
+
const colorScheme = mergeThemeAndGet('colorScheme', this._currentThemeName, optionTheme, specTheme);
|
|
57988
|
+
this._currentChartLevelTheme = {
|
|
57989
|
+
colorScheme,
|
|
57990
|
+
background: mergeThemeAndGet('background', this._currentThemeName, optionTheme, specTheme, colorScheme),
|
|
57991
|
+
fontFamily: mergeThemeAndGet('fontFamily', this._currentThemeName, optionTheme, specTheme, colorScheme)
|
|
57992
|
+
};
|
|
57993
|
+
setPoptipTheme(preprocessSpecOrTheme('mark-theme', mergeThemeAndGet('component.poptip', this._currentThemeName, optionTheme, specTheme, colorScheme), colorScheme));
|
|
57994
|
+
(_b = this._compiler) === null || _b === void 0 ? void 0 : _b.setBackground(this._getBackground());
|
|
57874
57995
|
}
|
|
57875
57996
|
_updateChartConfiguration(oldSpec) {
|
|
57876
57997
|
var _a, _b;
|
|
@@ -57888,10 +58009,10 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
57888
58009
|
}
|
|
57889
58010
|
_getBackground() {
|
|
57890
58011
|
const specBackground = typeof this._spec.background === 'string' ? this._spec.background : null;
|
|
57891
|
-
return specBackground || this.
|
|
58012
|
+
return specBackground || this._currentChartLevelTheme.background || this._option.background;
|
|
57892
58013
|
}
|
|
57893
58014
|
getCurrentTheme() {
|
|
57894
|
-
return this.
|
|
58015
|
+
return getThemeObject(this._currentThemeName);
|
|
57895
58016
|
}
|
|
57896
58017
|
getCurrentThemeName() {
|
|
57897
58018
|
return this._currentThemeName;
|
|
@@ -57904,7 +58025,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
57904
58025
|
yield this.updateCustomConfigAndRerender(() => {
|
|
57905
58026
|
var _a;
|
|
57906
58027
|
this._updateCurrentTheme(name);
|
|
57907
|
-
(_a = this._chart) === null || _a === void 0 ? void 0 : _a.setCurrentTheme(
|
|
58028
|
+
(_a = this._chart) === null || _a === void 0 ? void 0 : _a.setCurrentTheme(true);
|
|
57908
58029
|
return { change: true, reMake: false };
|
|
57909
58030
|
});
|
|
57910
58031
|
return this;
|
|
@@ -57917,7 +58038,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
57917
58038
|
this.updateCustomConfigAndRerenderSync(() => {
|
|
57918
58039
|
var _a;
|
|
57919
58040
|
this._updateCurrentTheme(name);
|
|
57920
|
-
(_a = this._chart) === null || _a === void 0 ? void 0 : _a.setCurrentTheme(
|
|
58041
|
+
(_a = this._chart) === null || _a === void 0 ? void 0 : _a.setCurrentTheme(true);
|
|
57921
58042
|
return { change: true, reMake: false };
|
|
57922
58043
|
});
|
|
57923
58044
|
return this;
|
|
@@ -58208,7 +58329,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
58208
58329
|
};
|
|
58209
58330
|
registerVChartCore();
|
|
58210
58331
|
|
|
58211
|
-
const version = "1.
|
|
58332
|
+
const version = "1.6.0-alpha.0";
|
|
58212
58333
|
|
|
58213
58334
|
class ChartData {
|
|
58214
58335
|
get dataList() {
|
|
@@ -58646,7 +58767,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
58646
58767
|
return this._chartData;
|
|
58647
58768
|
}
|
|
58648
58769
|
constructor(spec, option) {
|
|
58649
|
-
var _a, _b, _c
|
|
58770
|
+
var _a, _b, _c;
|
|
58650
58771
|
super(option);
|
|
58651
58772
|
this.type = 'chart';
|
|
58652
58773
|
this.id = createID();
|
|
@@ -58770,12 +58891,11 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
58770
58891
|
}
|
|
58771
58892
|
return undefined;
|
|
58772
58893
|
};
|
|
58773
|
-
this.
|
|
58774
|
-
this._paddingSpec = normalizeLayoutPaddingSpec((_a = spec.padding) !== null && _a !== void 0 ? _a : (_b = this._theme) === null || _b === void 0 ? void 0 : _b.padding);
|
|
58894
|
+
this._paddingSpec = normalizeLayoutPaddingSpec((_a = spec.padding) !== null && _a !== void 0 ? _a : getThemeFromOption('padding', this._option));
|
|
58775
58895
|
this._event = new Event$1(option.eventDispatcher, option.mode);
|
|
58776
58896
|
this._dataSet = option.dataSet;
|
|
58777
|
-
this._chartData = new ChartData(this._dataSet, (
|
|
58778
|
-
this._modelOption = Object.assign(Object.assign({}, option), { mode: this._option.mode, map: this._idMap, getChartLayoutRect: () => this._layoutRect, getChartViewRect: () => this._viewRect, getChart: () => this, globalScale: this._globalScale, onError: (
|
|
58897
|
+
this._chartData = new ChartData(this._dataSet, (_b = this._option) === null || _b === void 0 ? void 0 : _b.onError);
|
|
58898
|
+
this._modelOption = Object.assign(Object.assign({}, option), { mode: this._option.mode, map: this._idMap, getChartLayoutRect: () => this._layoutRect, getChartViewRect: () => this._viewRect, getChart: () => this, globalScale: this._globalScale, onError: (_c = this._option) === null || _c === void 0 ? void 0 : _c.onError });
|
|
58779
58899
|
this._stack = new Stack(this);
|
|
58780
58900
|
this._spec = spec;
|
|
58781
58901
|
}
|
|
@@ -58885,7 +59005,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
58885
59005
|
if (!region) {
|
|
58886
59006
|
return;
|
|
58887
59007
|
}
|
|
58888
|
-
const series = Factory.createSeries(spec.type, spec, Object.assign(Object.assign({}, this._modelOption), { region, specIndex: index, specKey: 'series',
|
|
59008
|
+
const series = Factory.createSeries(spec.type, spec, Object.assign(Object.assign({}, this._modelOption), { region, specIndex: index, specKey: 'series', globalScale: this._globalScale, getSeriesData: this._chartData.getSeriesData.bind(this._chartData), sourceDataList: this._chartData.dataList }));
|
|
58889
59009
|
if (series) {
|
|
58890
59010
|
series.created();
|
|
58891
59011
|
this._series.push(series);
|
|
@@ -58900,7 +59020,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
58900
59020
|
return this._series.find(x => x.id === id);
|
|
58901
59021
|
}
|
|
58902
59022
|
_createComponent(Component, spec) {
|
|
58903
|
-
const component = Component.createComponent(spec, Object.assign(Object.assign({}, this._modelOption), { getAllRegions: this.getAllRegions, getRegionsInIndex: this.getRegionsInIndex, getRegionsInIds: this.getRegionsInIds, getRegionsInUserIdOrIndex: this.getRegionsInUserIdOrIndex,
|
|
59023
|
+
const component = Component.createComponent(spec, Object.assign(Object.assign({}, this._modelOption), { getAllRegions: this.getAllRegions, getRegionsInIndex: this.getRegionsInIndex, getRegionsInIds: this.getRegionsInIds, getRegionsInUserIdOrIndex: this.getRegionsInUserIdOrIndex, getAllSeries: this.getAllSeries, getSeriesInIndex: this.getSeriesInIndex, getSeriesInIds: this.getSeriesInIds, getSeriesInUserIdOrIndex: this.getSeriesInUserIdOrIndex, getAllComponents: this.getComponents, getComponentByIndex: this.getComponentByIndex, getComponentByUserId: this.getComponentByUserId, getComponentsByKey: this.getComponentsByKey }));
|
|
58904
59024
|
if (!component) {
|
|
58905
59025
|
return;
|
|
58906
59026
|
}
|
|
@@ -58979,10 +59099,13 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
58979
59099
|
if (this._spec.zField || (this._spec.series && this._spec.series.some((s) => s.zField))) {
|
|
58980
59100
|
use3dLayout = true;
|
|
58981
59101
|
}
|
|
58982
|
-
const
|
|
58983
|
-
|
|
58984
|
-
|
|
58985
|
-
|
|
59102
|
+
const constructor = Factory.getLayoutInKey((_b = (_a = this._spec.layout) === null || _a === void 0 ? void 0 : _a.type) !== null && _b !== void 0 ? _b : (use3dLayout ? 'layout3d' : 'base'));
|
|
59103
|
+
if (constructor) {
|
|
59104
|
+
const layout = new constructor(this._spec.layout, {
|
|
59105
|
+
onError: (_c = this._option) === null || _c === void 0 ? void 0 : _c.onError
|
|
59106
|
+
});
|
|
59107
|
+
this._layoutFunc = layout.layoutItems.bind(layout);
|
|
59108
|
+
}
|
|
58986
59109
|
}
|
|
58987
59110
|
}
|
|
58988
59111
|
layout(params) {
|
|
@@ -59093,9 +59216,10 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
59093
59216
|
return this._chartData.getSeriesData(id, index);
|
|
59094
59217
|
}
|
|
59095
59218
|
_transformSpecScale() {
|
|
59096
|
-
var _a, _b
|
|
59219
|
+
var _a, _b;
|
|
59097
59220
|
const scales = (_a = this._spec.scales) !== null && _a !== void 0 ? _a : [];
|
|
59098
59221
|
let colorScaleSpec = scales.find(s => s.id === 'color');
|
|
59222
|
+
const colorScheme = this.getColorScheme();
|
|
59099
59223
|
if (!colorScaleSpec) {
|
|
59100
59224
|
colorScaleSpec = {
|
|
59101
59225
|
type: 'ordinal',
|
|
@@ -59107,12 +59231,12 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
59107
59231
|
if (this._spec.color) {
|
|
59108
59232
|
const colorSpec = this._spec.color;
|
|
59109
59233
|
if (isArray$1(colorSpec)) {
|
|
59110
|
-
colorScaleSpec.range = colorSpec.map(color =>
|
|
59234
|
+
colorScaleSpec.range = colorSpec.map(color => getActualColor(color, colorScheme));
|
|
59111
59235
|
}
|
|
59112
59236
|
else {
|
|
59113
59237
|
const tempSpec = colorSpec;
|
|
59114
59238
|
if (tempSpec.range) {
|
|
59115
|
-
tempSpec.range = tempSpec.range.map(color =>
|
|
59239
|
+
tempSpec.range = tempSpec.range.map(color => getActualColor(color, colorScheme));
|
|
59116
59240
|
}
|
|
59117
59241
|
Object.prototype.hasOwnProperty.call(tempSpec, 'type') && (colorScaleSpec.type = tempSpec.type);
|
|
59118
59242
|
Object.prototype.hasOwnProperty.call(tempSpec, 'domain') && (colorScaleSpec.domain = tempSpec.domain);
|
|
@@ -59123,7 +59247,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
59123
59247
|
}
|
|
59124
59248
|
}
|
|
59125
59249
|
if (!((_b = colorScaleSpec.range) === null || _b === void 0 ? void 0 : _b.length)) {
|
|
59126
|
-
colorScaleSpec.range = getDataScheme(
|
|
59250
|
+
colorScaleSpec.range = getDataScheme(colorScheme);
|
|
59127
59251
|
colorScaleSpec.rangeTheme = true;
|
|
59128
59252
|
}
|
|
59129
59253
|
return scales;
|
|
@@ -59145,10 +59269,10 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
59145
59269
|
mergeUpdateResult(result, this._globalScale.updateSpec(this._transformSpecScale()));
|
|
59146
59270
|
}
|
|
59147
59271
|
updateGlobalScaleTheme() {
|
|
59148
|
-
var _a;
|
|
59149
59272
|
const colorSpec = this._globalScale.getScaleSpec('color');
|
|
59273
|
+
const colorScheme = this.getColorScheme();
|
|
59150
59274
|
if (colorSpec.rangeTheme) {
|
|
59151
|
-
colorSpec.range = getDataScheme(
|
|
59275
|
+
colorSpec.range = getDataScheme(colorScheme);
|
|
59152
59276
|
this._globalScale.getScale('color').range(colorSpec.range);
|
|
59153
59277
|
}
|
|
59154
59278
|
}
|
|
@@ -59202,8 +59326,8 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
59202
59326
|
return result;
|
|
59203
59327
|
}
|
|
59204
59328
|
updateChartConfig(result, oldSpec) {
|
|
59205
|
-
var _a
|
|
59206
|
-
this._paddingSpec = normalizeLayoutPaddingSpec((_a = this._spec.padding) !== null && _a !== void 0 ? _a : (
|
|
59329
|
+
var _a;
|
|
59330
|
+
this._paddingSpec = normalizeLayoutPaddingSpec((_a = this._spec.padding) !== null && _a !== void 0 ? _a : getThemeFromOption('padding', this._option));
|
|
59207
59331
|
this._updateLayoutRect(this._viewBox);
|
|
59208
59332
|
if (!isEqual$1(this._spec.background, oldSpec.background)) {
|
|
59209
59333
|
result.reMake = true;
|
|
@@ -59280,7 +59404,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
59280
59404
|
label: spec.label,
|
|
59281
59405
|
seriesStyle: spec.seriesStyle,
|
|
59282
59406
|
animation: spec.animation,
|
|
59283
|
-
animationThreshold: (_a = spec.animationThreshold) !== null && _a !== void 0 ? _a : this.
|
|
59407
|
+
animationThreshold: (_a = spec.animationThreshold) !== null && _a !== void 0 ? _a : getThemeFromOption('animationThreshold', this._option),
|
|
59284
59408
|
animationAppear: spec.animationAppear,
|
|
59285
59409
|
animationDisappear: spec.animationDisappear,
|
|
59286
59410
|
animationEnter: spec.animationEnter,
|
|
@@ -59320,31 +59444,27 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
59320
59444
|
this._layoutRect.y = this.padding.top;
|
|
59321
59445
|
this._event.emit(ChartEvent.layoutRectUpdate, {});
|
|
59322
59446
|
}
|
|
59323
|
-
|
|
59324
|
-
return this._theme;
|
|
59325
|
-
}
|
|
59326
|
-
setCurrentTheme(theme, reInit = true) {
|
|
59327
|
-
this._theme = theme;
|
|
59447
|
+
setCurrentTheme(reInit = true) {
|
|
59328
59448
|
this.setLayoutTag(true);
|
|
59329
59449
|
this.transformSpec(this._spec);
|
|
59330
59450
|
this.updateGlobalScaleTheme();
|
|
59331
59451
|
this.setRegionTheme(reInit);
|
|
59332
|
-
this.setComponentTheme(
|
|
59333
|
-
this.setSeriesTheme(
|
|
59452
|
+
this.setComponentTheme(reInit);
|
|
59453
|
+
this.setSeriesTheme(reInit);
|
|
59334
59454
|
}
|
|
59335
59455
|
setRegionTheme(reInit = true) {
|
|
59336
|
-
this._regions.forEach(r => {
|
|
59337
|
-
|
|
59338
|
-
});
|
|
59456
|
+
this._regions.forEach((r) => __awaiter$h(this, void 0, void 0, function* () {
|
|
59457
|
+
yield r.setCurrentTheme(reInit);
|
|
59458
|
+
}));
|
|
59339
59459
|
}
|
|
59340
|
-
setComponentTheme(
|
|
59341
|
-
this._components.forEach(c => {
|
|
59342
|
-
|
|
59343
|
-
});
|
|
59460
|
+
setComponentTheme(reInit = true) {
|
|
59461
|
+
this._components.forEach((c) => __awaiter$h(this, void 0, void 0, function* () {
|
|
59462
|
+
yield c.setCurrentTheme(reInit);
|
|
59463
|
+
}));
|
|
59344
59464
|
}
|
|
59345
|
-
setSeriesTheme(
|
|
59465
|
+
setSeriesTheme(reInit = true) {
|
|
59346
59466
|
this._series.forEach((s) => __awaiter$h(this, void 0, void 0, function* () {
|
|
59347
|
-
|
|
59467
|
+
yield s.setCurrentTheme(reInit);
|
|
59348
59468
|
}));
|
|
59349
59469
|
}
|
|
59350
59470
|
clear() {
|
|
@@ -59628,6 +59748,10 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
59628
59748
|
}
|
|
59629
59749
|
}
|
|
59630
59750
|
}
|
|
59751
|
+
getColorScheme() {
|
|
59752
|
+
var _a, _b, _c;
|
|
59753
|
+
return ((_c = (_b = (_a = this._option).getThemeConfig) === null || _b === void 0 ? void 0 : _b.call(_a).chartLevelTheme) !== null && _c !== void 0 ? _c : defaultChartLevelTheme).colorScheme;
|
|
59754
|
+
}
|
|
59631
59755
|
}
|
|
59632
59756
|
|
|
59633
59757
|
class CartesianChart extends BaseChart {
|
|
@@ -60772,7 +60896,6 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
60772
60896
|
this._viewDataMap = new Map();
|
|
60773
60897
|
this._viewDataFilter = null;
|
|
60774
60898
|
this._data = null;
|
|
60775
|
-
this._stack = false;
|
|
60776
60899
|
this._percent = false;
|
|
60777
60900
|
this._stackOffsetSilhouette = false;
|
|
60778
60901
|
this._invalidType = 'break';
|
|
@@ -60835,6 +60958,9 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
60835
60958
|
if (isValid$1(this._spec.stackValue)) {
|
|
60836
60959
|
this._stack = true;
|
|
60837
60960
|
}
|
|
60961
|
+
if (isNil$1(this._stack) && this._supportStack && this._seriesField) {
|
|
60962
|
+
this._stack = true;
|
|
60963
|
+
}
|
|
60838
60964
|
if (isValid$1(this._spec.invalidType)) {
|
|
60839
60965
|
this._invalidType = this._spec.invalidType;
|
|
60840
60966
|
}
|
|
@@ -61400,12 +61526,15 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
61400
61526
|
var _a;
|
|
61401
61527
|
return this._getSeriesInfo((_a = this._seriesField) !== null && _a !== void 0 ? _a : DEFAULT_DATA_SERIES_FIELD, this.getSeriesKeys());
|
|
61402
61528
|
}
|
|
61403
|
-
|
|
61529
|
+
_getDefaultColorScale() {
|
|
61404
61530
|
var _a, _b;
|
|
61405
61531
|
const colorDomain = this.getDefaultColorDomain();
|
|
61406
|
-
const colorRange =
|
|
61532
|
+
const colorRange = this._getDataScheme();
|
|
61407
61533
|
return (_b = (_a = new ColorOrdinalScale().domain(colorDomain)).range) === null || _b === void 0 ? void 0 : _b.call(_a, colorRange);
|
|
61408
61534
|
}
|
|
61535
|
+
_getDataScheme() {
|
|
61536
|
+
return getDataScheme(this.getColorScheme(), this.type);
|
|
61537
|
+
}
|
|
61409
61538
|
getDefaultColorDomain() {
|
|
61410
61539
|
var _a, _b;
|
|
61411
61540
|
return this._seriesField ? (_b = (_a = this._viewDataStatistics) === null || _a === void 0 ? void 0 : _a.latestData[this._seriesField]) === null || _b === void 0 ? void 0 : _b.values : [];
|
|
@@ -61413,7 +61542,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
61413
61542
|
getColorAttribute() {
|
|
61414
61543
|
var _a, _b;
|
|
61415
61544
|
return {
|
|
61416
|
-
scale: (_a = this._option.globalScale.getScale('color')) !== null && _a !== void 0 ? _a : this.
|
|
61545
|
+
scale: (_a = this._option.globalScale.getScale('color')) !== null && _a !== void 0 ? _a : this._getDefaultColorScale(),
|
|
61417
61546
|
field: (_b = this._seriesField) !== null && _b !== void 0 ? _b : DEFAULT_DATA_SERIES_FIELD
|
|
61418
61547
|
};
|
|
61419
61548
|
}
|
|
@@ -61428,30 +61557,8 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
61428
61557
|
}
|
|
61429
61558
|
onMarkTreePositionUpdate(marks) {
|
|
61430
61559
|
}
|
|
61431
|
-
|
|
61432
|
-
return
|
|
61433
|
-
const modifyConfig = () => {
|
|
61434
|
-
this.reInit(theme);
|
|
61435
|
-
return { change: true, reMake: false };
|
|
61436
|
-
};
|
|
61437
|
-
if (noRender) {
|
|
61438
|
-
modifyConfig();
|
|
61439
|
-
}
|
|
61440
|
-
else {
|
|
61441
|
-
yield this._option.globalInstance.updateCustomConfigAndRerender(modifyConfig);
|
|
61442
|
-
}
|
|
61443
|
-
});
|
|
61444
|
-
}
|
|
61445
|
-
_initTheme(theme) {
|
|
61446
|
-
var _a;
|
|
61447
|
-
const globalTheme = this._option.getTheme();
|
|
61448
|
-
if (theme) {
|
|
61449
|
-
super._initTheme(theme);
|
|
61450
|
-
}
|
|
61451
|
-
else {
|
|
61452
|
-
super._initTheme((_a = globalTheme.series[this.type]) !== null && _a !== void 0 ? _a : {});
|
|
61453
|
-
}
|
|
61454
|
-
this._mergeThemeToSpec();
|
|
61560
|
+
_getTheme() {
|
|
61561
|
+
return preprocessSpecOrTheme('theme', getThemeFromOption(`series.${this.type}`, this._option), this.getColorScheme(), this.type);
|
|
61455
61562
|
}
|
|
61456
61563
|
_createMark(markInfo, option = {}) {
|
|
61457
61564
|
var _a, _b, _c, _d;
|
|
@@ -62392,7 +62499,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
62392
62499
|
constructor() {
|
|
62393
62500
|
super(...arguments);
|
|
62394
62501
|
this.type = SeriesTypeEnum.area;
|
|
62395
|
-
this.
|
|
62502
|
+
this._supportStack = true;
|
|
62396
62503
|
this._sortDataByAxis = false;
|
|
62397
62504
|
}
|
|
62398
62505
|
setAttrFromSpec() {
|
|
@@ -62715,7 +62822,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
62715
62822
|
this.type = SeriesTypeEnum.bar;
|
|
62716
62823
|
this._barMarkName = SeriesMarkNameEnum.bar;
|
|
62717
62824
|
this._barMarkType = MarkTypeEnum.rect;
|
|
62718
|
-
this.
|
|
62825
|
+
this._supportStack = true;
|
|
62719
62826
|
this._bandPosition = 0;
|
|
62720
62827
|
}
|
|
62721
62828
|
initMark() {
|
|
@@ -62725,7 +62832,8 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
62725
62832
|
large: this._spec.large,
|
|
62726
62833
|
largeThreshold: this._spec.largeThreshold
|
|
62727
62834
|
};
|
|
62728
|
-
this.
|
|
62835
|
+
this._initBarBackgroundMark(progressive);
|
|
62836
|
+
this._barMark = this._createMark(Object.assign(Object.assign({}, BarSeries.mark.bar), { name: this._barMarkName, type: this._barMarkType }), {
|
|
62729
62837
|
morph: shouldDoMorph(this._spec.animation, this._spec.morph, userAnimationConfig(this.type, this._spec)),
|
|
62730
62838
|
defaultMorphElementKey: this.getDimensionField()[0],
|
|
62731
62839
|
groupKey: this._seriesField,
|
|
@@ -62734,13 +62842,22 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
62734
62842
|
progressive
|
|
62735
62843
|
});
|
|
62736
62844
|
}
|
|
62845
|
+
_initBarBackgroundMark(progressive) {
|
|
62846
|
+
var _a;
|
|
62847
|
+
if ((_a = this._spec.barBackground) === null || _a === void 0 ? void 0 : _a.visible) {
|
|
62848
|
+
this._barBackgroundMark = this._createMark(BarSeries.mark.barBackground, {
|
|
62849
|
+
dataView: this._barBackgroundViewData.getDataView(),
|
|
62850
|
+
dataProductId: this._barBackgroundViewData.getProductId(),
|
|
62851
|
+
progressive
|
|
62852
|
+
});
|
|
62853
|
+
}
|
|
62854
|
+
}
|
|
62737
62855
|
initMarkStyle() {
|
|
62738
|
-
|
|
62739
|
-
|
|
62740
|
-
this.setMarkStyle(rectMark, {
|
|
62856
|
+
if (this._barMark) {
|
|
62857
|
+
this.setMarkStyle(this._barMark, {
|
|
62741
62858
|
fill: this.getColorAttribute()
|
|
62742
62859
|
}, 'normal', AttributeLevel.Series);
|
|
62743
|
-
this._trigger.registerMark(
|
|
62860
|
+
this._trigger.registerMark(this._barMark);
|
|
62744
62861
|
}
|
|
62745
62862
|
}
|
|
62746
62863
|
initLabelMarkStyle(textMark) {
|
|
@@ -62757,7 +62874,52 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
62757
62874
|
}
|
|
62758
62875
|
initTooltip() {
|
|
62759
62876
|
super.initTooltip();
|
|
62760
|
-
this.
|
|
62877
|
+
this._barMark && this._tooltipHelper.activeTriggerSet.mark.add(this._barMark);
|
|
62878
|
+
}
|
|
62879
|
+
_statisticViewData() {
|
|
62880
|
+
var _a, _b;
|
|
62881
|
+
super._statisticViewData();
|
|
62882
|
+
if (!((_a = this._spec.barBackground) === null || _a === void 0 ? void 0 : _a.visible)) {
|
|
62883
|
+
return;
|
|
62884
|
+
}
|
|
62885
|
+
const dimensionItems = ([data], op) => {
|
|
62886
|
+
var _a;
|
|
62887
|
+
let dataCollect = [{}];
|
|
62888
|
+
const fields = this.getDimensionField();
|
|
62889
|
+
for (let i = 0; i < fields.length; i++) {
|
|
62890
|
+
const field = fields[i];
|
|
62891
|
+
const values = (_a = data.latestData[field]) === null || _a === void 0 ? void 0 : _a.values;
|
|
62892
|
+
if (!(values === null || values === void 0 ? void 0 : values.length)) {
|
|
62893
|
+
continue;
|
|
62894
|
+
}
|
|
62895
|
+
const newDataCollect = [];
|
|
62896
|
+
for (let j = 0; j < values.length; j++) {
|
|
62897
|
+
for (let k = 0; k < dataCollect.length; k++) {
|
|
62898
|
+
newDataCollect.push(Object.assign(Object.assign({}, dataCollect[k]), { [field]: values[j] }));
|
|
62899
|
+
}
|
|
62900
|
+
}
|
|
62901
|
+
dataCollect = newDataCollect;
|
|
62902
|
+
}
|
|
62903
|
+
return dataCollect;
|
|
62904
|
+
};
|
|
62905
|
+
registerDataSetInstanceTransform(this._option.dataSet, 'addVChartProperty', addVChartProperty);
|
|
62906
|
+
registerDataSetInstanceTransform(this._option.dataSet, 'dimensionItems', dimensionItems);
|
|
62907
|
+
const barBackgroundData = new DataView(this._option.dataSet)
|
|
62908
|
+
.parse([this._viewDataStatistics], {
|
|
62909
|
+
type: 'dataview'
|
|
62910
|
+
})
|
|
62911
|
+
.transform({
|
|
62912
|
+
type: 'dimensionItems'
|
|
62913
|
+
}, false)
|
|
62914
|
+
.transform({
|
|
62915
|
+
type: 'addVChartProperty',
|
|
62916
|
+
options: {
|
|
62917
|
+
beforeCall: initKeyMap,
|
|
62918
|
+
call: addDataKey.bind(this)
|
|
62919
|
+
}
|
|
62920
|
+
}, false);
|
|
62921
|
+
(_b = this._viewDataStatistics) === null || _b === void 0 ? void 0 : _b.target.addListener('change', barBackgroundData.reRunAllTransform);
|
|
62922
|
+
this._barBackgroundViewData = new SeriesData(this._option, barBackgroundData);
|
|
62761
62923
|
}
|
|
62762
62924
|
init(option) {
|
|
62763
62925
|
var _a, _b;
|
|
@@ -62850,7 +63012,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
62850
63012
|
const xScale = (_b = (_a = this._xAxisHelper) === null || _a === void 0 ? void 0 : _a.getScale) === null || _b === void 0 ? void 0 : _b.call(_a, 0);
|
|
62851
63013
|
const yScale = (_d = (_c = this._yAxisHelper) === null || _c === void 0 ? void 0 : _c.getScale) === null || _d === void 0 ? void 0 : _d.call(_c, 0);
|
|
62852
63014
|
if (this.direction === Direction.horizontal) {
|
|
62853
|
-
this.setMarkStyle(this.
|
|
63015
|
+
this.setMarkStyle(this._barMark, {
|
|
62854
63016
|
x: (datum) => {
|
|
62855
63017
|
if (this._shouldDoPreCalculate()) {
|
|
62856
63018
|
this._calculateStackRectPosition(false);
|
|
@@ -62873,7 +63035,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
62873
63035
|
}, 'normal', AttributeLevel.Series);
|
|
62874
63036
|
}
|
|
62875
63037
|
else {
|
|
62876
|
-
this.setMarkStyle(this.
|
|
63038
|
+
this.setMarkStyle(this._barMark, {
|
|
62877
63039
|
x: (datum) => this._getPosition(this.direction, datum),
|
|
62878
63040
|
y: (datum, ctx, opt, dataView) => {
|
|
62879
63041
|
if (this._shouldDoPreCalculate()) {
|
|
@@ -62897,13 +63059,56 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
62897
63059
|
}
|
|
62898
63060
|
}, 'normal', AttributeLevel.Series);
|
|
62899
63061
|
}
|
|
63062
|
+
this._initBarBackgroundMarkStyle();
|
|
63063
|
+
}
|
|
63064
|
+
_initBarBackgroundMarkStyle() {
|
|
63065
|
+
var _a, _b, _c, _d;
|
|
63066
|
+
if (!this._barBackgroundMark) {
|
|
63067
|
+
return;
|
|
63068
|
+
}
|
|
63069
|
+
const xScale = (_b = (_a = this._xAxisHelper) === null || _a === void 0 ? void 0 : _a.getScale) === null || _b === void 0 ? void 0 : _b.call(_a, 0);
|
|
63070
|
+
const yScale = (_d = (_c = this._yAxisHelper) === null || _c === void 0 ? void 0 : _c.getScale) === null || _d === void 0 ? void 0 : _d.call(_c, 0);
|
|
63071
|
+
if (this.direction === Direction.horizontal) {
|
|
63072
|
+
this.setMarkStyle(this._barBackgroundMark, {
|
|
63073
|
+
x: () => {
|
|
63074
|
+
const range = xScale.range();
|
|
63075
|
+
const min = Math.min(range[0], range[range.length - 1]);
|
|
63076
|
+
return min;
|
|
63077
|
+
},
|
|
63078
|
+
x1: () => {
|
|
63079
|
+
const range = xScale.range();
|
|
63080
|
+
const max = Math.max(range[0], range[range.length - 1]);
|
|
63081
|
+
return max;
|
|
63082
|
+
},
|
|
63083
|
+
y: (datum) => this._getPosition(this.direction, datum),
|
|
63084
|
+
height: () => this._getBarWidth(this._yAxisHelper)
|
|
63085
|
+
}, 'normal', AttributeLevel.Series);
|
|
63086
|
+
}
|
|
63087
|
+
else {
|
|
63088
|
+
this.setMarkStyle(this._barBackgroundMark, {
|
|
63089
|
+
x: (datum) => this._getPosition(this.direction, datum),
|
|
63090
|
+
y: () => {
|
|
63091
|
+
const range = yScale.range();
|
|
63092
|
+
const min = Math.min(range[0], range[range.length - 1]);
|
|
63093
|
+
return min;
|
|
63094
|
+
},
|
|
63095
|
+
y1: () => {
|
|
63096
|
+
const range = yScale.range();
|
|
63097
|
+
const max = Math.max(range[0], range[range.length - 1]);
|
|
63098
|
+
return max;
|
|
63099
|
+
},
|
|
63100
|
+
width: () => {
|
|
63101
|
+
return this._getBarWidth(this._xAxisHelper);
|
|
63102
|
+
}
|
|
63103
|
+
}, 'normal', AttributeLevel.Series);
|
|
63104
|
+
}
|
|
62900
63105
|
}
|
|
62901
63106
|
initLinearRectMarkStyle() {
|
|
62902
63107
|
var _a, _b, _c, _d;
|
|
62903
63108
|
const xScale = (_b = (_a = this._xAxisHelper) === null || _a === void 0 ? void 0 : _a.getScale) === null || _b === void 0 ? void 0 : _b.call(_a, 0);
|
|
62904
63109
|
const yScale = (_d = (_c = this._yAxisHelper) === null || _c === void 0 ? void 0 : _c.getScale) === null || _d === void 0 ? void 0 : _d.call(_c, 0);
|
|
62905
63110
|
if (this.direction === Direction.vertical) {
|
|
62906
|
-
this.setMarkStyle(this.
|
|
63111
|
+
this.setMarkStyle(this._barMark, {
|
|
62907
63112
|
x: (datum) => valueInScaleRange(this.dataToPositionX(datum), xScale),
|
|
62908
63113
|
x1: (datum) => valueInScaleRange(this.dataToPositionX1(datum), xScale),
|
|
62909
63114
|
y: (datum, ctx, opt, dataView) => {
|
|
@@ -62926,7 +63131,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
62926
63131
|
}, 'normal', AttributeLevel.Series);
|
|
62927
63132
|
}
|
|
62928
63133
|
else {
|
|
62929
|
-
this.setMarkStyle(this.
|
|
63134
|
+
this.setMarkStyle(this._barMark, {
|
|
62930
63135
|
x: (datum) => {
|
|
62931
63136
|
if (this._shouldDoPreCalculate()) {
|
|
62932
63137
|
this._calculateStackRectPosition(false);
|
|
@@ -62969,7 +63174,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
62969
63174
|
const xIndex = (_c = (_b = (_a = this.getViewDataStatistics()) === null || _a === void 0 ? void 0 : _a.latestData) === null || _b === void 0 ? void 0 : _b[this._fieldX[0]]) === null || _c === void 0 ? void 0 : _c.values.indexOf(xValue);
|
|
62970
63175
|
return xIndex || 0;
|
|
62971
63176
|
};
|
|
62972
|
-
this.
|
|
63177
|
+
this._barMark.setAnimationConfig(animationConfig((_c = Factory.getAnimationInKey('bar')) === null || _c === void 0 ? void 0 : _c(animationParams, appearPreset), userAnimationConfig(this._barMarkName, this._spec), { dataIndex }));
|
|
62973
63178
|
}
|
|
62974
63179
|
_getBarWidth(axisHelper) {
|
|
62975
63180
|
var _a, _b;
|
|
@@ -63005,7 +63210,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
63005
63210
|
dataToPosition = this.dataToPositionX.bind(this);
|
|
63006
63211
|
}
|
|
63007
63212
|
const scale = axisHelper.getScale(0);
|
|
63008
|
-
const size = this.
|
|
63213
|
+
const size = this._barMark.getAttribute(sizeAttribute, datum);
|
|
63009
63214
|
const bandWidth = (_b = (_a = axisHelper.getBandwidth) === null || _a === void 0 ? void 0 : _a.call(axisHelper, this._groups ? this._groups.fields.length - 1 : 0)) !== null && _b !== void 0 ? _b : DefaultBandWidth$2;
|
|
63010
63215
|
if (((_d = (_c = this._groups) === null || _c === void 0 ? void 0 : _c.fields) === null || _d === void 0 ? void 0 : _d.length) > 1 && isValid$1(this._spec.barGapInGroup)) {
|
|
63011
63216
|
const groupFields = this._groups.fields;
|
|
@@ -63043,7 +63248,29 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
63043
63248
|
return 'square';
|
|
63044
63249
|
}
|
|
63045
63250
|
getActiveMarks() {
|
|
63046
|
-
return [this.
|
|
63251
|
+
return [this._barMark];
|
|
63252
|
+
}
|
|
63253
|
+
compileData() {
|
|
63254
|
+
var _a;
|
|
63255
|
+
super.compileData();
|
|
63256
|
+
(_a = this._barBackgroundViewData) === null || _a === void 0 ? void 0 : _a.compile();
|
|
63257
|
+
}
|
|
63258
|
+
fillData() {
|
|
63259
|
+
var _a, _b;
|
|
63260
|
+
super.fillData();
|
|
63261
|
+
(_b = (_a = this._barBackgroundViewData) === null || _a === void 0 ? void 0 : _a.getDataView()) === null || _b === void 0 ? void 0 : _b.reRunAllTransform();
|
|
63262
|
+
}
|
|
63263
|
+
viewDataUpdate(d) {
|
|
63264
|
+
var _a, _b, _c;
|
|
63265
|
+
super.viewDataUpdate(d);
|
|
63266
|
+
(_b = (_a = this._barBackgroundViewData) === null || _a === void 0 ? void 0 : _a.getDataView()) === null || _b === void 0 ? void 0 : _b.reRunAllTransform();
|
|
63267
|
+
(_c = this._barBackgroundViewData) === null || _c === void 0 ? void 0 : _c.updateData();
|
|
63268
|
+
}
|
|
63269
|
+
release() {
|
|
63270
|
+
var _a;
|
|
63271
|
+
super.release();
|
|
63272
|
+
(_a = this._barBackgroundViewData) === null || _a === void 0 ? void 0 : _a.release();
|
|
63273
|
+
this._barBackgroundViewData = null;
|
|
63047
63274
|
}
|
|
63048
63275
|
}
|
|
63049
63276
|
BarSeries.type = SeriesTypeEnum.bar;
|
|
@@ -63061,7 +63288,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
63061
63288
|
this.seriesType = SeriesTypeEnum.bar;
|
|
63062
63289
|
}
|
|
63063
63290
|
_getDefaultSeriesSpec(spec) {
|
|
63064
|
-
return Object.assign(Object.assign({}, super._getDefaultSeriesSpec(spec)), { barWidth: spec.barWidth, barMaxWidth: spec.barMaxWidth, barMinWidth: spec.barMinWidth, barGapInGroup: spec.barGapInGroup, barMinHeight: spec.barMinHeight });
|
|
63291
|
+
return Object.assign(Object.assign({}, super._getDefaultSeriesSpec(spec)), { barWidth: spec.barWidth, barMaxWidth: spec.barMaxWidth, barMinWidth: spec.barMinWidth, barGapInGroup: spec.barGapInGroup, barMinHeight: spec.barMinHeight, barBackground: spec.barBackground });
|
|
63065
63292
|
}
|
|
63066
63293
|
transformSpec(spec) {
|
|
63067
63294
|
super.transformSpec(spec);
|
|
@@ -63870,6 +64097,10 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
63870
64097
|
}
|
|
63871
64098
|
}
|
|
63872
64099
|
|
|
64100
|
+
function getComponentThemeFromOption(type, option) {
|
|
64101
|
+
return getThemeFromOption(`component.${type}`, option);
|
|
64102
|
+
}
|
|
64103
|
+
|
|
63873
64104
|
const DEFAULT_TITLE_STYLE = {
|
|
63874
64105
|
left: {
|
|
63875
64106
|
textAlign: 'center',
|
|
@@ -63913,19 +64144,29 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
63913
64144
|
const orient = spec === null || spec === void 0 ? void 0 : spec.orient;
|
|
63914
64145
|
return orient === 'angle' || orient === 'radius';
|
|
63915
64146
|
}
|
|
63916
|
-
const getCartesianAxisTheme = (orient, type,
|
|
63917
|
-
var _a
|
|
63918
|
-
const
|
|
63919
|
-
|
|
63920
|
-
|
|
63921
|
-
|
|
63922
|
-
|
|
63923
|
-
|
|
63924
|
-
|
|
63925
|
-
|
|
63926
|
-
|
|
63927
|
-
|
|
63928
|
-
|
|
64147
|
+
const getCartesianAxisTheme = (orient, type, option) => {
|
|
64148
|
+
var _a;
|
|
64149
|
+
const axisTypeTheme = (_a = (type === 'band'
|
|
64150
|
+
? getComponentThemeFromOption('axisBand', option)
|
|
64151
|
+
: ['linear', 'log', 'symlog'].includes(type)
|
|
64152
|
+
? getComponentThemeFromOption('axisLinear', option)
|
|
64153
|
+
: {})) !== null && _a !== void 0 ? _a : {};
|
|
64154
|
+
const axisTheme = isXAxis(orient)
|
|
64155
|
+
? getComponentThemeFromOption('axisX', option)
|
|
64156
|
+
: getComponentThemeFromOption('axisY', option);
|
|
64157
|
+
return mergeSpec({}, getComponentThemeFromOption('axis', option), axisTypeTheme, axisTheme);
|
|
64158
|
+
};
|
|
64159
|
+
const getPolarAxisTheme = (orient, type, option) => {
|
|
64160
|
+
var _a;
|
|
64161
|
+
const axisTypeTheme = (_a = (type === 'band'
|
|
64162
|
+
? getComponentThemeFromOption('axisBand', option)
|
|
64163
|
+
: type === 'linear'
|
|
64164
|
+
? getComponentThemeFromOption('axisLinear', option)
|
|
64165
|
+
: {})) !== null && _a !== void 0 ? _a : {};
|
|
64166
|
+
const axisTheme = orient === 'angle'
|
|
64167
|
+
? getComponentThemeFromOption('axisAngle', option)
|
|
64168
|
+
: getComponentThemeFromOption('axisRadius', option);
|
|
64169
|
+
return mergeSpec({}, getComponentThemeFromOption('axis', option), axisTypeTheme, axisTheme);
|
|
63929
64170
|
};
|
|
63930
64171
|
|
|
63931
64172
|
function limitTagInBounds(shape, bounds) {
|
|
@@ -63971,10 +64212,10 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
63971
64212
|
}
|
|
63972
64213
|
return null;
|
|
63973
64214
|
}
|
|
63974
|
-
const getCartesianCrosshairTheme = (
|
|
64215
|
+
const getCartesianCrosshairTheme = (option, chart) => {
|
|
63975
64216
|
var _a;
|
|
63976
64217
|
const axes = chart.getAllComponents().filter(component => component.type.includes('Axis'));
|
|
63977
|
-
const { bandField, linearField, xField, yField } = (_a =
|
|
64218
|
+
const { bandField, linearField, xField, yField } = (_a = getComponentThemeFromOption(ComponentTypeEnum.crosshair, option)) !== null && _a !== void 0 ? _a : {};
|
|
63978
64219
|
const xAxis = axes.find(axis => isXAxis(axis.getOrient()));
|
|
63979
64220
|
let newXField;
|
|
63980
64221
|
if (isValid$1(xAxis)) {
|
|
@@ -63996,10 +64237,10 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
63996
64237
|
yField: newYField
|
|
63997
64238
|
};
|
|
63998
64239
|
};
|
|
63999
|
-
const getPolarCrosshairTheme = (
|
|
64240
|
+
const getPolarCrosshairTheme = (option, chart) => {
|
|
64000
64241
|
var _a;
|
|
64001
64242
|
const axes = chart.getAllComponents().filter(component => component.type.includes('Axis'));
|
|
64002
|
-
const { bandField, linearField, categoryField, valueField } = (_a =
|
|
64243
|
+
const { bandField, linearField, categoryField, valueField } = (_a = getComponentThemeFromOption(ComponentTypeEnum.crosshair, option)) !== null && _a !== void 0 ? _a : {};
|
|
64003
64244
|
const angleAxis = axes.find(axis => axis.getOrient() === 'angle');
|
|
64004
64245
|
let newAngleField;
|
|
64005
64246
|
if (isValid$1(angleAxis)) {
|
|
@@ -64043,36 +64284,36 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
64043
64284
|
return spec.orient === 'bottom' || spec.orient === 'top' ? 'horizontal' : 'vertical';
|
|
64044
64285
|
}
|
|
64045
64286
|
|
|
64046
|
-
function getComponentThemeFromGlobalTheme(type,
|
|
64047
|
-
var _a
|
|
64287
|
+
function getComponentThemeFromGlobalTheme(type, option, componentSpec) {
|
|
64288
|
+
var _a;
|
|
64289
|
+
const chart = (_a = option.getChart) === null || _a === void 0 ? void 0 : _a.call(option);
|
|
64048
64290
|
switch (type) {
|
|
64049
64291
|
case ComponentTypeEnum.cartesianBandAxis:
|
|
64050
|
-
return getCartesianAxisTheme(getOrient(componentSpec), 'band',
|
|
64292
|
+
return getCartesianAxisTheme(getOrient(componentSpec), 'band', option);
|
|
64051
64293
|
case ComponentTypeEnum.cartesianLinearAxis:
|
|
64052
|
-
return getCartesianAxisTheme(getOrient(componentSpec), 'linear',
|
|
64294
|
+
return getCartesianAxisTheme(getOrient(componentSpec), 'linear', option);
|
|
64053
64295
|
case ComponentTypeEnum.cartesianLogAxis:
|
|
64054
|
-
return getCartesianAxisTheme(getOrient(componentSpec), 'log',
|
|
64296
|
+
return getCartesianAxisTheme(getOrient(componentSpec), 'log', option);
|
|
64055
64297
|
case ComponentTypeEnum.cartesianSymlogAxis:
|
|
64056
|
-
return getCartesianAxisTheme(getOrient(componentSpec), 'symlog',
|
|
64298
|
+
return getCartesianAxisTheme(getOrient(componentSpec), 'symlog', option);
|
|
64057
64299
|
case ComponentTypeEnum.cartesianAxis:
|
|
64058
64300
|
case ComponentTypeEnum.cartesianTimeAxis:
|
|
64059
|
-
return getCartesianAxisTheme(getOrient(componentSpec), undefined,
|
|
64301
|
+
return getCartesianAxisTheme(getOrient(componentSpec), undefined, option);
|
|
64060
64302
|
case ComponentTypeEnum.polarBandAxis:
|
|
64061
|
-
return getPolarAxisTheme(componentSpec.orient, 'band',
|
|
64303
|
+
return getPolarAxisTheme(componentSpec.orient, 'band', option);
|
|
64062
64304
|
case ComponentTypeEnum.polarLinearAxis:
|
|
64063
|
-
return getPolarAxisTheme(componentSpec.orient, 'linear',
|
|
64305
|
+
return getPolarAxisTheme(componentSpec.orient, 'linear', option);
|
|
64064
64306
|
case ComponentTypeEnum.polarAxis:
|
|
64065
|
-
return getPolarAxisTheme(componentSpec.orient, undefined,
|
|
64307
|
+
return getPolarAxisTheme(componentSpec.orient, undefined, option);
|
|
64066
64308
|
case ComponentTypeEnum.cartesianCrosshair:
|
|
64067
|
-
return getCartesianCrosshairTheme(
|
|
64309
|
+
return getCartesianCrosshairTheme(option, chart);
|
|
64068
64310
|
case ComponentTypeEnum.polarCrosshair:
|
|
64069
|
-
return getPolarCrosshairTheme(
|
|
64311
|
+
return getPolarCrosshairTheme(option, chart);
|
|
64070
64312
|
case ComponentTypeEnum.colorLegend:
|
|
64071
|
-
return (_a = theme.component) === null || _a === void 0 ? void 0 : _a.colorLegend[getLayout(componentSpec)];
|
|
64072
64313
|
case ComponentTypeEnum.sizeLegend:
|
|
64073
|
-
return (
|
|
64314
|
+
return getThemeFromOption(`component.${type}.${getLayout(componentSpec)}`, option);
|
|
64074
64315
|
default:
|
|
64075
|
-
return (
|
|
64316
|
+
return getComponentThemeFromOption(type, option);
|
|
64076
64317
|
}
|
|
64077
64318
|
}
|
|
64078
64319
|
|
|
@@ -64120,29 +64361,8 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
64120
64361
|
y: markEventParams.event.viewY - this.getLayoutStartPoint().y
|
|
64121
64362
|
};
|
|
64122
64363
|
}
|
|
64123
|
-
|
|
64124
|
-
return
|
|
64125
|
-
const modifyConfig = () => {
|
|
64126
|
-
this.reInit(theme);
|
|
64127
|
-
return { change: true, reMake: false };
|
|
64128
|
-
};
|
|
64129
|
-
if (noRender) {
|
|
64130
|
-
modifyConfig();
|
|
64131
|
-
}
|
|
64132
|
-
else {
|
|
64133
|
-
yield this._option.globalInstance.updateCustomConfigAndRerender(modifyConfig);
|
|
64134
|
-
}
|
|
64135
|
-
});
|
|
64136
|
-
}
|
|
64137
|
-
_initTheme(theme) {
|
|
64138
|
-
const globalTheme = this._option.getTheme();
|
|
64139
|
-
if (theme) {
|
|
64140
|
-
super._initTheme(theme);
|
|
64141
|
-
}
|
|
64142
|
-
else {
|
|
64143
|
-
super._initTheme(getComponentThemeFromGlobalTheme(this.type, globalTheme, this._originalSpec, this._option.getChart()));
|
|
64144
|
-
}
|
|
64145
|
-
this._mergeThemeToSpec();
|
|
64364
|
+
_getTheme() {
|
|
64365
|
+
return preprocessSpecOrTheme('theme', getComponentThemeFromGlobalTheme(this.type, this._option, this._originalSpec), this.getColorScheme());
|
|
64146
64366
|
}
|
|
64147
64367
|
_mergeThemeToSpec() {
|
|
64148
64368
|
super._mergeThemeToSpec();
|
|
@@ -64977,7 +65197,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
64977
65197
|
fill: (datum) => {
|
|
64978
65198
|
var _a, _b, _c, _d;
|
|
64979
65199
|
if (isValid$1(datum[(_a = this._seriesField) !== null && _a !== void 0 ? _a : DEFAULT_DATA_SERIES_FIELD])) {
|
|
64980
|
-
return ((_b = this._option.globalScale.getScale('color')) !== null && _b !== void 0 ? _b : this.
|
|
65200
|
+
return ((_b = this._option.globalScale.getScale('color')) !== null && _b !== void 0 ? _b : this._getDefaultColorScale()).scale(datum[(_c = this._seriesField) !== null && _c !== void 0 ? _c : DEFAULT_DATA_SERIES_FIELD]);
|
|
64981
65201
|
}
|
|
64982
65202
|
return (_d = this._spec) === null || _d === void 0 ? void 0 : _d.defaultFillColor;
|
|
64983
65203
|
},
|
|
@@ -66233,7 +66453,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
66233
66453
|
constructor() {
|
|
66234
66454
|
super(...arguments);
|
|
66235
66455
|
this.type = SeriesTypeEnum.rose;
|
|
66236
|
-
this.
|
|
66456
|
+
this._supportStack = true;
|
|
66237
66457
|
this._roseMark = null;
|
|
66238
66458
|
this._labelMark = null;
|
|
66239
66459
|
}
|
|
@@ -67121,7 +67341,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
67121
67341
|
getColorAttribute() {
|
|
67122
67342
|
var _a, _b, _c;
|
|
67123
67343
|
return {
|
|
67124
|
-
scale: (_a = this._option.globalScale.getScale('color')) !== null && _a !== void 0 ? _a : this.
|
|
67344
|
+
scale: (_a = this._option.globalScale.getScale('color')) !== null && _a !== void 0 ? _a : this._getDefaultColorScale(),
|
|
67125
67345
|
field: (_c = (_b = this._dotTypeField) !== null && _b !== void 0 ? _b : this._seriesField) !== null && _c !== void 0 ? _c : DEFAULT_DATA_SERIES_FIELD
|
|
67126
67346
|
};
|
|
67127
67347
|
}
|
|
@@ -67538,7 +67758,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
67538
67758
|
getColorAttribute() {
|
|
67539
67759
|
var _a, _b, _c;
|
|
67540
67760
|
return {
|
|
67541
|
-
scale: (_a = this._option.globalScale.getScale('color')) !== null && _a !== void 0 ? _a : this.
|
|
67761
|
+
scale: (_a = this._option.globalScale.getScale('color')) !== null && _a !== void 0 ? _a : this._getDefaultColorScale(),
|
|
67542
67762
|
field: (_c = (_b = this._seriesGroupField) !== null && _b !== void 0 ? _b : this._seriesField) !== null && _c !== void 0 ? _c : DEFAULT_DATA_SERIES_FIELD
|
|
67543
67763
|
};
|
|
67544
67764
|
}
|
|
@@ -67551,7 +67771,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
67551
67771
|
: this._seriesField
|
|
67552
67772
|
? (_c = this._viewDataStatistics) === null || _c === void 0 ? void 0 : _c.latestData[this._seriesField].values
|
|
67553
67773
|
: [];
|
|
67554
|
-
const colorRange =
|
|
67774
|
+
const colorRange = this._getDataScheme();
|
|
67555
67775
|
return new ColorOrdinalScale().domain(colorDomain).range(colorRange);
|
|
67556
67776
|
}
|
|
67557
67777
|
getDotColorAttribute() {
|
|
@@ -67820,7 +68040,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
67820
68040
|
if (!region) {
|
|
67821
68041
|
return;
|
|
67822
68042
|
}
|
|
67823
|
-
const series = Factory.createSeries(spec.type, spec, Object.assign(Object.assign({}, this._modelOption), { region, specIndex: index, specKey: 'series',
|
|
68043
|
+
const series = Factory.createSeries(spec.type, spec, Object.assign(Object.assign({}, this._modelOption), { region, specIndex: index, specKey: 'series', globalScale: this._globalScale }));
|
|
67824
68044
|
if (series) {
|
|
67825
68045
|
series.created();
|
|
67826
68046
|
this._series.push(series);
|
|
@@ -67962,7 +68182,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
67962
68182
|
class ProgressLikeSeries extends PolarSeries {
|
|
67963
68183
|
constructor() {
|
|
67964
68184
|
super(...arguments);
|
|
67965
|
-
this.
|
|
68185
|
+
this._supportStack = true;
|
|
67966
68186
|
this._arcGroupMark = null;
|
|
67967
68187
|
this._getAngleValueStart = (datum) => {
|
|
67968
68188
|
const axis = this._getAngleAxis();
|
|
@@ -68108,7 +68328,6 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
68108
68328
|
x: 0,
|
|
68109
68329
|
y: 0,
|
|
68110
68330
|
path: () => {
|
|
68111
|
-
var _a;
|
|
68112
68331
|
const axis = this._getAngleAxis();
|
|
68113
68332
|
if (this._isTickMaskVisible(axis)) {
|
|
68114
68333
|
const { tickMask } = this._spec;
|
|
@@ -68116,7 +68335,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
68116
68335
|
const subTickData = this._getAngleAxisSubTickData(axis);
|
|
68117
68336
|
const { x, y } = this.angleAxisHelper.center();
|
|
68118
68337
|
const radius = this._computeLayoutRadius();
|
|
68119
|
-
const markStyle = preprocessSpecOrTheme('mark-spec', style,
|
|
68338
|
+
const markStyle = preprocessSpecOrTheme('mark-spec', style, this.getColorScheme(), this.type);
|
|
68120
68339
|
return subTickData.map(({ value }) => {
|
|
68121
68340
|
const pos = this.angleAxisHelper.dataToPosition([value]) + degreeToRadian(offsetAngle);
|
|
68122
68341
|
const angleUnit = degreeToRadian(angle) / 2;
|
|
@@ -68306,14 +68525,16 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
68306
68525
|
x: () => this.angleAxisHelper.center().x,
|
|
68307
68526
|
y: () => this.angleAxisHelper.center().y,
|
|
68308
68527
|
startAngle: () => {
|
|
68528
|
+
const fieldName = this._stack ? STACK_FIELD_START : this._angleField[0];
|
|
68309
68529
|
const scale = this.angleAxisHelper.getScale(0);
|
|
68310
68530
|
const domain = scale.domain();
|
|
68311
|
-
return this._getAngleValueStart({ [
|
|
68531
|
+
return this._getAngleValueStart({ [fieldName]: domain[0] });
|
|
68312
68532
|
},
|
|
68313
68533
|
endAngle: () => {
|
|
68534
|
+
const fieldName = this._stack ? STACK_FIELD_END : this._angleField[0];
|
|
68314
68535
|
const scale = this.angleAxisHelper.getScale(0);
|
|
68315
68536
|
const domain = scale.domain();
|
|
68316
|
-
return this._getAngleValueEnd({ [
|
|
68537
|
+
return this._getAngleValueEnd({ [fieldName]: domain[domain.length - 1] });
|
|
68317
68538
|
},
|
|
68318
68539
|
innerRadius: this._getRadiusValueStart,
|
|
68319
68540
|
outerRadius: this._getRadiusValueEnd,
|
|
@@ -68380,6 +68601,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
68380
68601
|
this._pinMark = null;
|
|
68381
68602
|
this._pointerMark = null;
|
|
68382
68603
|
this._pinBackgroundMark = null;
|
|
68604
|
+
this._stack = false;
|
|
68383
68605
|
}
|
|
68384
68606
|
setAttrFromSpec() {
|
|
68385
68607
|
var _a;
|
|
@@ -68680,7 +68902,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
68680
68902
|
return series;
|
|
68681
68903
|
}
|
|
68682
68904
|
transformSpec(spec) {
|
|
68683
|
-
var _a, _b, _c, _d;
|
|
68905
|
+
var _a, _b, _c, _d, _e;
|
|
68684
68906
|
super.transformSpec(spec);
|
|
68685
68907
|
let backgroundSeries = (_a = spec.series) === null || _a === void 0 ? void 0 : _a.find((series) => series.type === SeriesTypeEnum.gauge || series.type === SeriesTypeEnum.circularProgress);
|
|
68686
68908
|
if (isNil$1(backgroundSeries)) {
|
|
@@ -68689,6 +68911,9 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
68689
68911
|
if (isNil$1(backgroundSeries.radiusField) && isNil$1(backgroundSeries.categoryField)) {
|
|
68690
68912
|
backgroundSeries.radiusField = (_d = (_c = spec.radiusField) !== null && _c !== void 0 ? _c : spec.categoryField) !== null && _d !== void 0 ? _d : spec.seriesField;
|
|
68691
68913
|
}
|
|
68914
|
+
if (isNil$1(backgroundSeries.valueField) && isNil$1(backgroundSeries.angleField)) {
|
|
68915
|
+
backgroundSeries.valueField = (_e = spec.valueField) !== null && _e !== void 0 ? _e : spec.angleField;
|
|
68916
|
+
}
|
|
68692
68917
|
}
|
|
68693
68918
|
if (spec.series.length === 1) {
|
|
68694
68919
|
spec.series.push(backgroundSeries);
|
|
@@ -68886,7 +69111,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
68886
69111
|
}
|
|
68887
69112
|
}
|
|
68888
69113
|
initMarkStyle() {
|
|
68889
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j
|
|
69114
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
68890
69115
|
const wordMark = this._wordMark;
|
|
68891
69116
|
const fillingWordMark = this._fillingWordMark;
|
|
68892
69117
|
const textField = ((_a = this._spec.word) === null || _a === void 0 ? void 0 : _a.formatMethod) ? WORD_CLOUD_TEXT : this._nameField;
|
|
@@ -68906,7 +69131,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
68906
69131
|
visible: (datum) => !datum.isFillingWord
|
|
68907
69132
|
}, 'normal', AttributeLevel.Series);
|
|
68908
69133
|
this.setMarkStyle(wordMark, {
|
|
68909
|
-
fontFamily: (_d = (_c = (_b = this._spec.word) === null || _b === void 0 ? void 0 : _b.style) === null || _c === void 0 ? void 0 : _c.fontFamily) !== null && _d !== void 0 ? _d : (
|
|
69134
|
+
fontFamily: (_d = (_c = (_b = this._spec.word) === null || _b === void 0 ? void 0 : _b.style) === null || _c === void 0 ? void 0 : _c.fontFamily) !== null && _d !== void 0 ? _d : (_e = this._getChartLevelTheme()) === null || _e === void 0 ? void 0 : _e.fontFamily
|
|
68910
69135
|
}, 'normal', AttributeLevel.User_Mark);
|
|
68911
69136
|
}
|
|
68912
69137
|
if (fillingWordMark) {
|
|
@@ -68925,7 +69150,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
68925
69150
|
visible: (datum) => datum.isFillingWord
|
|
68926
69151
|
}, 'normal', AttributeLevel.Series);
|
|
68927
69152
|
this.setMarkStyle(fillingWordMark, {
|
|
68928
|
-
fontFamily: (
|
|
69153
|
+
fontFamily: (_h = (_g = (_f = this._spec.word) === null || _f === void 0 ? void 0 : _f.style) === null || _g === void 0 ? void 0 : _g.fontFamily) !== null && _h !== void 0 ? _h : (_j = this._getChartLevelTheme()) === null || _j === void 0 ? void 0 : _j.fontFamily
|
|
68929
69154
|
}, 'normal', AttributeLevel.User_Mark);
|
|
68930
69155
|
}
|
|
68931
69156
|
this._trigger.registerMark(wordMark);
|
|
@@ -68952,7 +69177,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
68952
69177
|
var _a, _b, _c, _d, _e;
|
|
68953
69178
|
const colorList = isFillingWord ? this._wordCloudShapeConfig.fillingColorList : this._colorList;
|
|
68954
69179
|
const colorDomain = field ? (_a = this.getViewData()) === null || _a === void 0 ? void 0 : _a.latestData.map((datum) => datum[field]) : [];
|
|
68955
|
-
const colorRange = (_c = colorList !== null && colorList !== void 0 ? colorList : (_b = this._option.globalScale.getScale('color')) === null || _b === void 0 ? void 0 : _b.range()) !== null && _c !== void 0 ? _c :
|
|
69180
|
+
const colorRange = (_c = colorList !== null && colorList !== void 0 ? colorList : (_b = this._option.globalScale.getScale('color')) === null || _b === void 0 ? void 0 : _b.range()) !== null && _c !== void 0 ? _c : this._getDataScheme();
|
|
68956
69181
|
return (_e = (_d = new ColorOrdinalScale().domain(colorDomain)).range) === null || _e === void 0 ? void 0 : _e.call(_d, colorRange);
|
|
68957
69182
|
}
|
|
68958
69183
|
getWordColorAttribute(field, isFillingWord) {
|
|
@@ -68970,7 +69195,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
68970
69195
|
return (datum) => colorList[0];
|
|
68971
69196
|
}
|
|
68972
69197
|
compile() {
|
|
68973
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29
|
|
69198
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29;
|
|
68974
69199
|
super.compile();
|
|
68975
69200
|
const { width, height } = this._region.getLayoutRect();
|
|
68976
69201
|
if (!isValidNumber$1(width) || !isValidNumber$1(height) || !(height > 0 && width > 0)) {
|
|
@@ -69031,9 +69256,9 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
69031
69256
|
fontSizeRange: this._fontSizeRange,
|
|
69032
69257
|
padding: this._fontPadding,
|
|
69033
69258
|
rotate: { field: WORD_CLOUD_ANGLE },
|
|
69034
|
-
fontFamily: (_g = (_d = this._fontFamilyField) !== null && _d !== void 0 ? _d : (_f = (_e = this._spec.word) === null || _e === void 0 ? void 0 : _e.style) === null || _f === void 0 ? void 0 : _f.fontFamily) !== null && _g !== void 0 ? _g : (
|
|
69259
|
+
fontFamily: (_g = (_d = this._fontFamilyField) !== null && _d !== void 0 ? _d : (_f = (_e = this._spec.word) === null || _e === void 0 ? void 0 : _e.style) === null || _f === void 0 ? void 0 : _f.fontFamily) !== null && _g !== void 0 ? _g : (_h = this._getChartLevelTheme()) === null || _h === void 0 ? void 0 : _h.fontFamily,
|
|
69035
69260
|
fontWeight: fontWeightField ? { field: fontWeightField } : valueField ? { field: WORD_CLOUD_WEIGHT } : null,
|
|
69036
|
-
fontStyle: (
|
|
69261
|
+
fontStyle: (_j = this._fontStyleField) !== null && _j !== void 0 ? _j : (_l = (_k = this._spec.word) === null || _k === void 0 ? void 0 : _k.style) === null || _l === void 0 ? void 0 : _l.fontStyle,
|
|
69037
69262
|
randomVisible: this._random,
|
|
69038
69263
|
clip: this._wordCloudConfig.drawOutOfBound === 'clip',
|
|
69039
69264
|
shrink: this._wordCloudConfig.zoomToFit.shrink,
|
|
@@ -69050,39 +69275,39 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
69050
69275
|
dataIndexKey: DEFAULT_DATA_KEY,
|
|
69051
69276
|
size: [width, height],
|
|
69052
69277
|
shape: this._maskShape,
|
|
69053
|
-
text: { field: ((
|
|
69278
|
+
text: { field: ((_m = this._spec.word) === null || _m === void 0 ? void 0 : _m.formatMethod) ? WORD_CLOUD_TEXT : this._nameField },
|
|
69054
69279
|
fontSize: valueField ? { field: valueField } : this._fontSizeRange[0],
|
|
69055
69280
|
fontSizeRange: this._fontSizeRange,
|
|
69056
69281
|
padding: this._fontPadding,
|
|
69057
69282
|
rotateList: rotateAngles,
|
|
69058
|
-
fontFamily: (
|
|
69283
|
+
fontFamily: (_r = (_o = this._fontFamilyField) !== null && _o !== void 0 ? _o : (_q = (_p = this._spec.word) === null || _p === void 0 ? void 0 : _p.style) === null || _q === void 0 ? void 0 : _q.fontFamily) !== null && _r !== void 0 ? _r : (_s = this._getChartLevelTheme()) === null || _s === void 0 ? void 0 : _s.fontFamily,
|
|
69059
69284
|
fontWeight: fontWeightField ? { field: fontWeightField } : valueField ? { field: WORD_CLOUD_WEIGHT } : null,
|
|
69060
|
-
fontStyle: (
|
|
69061
|
-
fillingFontFamily: (
|
|
69285
|
+
fontStyle: (_t = this._fontStyleField) !== null && _t !== void 0 ? _t : (_v = (_u = this._spec.word) === null || _u === void 0 ? void 0 : _u.style) === null || _v === void 0 ? void 0 : _v.fontStyle,
|
|
69286
|
+
fillingFontFamily: (_0 = (_x = (_w = this._wordCloudShapeConfig) === null || _w === void 0 ? void 0 : _w.fillingFontFamilyField) !== null && _x !== void 0 ? _x : (_z = (_y = this._spec.word) === null || _y === void 0 ? void 0 : _y.style) === null || _z === void 0 ? void 0 : _z.fontFamily) !== null && _0 !== void 0 ? _0 : (_1 = this._getChartLevelTheme()) === null || _1 === void 0 ? void 0 : _1.fontFamily,
|
|
69062
69287
|
fillingPadding: this._fillingFontPadding,
|
|
69063
|
-
fillingFontStyle: (
|
|
69064
|
-
fillingFontWeight: (
|
|
69288
|
+
fillingFontStyle: (_3 = (_2 = this._wordCloudShapeConfig) === null || _2 === void 0 ? void 0 : _2.fillingFontStyleField) !== null && _3 !== void 0 ? _3 : (_5 = (_4 = this._spec.word) === null || _4 === void 0 ? void 0 : _4.style) === null || _5 === void 0 ? void 0 : _5.fontStyle,
|
|
69289
|
+
fillingFontWeight: (_7 = (_6 = this._wordCloudShapeConfig) === null || _6 === void 0 ? void 0 : _6.fillingFontWeightField) !== null && _7 !== void 0 ? _7 : (_9 = (_8 = this._spec.word) === null || _8 === void 0 ? void 0 : _8.style) === null || _9 === void 0 ? void 0 : _9.fontWeight,
|
|
69065
69290
|
fillingRotateList: fillingRotateAngles,
|
|
69066
|
-
fillingTimes: (
|
|
69067
|
-
fillingXStep: (
|
|
69068
|
-
fillingYStep: (
|
|
69069
|
-
fillingXRatioStep: (
|
|
69070
|
-
fillingYRatioStep: (
|
|
69071
|
-
fillingInitialOpacity: (
|
|
69072
|
-
fillingDeltaOpacity: (
|
|
69073
|
-
fillingInitialFontSize: (
|
|
69074
|
-
fillingDeltaFontSize: (
|
|
69075
|
-
ratio: (
|
|
69076
|
-
fillingRatio: (
|
|
69077
|
-
removeWhiteBorder: (
|
|
69078
|
-
textLayoutTimes: (
|
|
69079
|
-
fontSizeShrinkFactor: (
|
|
69080
|
-
stepFactor: (
|
|
69081
|
-
layoutMode: (
|
|
69082
|
-
importantWordCount: (
|
|
69083
|
-
globalShinkLimit: (
|
|
69084
|
-
fontSizeEnlargeFactor: (
|
|
69085
|
-
fillingDeltaFontSizeFactor: (
|
|
69291
|
+
fillingTimes: (_10 = this._wordCloudShapeConfig) === null || _10 === void 0 ? void 0 : _10.fillingTimes,
|
|
69292
|
+
fillingXStep: (_11 = this._wordCloudShapeConfig) === null || _11 === void 0 ? void 0 : _11.fillingXStep,
|
|
69293
|
+
fillingYStep: (_12 = this._wordCloudShapeConfig) === null || _12 === void 0 ? void 0 : _12.fillingYStep,
|
|
69294
|
+
fillingXRatioStep: (_13 = this._wordCloudShapeConfig) === null || _13 === void 0 ? void 0 : _13.fillingXRatioStep,
|
|
69295
|
+
fillingYRatioStep: (_14 = this._wordCloudShapeConfig) === null || _14 === void 0 ? void 0 : _14.fillingYRatioStep,
|
|
69296
|
+
fillingInitialOpacity: (_15 = this._wordCloudShapeConfig) === null || _15 === void 0 ? void 0 : _15.fillingInitialOpacity,
|
|
69297
|
+
fillingDeltaOpacity: (_16 = this._wordCloudShapeConfig) === null || _16 === void 0 ? void 0 : _16.fillingDeltaOpacity,
|
|
69298
|
+
fillingInitialFontSize: (_17 = this._wordCloudShapeConfig) === null || _17 === void 0 ? void 0 : _17.fillingInitialFontSize,
|
|
69299
|
+
fillingDeltaFontSize: (_18 = this._wordCloudShapeConfig) === null || _18 === void 0 ? void 0 : _18.fillingDeltaFontSize,
|
|
69300
|
+
ratio: (_19 = this._wordCloudShapeConfig) === null || _19 === void 0 ? void 0 : _19.ratio,
|
|
69301
|
+
fillingRatio: (_20 = this._wordCloudShapeConfig) === null || _20 === void 0 ? void 0 : _20.fillingRatio,
|
|
69302
|
+
removeWhiteBorder: (_21 = this._wordCloudShapeConfig) === null || _21 === void 0 ? void 0 : _21.removeWhiteBorder,
|
|
69303
|
+
textLayoutTimes: (_22 = this._wordCloudShapeConfig) === null || _22 === void 0 ? void 0 : _22.textLayoutTimes,
|
|
69304
|
+
fontSizeShrinkFactor: (_23 = this._wordCloudShapeConfig) === null || _23 === void 0 ? void 0 : _23.fontSizeShrinkFactor,
|
|
69305
|
+
stepFactor: (_24 = this._wordCloudShapeConfig) === null || _24 === void 0 ? void 0 : _24.stepFactor,
|
|
69306
|
+
layoutMode: (_25 = this._wordCloudShapeConfig) === null || _25 === void 0 ? void 0 : _25.layoutMode,
|
|
69307
|
+
importantWordCount: (_26 = this._wordCloudShapeConfig) === null || _26 === void 0 ? void 0 : _26.importantWordCount,
|
|
69308
|
+
globalShinkLimit: (_27 = this._wordCloudShapeConfig) === null || _27 === void 0 ? void 0 : _27.globalShinkLimit,
|
|
69309
|
+
fontSizeEnlargeFactor: (_28 = this._wordCloudShapeConfig) === null || _28 === void 0 ? void 0 : _28.fontSizeEnlargeFactor,
|
|
69310
|
+
fillingDeltaFontSizeFactor: (_29 = this._wordCloudShapeConfig) === null || _29 === void 0 ? void 0 : _29.fillingDeltaFontSizeFactor
|
|
69086
69311
|
});
|
|
69087
69312
|
}
|
|
69088
69313
|
this._data.getProduct().transform(wordCloudTransforms);
|
|
@@ -71180,7 +71405,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
71180
71405
|
this.type = SeriesTypeEnum.wordCloud3d;
|
|
71181
71406
|
}
|
|
71182
71407
|
compile() {
|
|
71183
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30
|
|
71408
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30;
|
|
71184
71409
|
super.compile();
|
|
71185
71410
|
const wordCloudTransforms = [];
|
|
71186
71411
|
const valueField = this._valueField;
|
|
@@ -71238,9 +71463,9 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
71238
71463
|
fontSizeRange: this._fontSizeRange,
|
|
71239
71464
|
padding: this._fontPadding,
|
|
71240
71465
|
rotate: { field: WORD_CLOUD_ANGLE },
|
|
71241
|
-
fontFamily: (_h = (_e = this._fontFamilyField) !== null && _e !== void 0 ? _e : (_g = (_f = this._spec.word) === null || _f === void 0 ? void 0 : _f.style) === null || _g === void 0 ? void 0 : _g.fontFamily) !== null && _h !== void 0 ? _h : (
|
|
71466
|
+
fontFamily: (_h = (_e = this._fontFamilyField) !== null && _e !== void 0 ? _e : (_g = (_f = this._spec.word) === null || _f === void 0 ? void 0 : _f.style) === null || _g === void 0 ? void 0 : _g.fontFamily) !== null && _h !== void 0 ? _h : (_j = this._getChartLevelTheme()) === null || _j === void 0 ? void 0 : _j.fontFamily,
|
|
71242
71467
|
fontWeight: fontWeightField ? { field: fontWeightField } : valueField ? { field: WORD_CLOUD_WEIGHT } : null,
|
|
71243
|
-
fontStyle: (
|
|
71468
|
+
fontStyle: (_k = this._fontStyleField) !== null && _k !== void 0 ? _k : (_m = (_l = this._spec.word) === null || _l === void 0 ? void 0 : _l.style) === null || _m === void 0 ? void 0 : _m.fontStyle,
|
|
71244
71469
|
depth_3d: this._spec.depth_3d,
|
|
71245
71470
|
randomVisible: this._random,
|
|
71246
71471
|
clip: this._wordCloudConfig.drawOutOfBound === 'clip',
|
|
@@ -71257,42 +71482,42 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
71257
71482
|
type: 'wordcloudShape',
|
|
71258
71483
|
size: [this._region.getLayoutRect().width, this._region.getLayoutRect().height],
|
|
71259
71484
|
shape: this._maskShape,
|
|
71260
|
-
postProjection: (
|
|
71485
|
+
postProjection: (_o = this._spec.postProjection) !== null && _o !== void 0 ? _o : 'StereographicProjection',
|
|
71261
71486
|
dataIndexKey: DEFAULT_DATA_KEY,
|
|
71262
71487
|
text: { field: textField },
|
|
71263
71488
|
fontSize: valueField ? { field: valueField } : this._fontSizeRange[0],
|
|
71264
71489
|
fontSizeRange: this._fontSizeRange,
|
|
71265
71490
|
padding: this._fontPadding,
|
|
71266
71491
|
rotateList: rotateAngles,
|
|
71267
|
-
fontFamily: (
|
|
71492
|
+
fontFamily: (_s = (_p = this._fontFamilyField) !== null && _p !== void 0 ? _p : (_r = (_q = this._spec.word) === null || _q === void 0 ? void 0 : _q.style) === null || _r === void 0 ? void 0 : _r.fontFamily) !== null && _s !== void 0 ? _s : (_t = this._getChartLevelTheme()) === null || _t === void 0 ? void 0 : _t.fontFamily,
|
|
71268
71493
|
fontWeight: fontWeightField ? { field: fontWeightField } : valueField ? { field: WORD_CLOUD_WEIGHT } : null,
|
|
71269
|
-
fontStyle: (
|
|
71494
|
+
fontStyle: (_u = this._fontStyleField) !== null && _u !== void 0 ? _u : (_w = (_v = this._spec.word) === null || _v === void 0 ? void 0 : _v.style) === null || _w === void 0 ? void 0 : _w.fontStyle,
|
|
71270
71495
|
depth_3d: this._spec.depth_3d,
|
|
71271
|
-
fillingFontFamily: (
|
|
71496
|
+
fillingFontFamily: (_1 = (_y = (_x = this._wordCloudShapeConfig) === null || _x === void 0 ? void 0 : _x.fillingFontFamilyField) !== null && _y !== void 0 ? _y : (_0 = (_z = this._spec.word) === null || _z === void 0 ? void 0 : _z.style) === null || _0 === void 0 ? void 0 : _0.fontFamily) !== null && _1 !== void 0 ? _1 : (_2 = this._getChartLevelTheme()) === null || _2 === void 0 ? void 0 : _2.fontFamily,
|
|
71272
71497
|
fillingPadding: this._fillingFontPadding,
|
|
71273
|
-
fillingFontStyle: (
|
|
71274
|
-
fillingFontWeight: (
|
|
71498
|
+
fillingFontStyle: (_4 = (_3 = this._wordCloudShapeConfig) === null || _3 === void 0 ? void 0 : _3.fillingFontStyleField) !== null && _4 !== void 0 ? _4 : (_6 = (_5 = this._spec.word) === null || _5 === void 0 ? void 0 : _5.style) === null || _6 === void 0 ? void 0 : _6.fontStyle,
|
|
71499
|
+
fillingFontWeight: (_8 = (_7 = this._wordCloudShapeConfig) === null || _7 === void 0 ? void 0 : _7.fillingFontWeightField) !== null && _8 !== void 0 ? _8 : (_10 = (_9 = this._spec.word) === null || _9 === void 0 ? void 0 : _9.style) === null || _10 === void 0 ? void 0 : _10.fontWeight,
|
|
71275
71500
|
fillingRotateList: fillingRotateAngles,
|
|
71276
|
-
fillingTimes: (
|
|
71277
|
-
fillingXStep: (
|
|
71278
|
-
fillingYStep: (
|
|
71279
|
-
fillingXRatioStep: (
|
|
71280
|
-
fillingYRatioStep: (
|
|
71281
|
-
fillingInitialOpacity: (
|
|
71282
|
-
fillingDeltaOpacity: (
|
|
71283
|
-
fillingInitialFontSize: (
|
|
71284
|
-
fillingDeltaFontSize: (
|
|
71285
|
-
ratio: (
|
|
71286
|
-
fillingRatio: (
|
|
71287
|
-
removeWhiteBorder: (
|
|
71288
|
-
textLayoutTimes: (
|
|
71289
|
-
fontSizeShrinkFactor: (
|
|
71290
|
-
stepFactor: (
|
|
71291
|
-
layoutMode: (
|
|
71292
|
-
importantWordCount: (
|
|
71293
|
-
globalShinkLimit: (
|
|
71294
|
-
fontSizeEnlargeFactor: (
|
|
71295
|
-
fillingDeltaFontSizeFactor: (
|
|
71501
|
+
fillingTimes: (_11 = this._wordCloudShapeConfig) === null || _11 === void 0 ? void 0 : _11.fillingTimes,
|
|
71502
|
+
fillingXStep: (_12 = this._wordCloudShapeConfig) === null || _12 === void 0 ? void 0 : _12.fillingXStep,
|
|
71503
|
+
fillingYStep: (_13 = this._wordCloudShapeConfig) === null || _13 === void 0 ? void 0 : _13.fillingYStep,
|
|
71504
|
+
fillingXRatioStep: (_14 = this._wordCloudShapeConfig) === null || _14 === void 0 ? void 0 : _14.fillingXRatioStep,
|
|
71505
|
+
fillingYRatioStep: (_15 = this._wordCloudShapeConfig) === null || _15 === void 0 ? void 0 : _15.fillingYRatioStep,
|
|
71506
|
+
fillingInitialOpacity: (_16 = this._wordCloudShapeConfig) === null || _16 === void 0 ? void 0 : _16.fillingInitialOpacity,
|
|
71507
|
+
fillingDeltaOpacity: (_17 = this._wordCloudShapeConfig) === null || _17 === void 0 ? void 0 : _17.fillingDeltaOpacity,
|
|
71508
|
+
fillingInitialFontSize: (_18 = this._wordCloudShapeConfig) === null || _18 === void 0 ? void 0 : _18.fillingInitialFontSize,
|
|
71509
|
+
fillingDeltaFontSize: (_19 = this._wordCloudShapeConfig) === null || _19 === void 0 ? void 0 : _19.fillingDeltaFontSize,
|
|
71510
|
+
ratio: (_20 = this._wordCloudShapeConfig) === null || _20 === void 0 ? void 0 : _20.ratio,
|
|
71511
|
+
fillingRatio: (_21 = this._wordCloudShapeConfig) === null || _21 === void 0 ? void 0 : _21.fillingRatio,
|
|
71512
|
+
removeWhiteBorder: (_22 = this._wordCloudShapeConfig) === null || _22 === void 0 ? void 0 : _22.removeWhiteBorder,
|
|
71513
|
+
textLayoutTimes: (_23 = this._wordCloudShapeConfig) === null || _23 === void 0 ? void 0 : _23.textLayoutTimes,
|
|
71514
|
+
fontSizeShrinkFactor: (_24 = this._wordCloudShapeConfig) === null || _24 === void 0 ? void 0 : _24.fontSizeShrinkFactor,
|
|
71515
|
+
stepFactor: (_25 = this._wordCloudShapeConfig) === null || _25 === void 0 ? void 0 : _25.stepFactor,
|
|
71516
|
+
layoutMode: (_26 = this._wordCloudShapeConfig) === null || _26 === void 0 ? void 0 : _26.layoutMode,
|
|
71517
|
+
importantWordCount: (_27 = this._wordCloudShapeConfig) === null || _27 === void 0 ? void 0 : _27.importantWordCount,
|
|
71518
|
+
globalShinkLimit: (_28 = this._wordCloudShapeConfig) === null || _28 === void 0 ? void 0 : _28.globalShinkLimit,
|
|
71519
|
+
fontSizeEnlargeFactor: (_29 = this._wordCloudShapeConfig) === null || _29 === void 0 ? void 0 : _29.fontSizeEnlargeFactor,
|
|
71520
|
+
fillingDeltaFontSizeFactor: (_30 = this._wordCloudShapeConfig) === null || _30 === void 0 ? void 0 : _30.fillingDeltaFontSizeFactor
|
|
71296
71521
|
});
|
|
71297
71522
|
}
|
|
71298
71523
|
this._data.getProduct().transform(wordCloudTransforms);
|
|
@@ -71312,7 +71537,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
71312
71537
|
}
|
|
71313
71538
|
}
|
|
71314
71539
|
initMarkStyle() {
|
|
71315
|
-
var _a, _b, _c, _d, _e, _f, _g, _h
|
|
71540
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
71316
71541
|
const wordMark = this._wordMark;
|
|
71317
71542
|
const fillingWordMark = this._fillingWordMark;
|
|
71318
71543
|
if (wordMark) {
|
|
@@ -71332,7 +71557,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
71332
71557
|
visible: (datum) => !datum.isFillingWord
|
|
71333
71558
|
}, 'normal', AttributeLevel.Series);
|
|
71334
71559
|
this.setMarkStyle(wordMark, {
|
|
71335
|
-
fontFamily: (_c = (_b = (_a = this._spec.word) === null || _a === void 0 ? void 0 : _a.style) === null || _b === void 0 ? void 0 : _b.fontFamily) !== null && _c !== void 0 ? _c : (
|
|
71560
|
+
fontFamily: (_c = (_b = (_a = this._spec.word) === null || _a === void 0 ? void 0 : _a.style) === null || _b === void 0 ? void 0 : _b.fontFamily) !== null && _c !== void 0 ? _c : (_d = this._getChartLevelTheme()) === null || _d === void 0 ? void 0 : _d.fontFamily
|
|
71336
71561
|
}, 'normal', AttributeLevel.User_Mark);
|
|
71337
71562
|
}
|
|
71338
71563
|
if (fillingWordMark) {
|
|
@@ -71352,7 +71577,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
71352
71577
|
visible: (datum) => datum.isFillingWord
|
|
71353
71578
|
}, 'normal', AttributeLevel.Series);
|
|
71354
71579
|
this.setMarkStyle(fillingWordMark, {
|
|
71355
|
-
fontFamily: (
|
|
71580
|
+
fontFamily: (_g = (_f = (_e = this._spec.word) === null || _e === void 0 ? void 0 : _e.style) === null || _f === void 0 ? void 0 : _f.fontFamily) !== null && _g !== void 0 ? _g : (_h = this._getChartLevelTheme()) === null || _h === void 0 ? void 0 : _h.fontFamily
|
|
71356
71581
|
}, 'normal', AttributeLevel.User_Mark);
|
|
71357
71582
|
}
|
|
71358
71583
|
this._trigger.registerMark(wordMark);
|
|
@@ -72858,8 +73083,9 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
72858
73083
|
}
|
|
72859
73084
|
initMark() {
|
|
72860
73085
|
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
73086
|
+
this._initBarBackgroundMark();
|
|
72861
73087
|
const labelPosition = (_a = this._spec.label) === null || _a === void 0 ? void 0 : _a.position;
|
|
72862
|
-
this.
|
|
73088
|
+
this._barMark = this._createMark(RangeColumnSeries.mark.bar, {
|
|
72863
73089
|
morph: shouldDoMorph(this._spec.animation, this._spec.morph, userAnimationConfig('bar', this._spec)),
|
|
72864
73090
|
defaultMorphElementKey: this.getDimensionField()[0],
|
|
72865
73091
|
groupKey: this._seriesField,
|
|
@@ -72897,16 +73123,16 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
72897
73123
|
});
|
|
72898
73124
|
const position = (_d = minLabelSpec === null || minLabelSpec === void 0 ? void 0 : minLabelSpec.position) !== null && _d !== void 0 ? _d : 'end';
|
|
72899
73125
|
const offset = (_e = minLabelSpec === null || minLabelSpec === void 0 ? void 0 : minLabelSpec.offset) !== null && _e !== void 0 ? _e : (this._direction === 'vertical' ? -20 : -25);
|
|
72900
|
-
setRectLabelPos(this, minLabelMark, position, offset, (datum) => this.
|
|
73126
|
+
setRectLabelPos(this, minLabelMark, position, offset, (datum) => this._barMark.getAttribute('x', datum), (datum) => {
|
|
72901
73127
|
return this._direction === 'vertical'
|
|
72902
|
-
? this.
|
|
72903
|
-
this.
|
|
72904
|
-
: this.
|
|
72905
|
-
}, (datum) => this.
|
|
73128
|
+
? this._barMark.getAttribute('x', datum) +
|
|
73129
|
+
this._barMark.getAttribute('width', datum)
|
|
73130
|
+
: this._barMark.getAttribute('x1', datum);
|
|
73131
|
+
}, (datum) => this._barMark.getAttribute('y', datum), (datum) => {
|
|
72906
73132
|
return this._direction === 'vertical'
|
|
72907
|
-
? this.
|
|
72908
|
-
: this.
|
|
72909
|
-
this.
|
|
73133
|
+
? this._barMark.getAttribute('y1', datum)
|
|
73134
|
+
: this._barMark.getAttribute('y', datum) +
|
|
73135
|
+
this._barMark.getAttribute('height', datum);
|
|
72910
73136
|
}, () => this._direction);
|
|
72911
73137
|
}
|
|
72912
73138
|
const maxLabelMark = this._maxLabelMark;
|
|
@@ -72924,16 +73150,16 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
72924
73150
|
});
|
|
72925
73151
|
const position = (_j = maxLabelSpec === null || maxLabelSpec === void 0 ? void 0 : maxLabelSpec.position) !== null && _j !== void 0 ? _j : 'start';
|
|
72926
73152
|
const offset = (_k = maxLabelSpec === null || maxLabelSpec === void 0 ? void 0 : maxLabelSpec.offset) !== null && _k !== void 0 ? _k : (this._direction === 'vertical' ? -20 : -25);
|
|
72927
|
-
setRectLabelPos(this, maxLabelMark, position, offset, (datum) => this.
|
|
73153
|
+
setRectLabelPos(this, maxLabelMark, position, offset, (datum) => this._barMark.getAttribute('x', datum), (datum) => {
|
|
72928
73154
|
return this._direction === 'vertical'
|
|
72929
|
-
? this.
|
|
72930
|
-
this.
|
|
72931
|
-
: this.
|
|
72932
|
-
}, (datum) => this.
|
|
73155
|
+
? this._barMark.getAttribute('x', datum) +
|
|
73156
|
+
this._barMark.getAttribute('width', datum)
|
|
73157
|
+
: this._barMark.getAttribute('x1', datum);
|
|
73158
|
+
}, (datum) => this._barMark.getAttribute('y', datum), (datum) => {
|
|
72933
73159
|
return this._direction === 'vertical'
|
|
72934
|
-
? this.
|
|
72935
|
-
: this.
|
|
72936
|
-
this.
|
|
73160
|
+
? this._barMark.getAttribute('y1', datum)
|
|
73161
|
+
: this._barMark.getAttribute('y', datum) +
|
|
73162
|
+
this._barMark.getAttribute('height', datum);
|
|
72937
73163
|
}, () => this._direction);
|
|
72938
73164
|
}
|
|
72939
73165
|
}
|
|
@@ -72965,7 +73191,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
72965
73191
|
const yScale = (_d = (_c = this._yAxisHelper) === null || _c === void 0 ? void 0 : _c.getScale) === null || _d === void 0 ? void 0 : _d.call(_c, 0);
|
|
72966
73192
|
const { dataToPosition } = this.direction === Direction.horizontal ? this._xAxisHelper : this._yAxisHelper;
|
|
72967
73193
|
if (this.direction === Direction.horizontal) {
|
|
72968
|
-
this.setMarkStyle(this.
|
|
73194
|
+
this.setMarkStyle(this._barMark, {
|
|
72969
73195
|
x: (datum) => valueInScaleRange(dataToPosition(this.getDatumPositionValues(datum, this._spec.xField[0]), {
|
|
72970
73196
|
bandPosition: this._bandPosition
|
|
72971
73197
|
}), xScale),
|
|
@@ -72977,7 +73203,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
72977
73203
|
}, 'normal', AttributeLevel.Series);
|
|
72978
73204
|
}
|
|
72979
73205
|
else {
|
|
72980
|
-
this.setMarkStyle(this.
|
|
73206
|
+
this.setMarkStyle(this._barMark, {
|
|
72981
73207
|
x: (datum) => this._getPosition(this.direction, datum),
|
|
72982
73208
|
y: (datum) => valueInScaleRange(dataToPosition(this.getDatumPositionValues(datum, this._spec.yField[0]), {
|
|
72983
73209
|
bandPosition: this._bandPosition
|
|
@@ -72990,6 +73216,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
72990
73216
|
}
|
|
72991
73217
|
}, 'normal', AttributeLevel.Series);
|
|
72992
73218
|
}
|
|
73219
|
+
this._initBarBackgroundMarkStyle();
|
|
72993
73220
|
}
|
|
72994
73221
|
initAnimation() {
|
|
72995
73222
|
var _a, _b, _c, _d, _e;
|
|
@@ -73000,7 +73227,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
73000
73227
|
return xIndex || 0;
|
|
73001
73228
|
};
|
|
73002
73229
|
const appearPreset = (_b = (_a = this._spec) === null || _a === void 0 ? void 0 : _a.animationAppear) === null || _b === void 0 ? void 0 : _b.preset;
|
|
73003
|
-
this.
|
|
73230
|
+
this._barMark.setAnimationConfig(animationConfig((_c = Factory.getAnimationInKey('rangeColumn')) === null || _c === void 0 ? void 0 : _c({ direction: this.direction }, appearPreset), userAnimationConfig(SeriesMarkNameEnum.bar, this._spec), { dataIndex }));
|
|
73004
73231
|
if (this._minLabelMark) {
|
|
73005
73232
|
this._minLabelMark.setAnimationConfig(animationConfig((_d = Factory.getAnimationInKey('fadeInOut')) === null || _d === void 0 ? void 0 : _d(), userAnimationConfig(SeriesMarkNameEnum.label, this._spec), { dataIndex }));
|
|
73006
73233
|
}
|
|
@@ -73033,7 +73260,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
73033
73260
|
}
|
|
73034
73261
|
_getDefaultSeriesSpec(spec) {
|
|
73035
73262
|
var _a, _b;
|
|
73036
|
-
const series = Object.assign(Object.assign({}, super._getDefaultSeriesSpec(spec)), { barGapInGroup: spec.barGapInGroup });
|
|
73263
|
+
const series = Object.assign(Object.assign({}, super._getDefaultSeriesSpec(spec)), { barGapInGroup: spec.barGapInGroup, barBackground: spec.barBackground });
|
|
73037
73264
|
series.bar = spec.bar;
|
|
73038
73265
|
if (spec.direction === Direction.horizontal) {
|
|
73039
73266
|
series.xField = (_a = spec.xField) !== null && _a !== void 0 ? _a : [spec.minField, spec.maxField];
|
|
@@ -75672,7 +75899,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
75672
75899
|
constructor() {
|
|
75673
75900
|
super(...arguments);
|
|
75674
75901
|
this.type = SeriesTypeEnum.waterfall;
|
|
75675
|
-
this._stack =
|
|
75902
|
+
this._stack = false;
|
|
75676
75903
|
this._leaderLineMark = null;
|
|
75677
75904
|
this._stackLabelMark = null;
|
|
75678
75905
|
this._labelMark = null;
|
|
@@ -75690,7 +75917,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
75690
75917
|
}
|
|
75691
75918
|
setAttrFromSpec() {
|
|
75692
75919
|
super.setAttrFromSpec();
|
|
75693
|
-
this.
|
|
75920
|
+
this.setValueFieldToStack();
|
|
75694
75921
|
this._fieldX = [this._fieldX[0]];
|
|
75695
75922
|
this._fieldY = [this._fieldY[0]];
|
|
75696
75923
|
if (isNil$1(this._seriesField)) {
|
|
@@ -75763,7 +75990,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
75763
75990
|
const xIndex = (_c = (_b = (_a = this.getViewDataStatistics()) === null || _a === void 0 ? void 0 : _a.latestData) === null || _b === void 0 ? void 0 : _b[this._fieldX[0]]) === null || _c === void 0 ? void 0 : _c.values.indexOf(xValue);
|
|
75764
75991
|
return xIndex || 0;
|
|
75765
75992
|
};
|
|
75766
|
-
this.
|
|
75993
|
+
this._barMark.setAnimationConfig(animationConfig((_c = Factory.getAnimationInKey('waterfall')) === null || _c === void 0 ? void 0 : _c(animationParams, appearPreset), userAnimationConfig(SeriesMarkNameEnum.bar, this._spec), { dataIndex }));
|
|
75767
75994
|
if (this._leaderLineMark) {
|
|
75768
75995
|
this._leaderLineMark.setAnimationConfig(animationConfig((_d = Factory.getAnimationInKey('fadeInOut')) === null || _d === void 0 ? void 0 : _d(), userAnimationConfig(SeriesMarkNameEnum.leaderLine, this._spec)));
|
|
75769
75996
|
}
|
|
@@ -75792,7 +76019,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
75792
76019
|
leaderLine.setDataView(this._totalData.getDataView(), this._totalData.getProductId());
|
|
75793
76020
|
}
|
|
75794
76021
|
if ((_a = this._spec.stackLabel) === null || _a === void 0 ? void 0 : _a.visible) {
|
|
75795
|
-
this.
|
|
76022
|
+
this._barMark.addLabelSpec(this._spec.stackLabel);
|
|
75796
76023
|
}
|
|
75797
76024
|
}
|
|
75798
76025
|
initLabelMarkStyle(labelMark) {
|
|
@@ -75823,7 +76050,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
75823
76050
|
bandPosition: this._bandPosition
|
|
75824
76051
|
}) +
|
|
75825
76052
|
getBandwidth(0) * 0.5 -
|
|
75826
|
-
this.
|
|
76053
|
+
this._barMark.getAttribute('width', datum) * (0.5 - pos));
|
|
75827
76054
|
}
|
|
75828
76055
|
return valueInScaleRange(dataToPosition([datum[field]], {
|
|
75829
76056
|
bandPosition: this._bandPosition
|
|
@@ -75840,7 +76067,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
75840
76067
|
bandPosition: this._bandPosition
|
|
75841
76068
|
}) +
|
|
75842
76069
|
getBandwidth(0) * 0.5 -
|
|
75843
|
-
this.
|
|
76070
|
+
this._barMark.getAttribute('height', datum) * (0.5 - pos));
|
|
75844
76071
|
}
|
|
75845
76072
|
initMarkStyle() {
|
|
75846
76073
|
super.initMarkStyle();
|
|
@@ -77625,7 +77852,10 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
77625
77852
|
return;
|
|
77626
77853
|
}
|
|
77627
77854
|
const selectedDatum = originalDatum
|
|
77628
|
-
? originalDatum.filter((entry
|
|
77855
|
+
? originalDatum.filter((entry) => {
|
|
77856
|
+
const parentKeysList = entry.parents.map((item) => item.key);
|
|
77857
|
+
return parentKeysList.includes(curLinkDatum.source) && parentKeysList.includes(curLinkDatum.target);
|
|
77858
|
+
})
|
|
77629
77859
|
: null;
|
|
77630
77860
|
if (selectedDatum && selectedDatum.length) {
|
|
77631
77861
|
if (!highlightNodes.includes(linkDatum.source)) {
|
|
@@ -78115,11 +78345,11 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
78115
78345
|
const colorDomain = !isNil$1((_g = (_f = this._option.globalScale.getScale('color')) === null || _f === void 0 ? void 0 : _f.domain()) === null || _g === void 0 ? void 0 : _g[0])
|
|
78116
78346
|
? this._option.globalScale.getScale('color').domain()
|
|
78117
78347
|
: this.getNodeList();
|
|
78118
|
-
let colorRange = (_j = (_h = this._option.globalScale.getScale('color')) === null || _h === void 0 ? void 0 : _h.range()) !== null && _j !== void 0 ? _j :
|
|
78348
|
+
let colorRange = (_j = (_h = this._option.globalScale.getScale('color')) === null || _h === void 0 ? void 0 : _h.range()) !== null && _j !== void 0 ? _j : this._getDataScheme();
|
|
78119
78349
|
if (((_k = this._option.globalScale.getScale('color')) === null || _k === void 0 ? void 0 : _k.domain().length) === 0 ||
|
|
78120
78350
|
isNil$1(this._option.globalScale.getScale('color').domain()[0])) {
|
|
78121
78351
|
if (colorDomain.length > 10) {
|
|
78122
|
-
colorRange = (_l =
|
|
78352
|
+
colorRange = (_l = this._getDataScheme()[1]) === null || _l === void 0 ? void 0 : _l.scheme;
|
|
78123
78353
|
}
|
|
78124
78354
|
}
|
|
78125
78355
|
const ordinalScale = new ColorOrdinalScale();
|
|
@@ -78303,8 +78533,6 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
78303
78533
|
}
|
|
78304
78534
|
}
|
|
78305
78535
|
|
|
78306
|
-
const rangeAreaSeriesMark = Object.assign({}, areaSeriesMark);
|
|
78307
|
-
|
|
78308
78536
|
class RangeAreaSeries extends AreaSeries {
|
|
78309
78537
|
constructor() {
|
|
78310
78538
|
super(...arguments);
|
|
@@ -78536,7 +78764,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
78536
78764
|
getColorAttribute() {
|
|
78537
78765
|
var _a;
|
|
78538
78766
|
return {
|
|
78539
|
-
scale: (_a = this._option.globalScale.getScale('color')) !== null && _a !== void 0 ? _a : this.
|
|
78767
|
+
scale: (_a = this._option.globalScale.getScale('color')) !== null && _a !== void 0 ? _a : this._getDefaultColorScale(),
|
|
78540
78768
|
field: this.getFieldValue[0]
|
|
78541
78769
|
};
|
|
78542
78770
|
}
|
|
@@ -83016,7 +83244,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
83016
83244
|
if (!pattern) {
|
|
83017
83245
|
return TooltipResult.failed;
|
|
83018
83246
|
}
|
|
83019
|
-
const position = this._getActualTooltipPosition(actualTooltip,
|
|
83247
|
+
const position = this._getActualTooltipPosition(actualTooltip, params, this._getTooltipBoxSize(actualTooltip, changePositionOnly));
|
|
83020
83248
|
actualTooltip.position = position;
|
|
83021
83249
|
if (pattern.updatePosition) {
|
|
83022
83250
|
actualTooltip.position = pattern.updatePosition(actualTooltip.position, data, params);
|
|
@@ -83035,26 +83263,31 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
83035
83263
|
const patternVisible = getTooltipPatternValue(pattern.visible, data, params);
|
|
83036
83264
|
let tooltipContent = null;
|
|
83037
83265
|
tooltipContent = getShowContent(pattern, data, params);
|
|
83038
|
-
const actualTooltip = Object.assign(Object.assign({}, tooltipContent), { visible: isValid$1(tooltipContent) ? patternVisible !== false : false, activeType: pattern.activeType });
|
|
83266
|
+
const actualTooltip = Object.assign(Object.assign({}, tooltipContent), { visible: isValid$1(tooltipContent) ? patternVisible !== false : false, activeType: pattern.activeType, data });
|
|
83039
83267
|
return actualTooltip;
|
|
83040
83268
|
};
|
|
83041
|
-
this._getActualTooltipPosition = (actualTooltip,
|
|
83042
|
-
var _a, _b, _c, _d, _e
|
|
83269
|
+
this._getActualTooltipPosition = (actualTooltip, params, tooltipBoxSize) => {
|
|
83270
|
+
var _a, _b, _c, _d, _e;
|
|
83043
83271
|
const event = params.event;
|
|
83044
|
-
const { width: tooltipBoxWidth = 0, height: tooltipBoxHeight = 0 } = (_a = this._getTooltipBoxSize(actualTooltip, changePositionOnly)) !== null && _a !== void 0 ? _a : {};
|
|
83045
83272
|
const invalidPosition = {
|
|
83046
83273
|
x: Infinity,
|
|
83047
83274
|
y: Infinity
|
|
83048
83275
|
};
|
|
83049
83276
|
const { offsetX, offsetY } = this._option;
|
|
83050
|
-
const tooltipSpec = this.
|
|
83277
|
+
const tooltipSpec = this._cacheViewSpec;
|
|
83051
83278
|
if (!tooltipSpec) {
|
|
83052
83279
|
return invalidPosition;
|
|
83053
83280
|
}
|
|
83281
|
+
const { activeType, data } = actualTooltip;
|
|
83282
|
+
const pattern = tooltipSpec[activeType];
|
|
83283
|
+
const position = getTooltipPatternValue(pattern.position, data, params);
|
|
83284
|
+
const positionMode = getTooltipPatternValue(pattern.positionMode, data, params);
|
|
83285
|
+
const tooltipParentElement = this._getParentElement(tooltipSpec);
|
|
83286
|
+
const { width: tooltipBoxWidth = 0, height: tooltipBoxHeight = 0 } = tooltipBoxSize !== null && tooltipBoxSize !== void 0 ? tooltipBoxSize : {};
|
|
83054
83287
|
const isCanvas = tooltipSpec.renderMode === 'canvas';
|
|
83055
|
-
const canvasRect = (
|
|
83056
|
-
const canvasWidth = (
|
|
83057
|
-
const canvasHeight = (
|
|
83288
|
+
const canvasRect = (_a = params === null || params === void 0 ? void 0 : params.chart) === null || _a === void 0 ? void 0 : _a.getCanvasRect();
|
|
83289
|
+
const canvasWidth = (_b = canvasRect === null || canvasRect === void 0 ? void 0 : canvasRect.width) !== null && _b !== void 0 ? _b : DEFAULT_CHART_WIDTH;
|
|
83290
|
+
const canvasHeight = (_c = canvasRect === null || canvasRect === void 0 ? void 0 : canvasRect.height) !== null && _c !== void 0 ? _c : DEFAULT_CHART_HEIGHT;
|
|
83058
83291
|
let isFixedPosition = false;
|
|
83059
83292
|
const containerSize = {
|
|
83060
83293
|
width: 0,
|
|
@@ -83068,8 +83301,8 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
83068
83301
|
containerSize.width = window.innerWidth;
|
|
83069
83302
|
containerSize.height = window.innerHeight;
|
|
83070
83303
|
if (!isCanvas) {
|
|
83071
|
-
tooltipParentElementRect = (
|
|
83072
|
-
const chartElement = ((
|
|
83304
|
+
tooltipParentElementRect = (_d = tooltipParentElement === null || tooltipParentElement === void 0 ? void 0 : tooltipParentElement.getBoundingClientRect()) !== null && _d !== void 0 ? _d : invalidPosition;
|
|
83305
|
+
const chartElement = ((_e = this._compiler.getCanvas()) !== null && _e !== void 0 ? _e : this._chartContainer);
|
|
83073
83306
|
const chartElementRect = chartElement === null || chartElement === void 0 ? void 0 : chartElement.getBoundingClientRect();
|
|
83074
83307
|
relativePosOffset = {
|
|
83075
83308
|
x: chartElementRect.x - tooltipParentElementRect.x,
|
|
@@ -83356,14 +83589,14 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
83356
83589
|
return Object.assign(Object.assign({}, DEFAULT_OPTIONS), { offsetX: (_a = offset === null || offset === void 0 ? void 0 : offset.x) !== null && _a !== void 0 ? _a : DEFAULT_OPTIONS.offsetX, offsetY: (_b = offset === null || offset === void 0 ? void 0 : offset.y) !== null && _b !== void 0 ? _b : DEFAULT_OPTIONS.offsetY });
|
|
83357
83590
|
}
|
|
83358
83591
|
_getTooltipBoxSize(actualTooltip, changePositionOnly) {
|
|
83359
|
-
var _a, _b, _c, _d, _e, _f;
|
|
83592
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
83360
83593
|
if (!changePositionOnly || isNil$1(this._attributes)) {
|
|
83361
|
-
const
|
|
83362
|
-
this._attributes = getTooltipAttributes(actualTooltip, this._component.getSpec(),
|
|
83594
|
+
const { chartLevelTheme = defaultChartLevelTheme } = (_c = (_b = (_a = this._chartOption).getThemeConfig) === null || _b === void 0 ? void 0 : _b.call(_a)) !== null && _c !== void 0 ? _c : {};
|
|
83595
|
+
this._attributes = getTooltipAttributes(actualTooltip, this._component.getSpec(), chartLevelTheme);
|
|
83363
83596
|
}
|
|
83364
83597
|
return {
|
|
83365
|
-
width: (
|
|
83366
|
-
height: (
|
|
83598
|
+
width: (_e = (_d = this._attributes) === null || _d === void 0 ? void 0 : _d.panel) === null || _e === void 0 ? void 0 : _e.width,
|
|
83599
|
+
height: (_g = (_f = this._attributes) === null || _f === void 0 ? void 0 : _f.panel) === null || _g === void 0 ? void 0 : _g.height
|
|
83367
83600
|
};
|
|
83368
83601
|
}
|
|
83369
83602
|
_getParentElement(spec) {
|
|
@@ -84171,7 +84404,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
84171
84404
|
this._container = null;
|
|
84172
84405
|
}
|
|
84173
84406
|
_updateTooltip(visible, params, actualTooltip) {
|
|
84174
|
-
var _a;
|
|
84407
|
+
var _a, _b;
|
|
84175
84408
|
if (!visible || !this.model) {
|
|
84176
84409
|
this.setVisibility(visible);
|
|
84177
84410
|
}
|
|
@@ -84184,9 +84417,18 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
84184
84417
|
this.model.setContent();
|
|
84185
84418
|
}
|
|
84186
84419
|
this.setVisibility(visible);
|
|
84187
|
-
|
|
84420
|
+
let { x = 0, y = 0 } = (_a = actualTooltip.position) !== null && _a !== void 0 ? _a : {};
|
|
84188
84421
|
const el = this.model.product;
|
|
84189
84422
|
if (el) {
|
|
84423
|
+
if ((_b = this._cacheViewSpec) === null || _b === void 0 ? void 0 : _b.updateElement) {
|
|
84424
|
+
this._cacheViewSpec.updateElement(el, actualTooltip, params);
|
|
84425
|
+
const position = this._getActualTooltipPosition(actualTooltip, params, {
|
|
84426
|
+
width: el.offsetWidth,
|
|
84427
|
+
height: el.offsetHeight
|
|
84428
|
+
});
|
|
84429
|
+
x = position.x;
|
|
84430
|
+
y = position.y;
|
|
84431
|
+
}
|
|
84190
84432
|
el.style.transform = `translate3d(${x}px, ${y}px, 0)`;
|
|
84191
84433
|
}
|
|
84192
84434
|
}
|
|
@@ -89069,7 +89311,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
89069
89311
|
this._linkedOutOfBrushElementsMap = {};
|
|
89070
89312
|
this._needInitOutState = true;
|
|
89071
89313
|
this._cacheInteractiveRangeAttrs = [];
|
|
89072
|
-
this._needEnablePickable =
|
|
89314
|
+
this._needEnablePickable = false;
|
|
89073
89315
|
}
|
|
89074
89316
|
init() {
|
|
89075
89317
|
var _a, _b;
|