@visactor/vchart 2.0.12-alpha.4 → 2.0.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/es5/index.js +1 -1
- package/build/index.es.js +131 -106
- package/build/index.js +131 -106
- package/build/index.min.js +2 -2
- package/build/tsconfig.tsbuildinfo +1 -1
- package/cjs/animation/callback-disappear.d.ts +10 -0
- package/cjs/animation/callback-disappear.js +26 -0
- package/cjs/animation/callback-disappear.js.map +1 -0
- package/cjs/animation/config.d.ts +0 -6
- package/cjs/animation/config.js +3 -29
- package/cjs/animation/config.js.map +1 -1
- package/cjs/animation/index.js +1 -2
- package/cjs/animation/interface.d.ts +6 -3
- package/cjs/animation/interface.js +2 -1
- package/cjs/animation/interface.js.map +1 -1
- package/cjs/chart/base/base-chart.d.ts +1 -0
- package/cjs/chart/base/base-chart.js +7 -2
- package/cjs/chart/base/base-chart.js.map +1 -1
- package/cjs/compile/compiler.d.ts +1 -1
- package/cjs/compile/compiler.js +14 -14
- package/cjs/compile/compiler.js.map +1 -1
- package/cjs/compile/interface/compilable-item.d.ts +1 -0
- package/cjs/compile/interface/compilable-item.js.map +1 -1
- package/cjs/component/axis/cartesian/axis.js +4 -1
- package/cjs/component/axis/cartesian/axis.js.map +1 -1
- package/cjs/component/axis/polar/axis.js +4 -2
- package/cjs/component/axis/polar/axis.js.map +1 -1
- package/cjs/component/axis/polar/interface/spec.d.ts +3 -1
- package/cjs/component/axis/polar/interface/spec.js.map +1 -1
- package/cjs/component/geo/geo-coordinate.js +3 -2
- package/cjs/component/geo/geo-coordinate.js.map +1 -1
- package/cjs/component/index.js +2 -1
- package/cjs/component/util.js +1 -2
- package/cjs/constant/animate.d.ts +5 -0
- package/cjs/constant/animate.js +15 -0
- package/cjs/constant/animate.js.map +1 -0
- package/cjs/constant/box-plot.js +2 -1
- package/cjs/constant/gradient.js +1 -2
- package/cjs/constant/sunburst.js +1 -1
- package/cjs/constant/waterfall.js +1 -1
- package/cjs/constant/word-cloud.js +1 -1
- package/cjs/core/index.d.ts +1 -1
- package/cjs/core/index.js +1 -1
- package/cjs/core/index.js.map +1 -1
- package/cjs/core/vchart.d.ts +3 -0
- package/cjs/core/vchart.js +18 -5
- package/cjs/core/vchart.js.map +1 -1
- package/cjs/region/interface.d.ts +1 -0
- package/cjs/region/interface.js.map +1 -1
- package/cjs/series/bar/animation.js +4 -2
- package/cjs/series/bar/animation.js.map +1 -1
- package/cjs/series/base/base-series.d.ts +0 -1
- package/cjs/series/base/base-series.js +2 -7
- package/cjs/series/base/base-series.js.map +1 -1
- package/cjs/series/circle-packing/animation.js +2 -2
- package/cjs/series/circle-packing/animation.js.map +1 -1
- package/cjs/series/gauge/animation.js +2 -2
- package/cjs/series/gauge/animation.js.map +1 -1
- package/cjs/series/heatmap/heatmap.d.ts +1 -1
- package/cjs/series/heatmap/heatmap.js +2 -2
- package/cjs/series/heatmap/heatmap.js.map +1 -1
- package/cjs/series/pie/animation/animation.js +4 -2
- package/cjs/series/pie/animation/animation.js.map +1 -1
- package/cjs/series/polar/progress-like/animation.js +2 -2
- package/cjs/series/polar/progress-like/animation.js.map +1 -1
- package/cjs/series/progress/linear/animation.js +4 -2
- package/cjs/series/progress/linear/animation.js.map +1 -1
- package/cjs/series/radar/animation.js +9 -3
- package/cjs/series/radar/animation.js.map +1 -1
- package/cjs/series/range-column/animation.js +4 -2
- package/cjs/series/range-column/animation.js.map +1 -1
- package/cjs/series/rose/animation.js +4 -2
- package/cjs/series/rose/animation.js.map +1 -1
- package/cjs/series/sankey/animation.js +3 -3
- package/cjs/series/sankey/animation.js.map +1 -1
- package/cjs/series/sunburst/animation/index.js +4 -2
- package/cjs/series/sunburst/animation/index.js.map +1 -1
- package/cjs/series/treemap/animation.js +2 -2
- package/cjs/series/treemap/animation.js.map +1 -1
- package/cjs/series/venn/animation.js +3 -3
- package/cjs/series/venn/animation.js.map +1 -1
- package/cjs/series/waterfall/animation.js +4 -2
- package/cjs/series/waterfall/animation.js.map +1 -1
- package/cjs/series/word-cloud/animation.js +1 -1
- package/cjs/series/word-cloud/animation.js.map +1 -1
- package/cjs/theme/builtin/common/series/heatmap.js +1 -1
- package/cjs/theme/builtin/common/series/heatmap.js.map +1 -1
- package/cjs/util/type.d.ts +1 -0
- package/cjs/util/type.js +6 -2
- package/cjs/util/type.js.map +1 -1
- package/esm/animation/callback-disappear.d.ts +10 -0
- package/esm/animation/callback-disappear.js +18 -0
- package/esm/animation/callback-disappear.js.map +1 -0
- package/esm/animation/config.d.ts +0 -6
- package/esm/animation/config.js +7 -26
- package/esm/animation/config.js.map +1 -1
- package/esm/animation/index.js +1 -2
- package/esm/animation/interface.d.ts +6 -3
- package/esm/animation/interface.js +2 -1
- package/esm/animation/interface.js.map +1 -1
- package/esm/chart/base/base-chart.d.ts +1 -0
- package/esm/chart/base/base-chart.js +7 -1
- package/esm/chart/base/base-chart.js.map +1 -1
- package/esm/compile/compiler.d.ts +1 -1
- package/esm/compile/compiler.js +16 -15
- package/esm/compile/compiler.js.map +1 -1
- package/esm/compile/interface/compilable-item.d.ts +1 -0
- package/esm/compile/interface/compilable-item.js.map +1 -1
- package/esm/component/axis/cartesian/axis.js +4 -1
- package/esm/component/axis/cartesian/axis.js.map +1 -1
- package/esm/component/axis/polar/axis.js +4 -2
- package/esm/component/axis/polar/axis.js.map +1 -1
- package/esm/component/axis/polar/interface/spec.d.ts +3 -1
- package/esm/component/axis/polar/interface/spec.js.map +1 -1
- package/esm/component/geo/geo-coordinate.js +3 -2
- package/esm/component/geo/geo-coordinate.js.map +1 -1
- package/esm/component/index.js +2 -1
- package/esm/component/util.js +1 -2
- package/esm/constant/animate.d.ts +5 -0
- package/esm/constant/animate.js +10 -0
- package/esm/constant/animate.js.map +1 -0
- package/esm/constant/box-plot.js +2 -1
- package/esm/constant/gradient.js +1 -2
- package/esm/constant/sunburst.js +1 -1
- package/esm/constant/waterfall.js +1 -1
- package/esm/constant/word-cloud.js +1 -1
- package/esm/core/index.d.ts +1 -1
- package/esm/core/index.js +1 -1
- package/esm/core/index.js.map +1 -1
- package/esm/core/vchart.d.ts +3 -0
- package/esm/core/vchart.js +19 -4
- package/esm/core/vchart.js.map +1 -1
- package/esm/region/interface.d.ts +1 -0
- package/esm/region/interface.js.map +1 -1
- package/esm/series/bar/animation.js +5 -1
- package/esm/series/bar/animation.js.map +1 -1
- package/esm/series/base/base-series.d.ts +0 -1
- package/esm/series/base/base-series.js +2 -6
- package/esm/series/base/base-series.js.map +1 -1
- package/esm/series/circle-packing/animation.js +3 -1
- package/esm/series/circle-packing/animation.js.map +1 -1
- package/esm/series/gauge/animation.js +3 -1
- package/esm/series/gauge/animation.js.map +1 -1
- package/esm/series/heatmap/heatmap.d.ts +1 -1
- package/esm/series/heatmap/heatmap.js +2 -2
- package/esm/series/heatmap/heatmap.js.map +1 -1
- package/esm/series/pie/animation/animation.js +5 -1
- package/esm/series/pie/animation/animation.js.map +1 -1
- package/esm/series/polar/progress-like/animation.js +3 -1
- package/esm/series/polar/progress-like/animation.js.map +1 -1
- package/esm/series/progress/linear/animation.js +5 -1
- package/esm/series/progress/linear/animation.js.map +1 -1
- package/esm/series/radar/animation.js +9 -3
- package/esm/series/radar/animation.js.map +1 -1
- package/esm/series/range-column/animation.js +5 -1
- package/esm/series/range-column/animation.js.map +1 -1
- package/esm/series/rose/animation.js +5 -1
- package/esm/series/rose/animation.js.map +1 -1
- package/esm/series/sankey/animation.js +3 -1
- package/esm/series/sankey/animation.js.map +1 -1
- package/esm/series/sunburst/animation/index.js +5 -1
- package/esm/series/sunburst/animation/index.js.map +1 -1
- package/esm/series/treemap/animation.js +3 -1
- package/esm/series/treemap/animation.js.map +1 -1
- package/esm/series/venn/animation.js +4 -2
- package/esm/series/venn/animation.js.map +1 -1
- package/esm/series/waterfall/animation.js +5 -1
- package/esm/series/waterfall/animation.js.map +1 -1
- package/esm/series/word-cloud/animation.js +1 -1
- package/esm/series/word-cloud/animation.js.map +1 -1
- package/esm/theme/builtin/common/series/heatmap.js +1 -1
- package/esm/theme/builtin/common/series/heatmap.js.map +1 -1
- package/esm/util/type.d.ts +1 -0
- package/esm/util/type.js +4 -0
- package/esm/util/type.js.map +1 -1
- package/package.json +9 -9
package/build/index.js
CHANGED
|
@@ -26238,6 +26238,9 @@
|
|
|
26238
26238
|
}
|
|
26239
26239
|
return isArray$1(domain[0].fields);
|
|
26240
26240
|
}
|
|
26241
|
+
function isClass(obj) {
|
|
26242
|
+
return typeof obj === 'function' && /^class\s/.test(obj.toString());
|
|
26243
|
+
}
|
|
26241
26244
|
|
|
26242
26245
|
const GROUP_ATTRIBUTES = ["x", "y", "dx", "dy", "scaleX", "scaleY", "angle", "anchor", "postMatrix", "visible", "clip", "pickable", "childrenPickable", "zIndex", "cursor"];
|
|
26243
26246
|
class AbstractComponent extends Group$1 {
|
|
@@ -26579,9 +26582,11 @@
|
|
|
26579
26582
|
}
|
|
26580
26583
|
emitEvent(type, e) {
|
|
26581
26584
|
if (!this.element) return;
|
|
26582
|
-
const
|
|
26585
|
+
const events = this.element._events;
|
|
26586
|
+
this._callListeners(type, e, events[WILDCARD]), this._callListeners(type, e, events[type]), this.emit(type, e);
|
|
26587
|
+
}
|
|
26588
|
+
_callListeners(type, e, listeners) {
|
|
26583
26589
|
if (listeners) if ("fn" in listeners) listeners.fn.call(listeners.context, e, type);else for (let i = 0, j = listeners.length; i < j && !e.propagationImmediatelyStopped; i++) listeners[i].fn.call(listeners[i].context, e, type);
|
|
26584
|
-
this.emit(type, e);
|
|
26585
26590
|
}
|
|
26586
26591
|
}
|
|
26587
26592
|
|
|
@@ -40717,8 +40722,9 @@
|
|
|
40717
40722
|
let tickLength = 0;
|
|
40718
40723
|
(null === (_b = this.attribute.tick) || void 0 === _b ? void 0 : _b.visible) && !1 === this.attribute.tick.inside && (tickLength = this.attribute.tick.length || 4), (null === (_c = this.attribute.subTick) || void 0 === _c ? void 0 : _c.visible) && !1 === this.attribute.subTick.inside && (tickLength = Math.max(tickLength, this.attribute.subTick.length || 2));
|
|
40719
40724
|
const offset = tickLength + labelLength + space,
|
|
40720
|
-
|
|
40721
|
-
|
|
40725
|
+
actualOffset = this.getActualOffset(offset),
|
|
40726
|
+
titlePoint = this.getVerticalCoord(point, actualOffset, !1),
|
|
40727
|
+
vector = this.getVerticalVector(actualOffset, !1, {
|
|
40722
40728
|
x: 0,
|
|
40723
40729
|
y: 0
|
|
40724
40730
|
});
|
|
@@ -40747,11 +40753,11 @@
|
|
|
40747
40753
|
if (angle !== Math.PI / 2) {
|
|
40748
40754
|
const cosValue = Math.abs(Math.cos(null != angle ? angle : 0));
|
|
40749
40755
|
maxTagWidth = cosValue < 1e-6 ? 1 / 0 : this.attribute.end.x / cosValue;
|
|
40750
|
-
} else maxTagWidth = limitSize -
|
|
40756
|
+
} else maxTagWidth = limitSize - actualOffset;
|
|
40751
40757
|
} else if (angle && 0 !== angle) {
|
|
40752
40758
|
const sinValue = Math.abs(Math.sin(angle));
|
|
40753
40759
|
maxTagWidth = sinValue < 1e-6 ? 1 / 0 : this.attribute.end.y / sinValue;
|
|
40754
|
-
} else maxTagWidth = limitSize -
|
|
40760
|
+
} else maxTagWidth = limitSize - actualOffset;
|
|
40755
40761
|
}
|
|
40756
40762
|
}
|
|
40757
40763
|
const attrs = Object.assign(Object.assign(Object.assign({}, titlePoint), restAttrs), {
|
|
@@ -41056,6 +41062,10 @@
|
|
|
41056
41062
|
visibleAll: !1
|
|
41057
41063
|
});
|
|
41058
41064
|
}
|
|
41065
|
+
getActualOffset(offset) {
|
|
41066
|
+
const orient = this.attribute.orient;
|
|
41067
|
+
return "left" === orient || "right" === orient ? this.attribute.width ? this.attribute.width : (this.attribute.maxWidth && (offset = Math.min(offset, this.attribute.maxWidth)), this.attribute.minWidth && (offset = Math.max(offset, this.attribute.minWidth)), offset) : offset;
|
|
41068
|
+
}
|
|
41059
41069
|
release() {
|
|
41060
41070
|
super.release(), this._breaks = null;
|
|
41061
41071
|
}
|
|
@@ -54876,7 +54886,17 @@
|
|
|
54876
54886
|
return diffResult;
|
|
54877
54887
|
}
|
|
54878
54888
|
|
|
54889
|
+
const BuiltIn_DISAPPEAR_ANIMATE_NAME = `${PREFIX}_BuiltIn_CallBack_Disappear`;
|
|
54890
|
+
var RenderStateEnum;
|
|
54891
|
+
(function (RenderStateEnum) {
|
|
54892
|
+
RenderStateEnum["render"] = "render";
|
|
54893
|
+
RenderStateEnum["disappear"] = "disappear";
|
|
54894
|
+
})(RenderStateEnum || (RenderStateEnum = {}));
|
|
54895
|
+
|
|
54879
54896
|
class Compiler {
|
|
54897
|
+
get stateAnimationConfig() {
|
|
54898
|
+
return this._stateAnimationConfig;
|
|
54899
|
+
}
|
|
54880
54900
|
getRootGroup() {
|
|
54881
54901
|
return this._rootGroup;
|
|
54882
54902
|
}
|
|
@@ -55061,7 +55081,6 @@
|
|
|
55061
55081
|
var _a, _b, _c, _d, _e, _f;
|
|
55062
55082
|
(_b = (_a = this._option.performanceHook) === null || _a === void 0 ? void 0 : _a.beforeDoRender) === null || _b === void 0 ? void 0 : _b.call(_a, this._compileChart.getOption().globalInstance);
|
|
55063
55083
|
if (this._stage) {
|
|
55064
|
-
this.runStageAnimation();
|
|
55065
55084
|
this._rootMarks.forEach(g => {
|
|
55066
55085
|
traverseGroupMark(g, m => {
|
|
55067
55086
|
if (m.needClear) {
|
|
@@ -55155,14 +55174,26 @@
|
|
|
55155
55174
|
Object.keys(config).forEach(key => {
|
|
55156
55175
|
const value = config[key];
|
|
55157
55176
|
if (isArray$1(value)) {
|
|
55158
|
-
|
|
55159
|
-
|
|
55160
|
-
|
|
55161
|
-
|
|
55162
|
-
|
|
55163
|
-
|
|
55164
|
-
|
|
55165
|
-
|
|
55177
|
+
if (key === 'disappear') {
|
|
55178
|
+
animationConfig[key] = value.map(item => {
|
|
55179
|
+
if (isClass(item.callBack)) {
|
|
55180
|
+
return Object.assign(Object.assign({}, item), { custom: item.callBack });
|
|
55181
|
+
}
|
|
55182
|
+
return Object.assign(Object.assign({}, item), { type: BuiltIn_DISAPPEAR_ANIMATE_NAME, customParameters: {
|
|
55183
|
+
callBack: item.callBack
|
|
55184
|
+
} });
|
|
55185
|
+
});
|
|
55186
|
+
}
|
|
55187
|
+
else {
|
|
55188
|
+
animationConfig[key] = value.map(item => {
|
|
55189
|
+
var _a;
|
|
55190
|
+
const options = (_a = item.options) !== null && _a !== void 0 ? _a : {};
|
|
55191
|
+
return Object.assign(Object.assign({}, item), { options: (...args) => {
|
|
55192
|
+
const _options = typeof options === 'function' ? options(...args) : options;
|
|
55193
|
+
return Object.assign({}, _options);
|
|
55194
|
+
} });
|
|
55195
|
+
});
|
|
55196
|
+
}
|
|
55166
55197
|
}
|
|
55167
55198
|
else {
|
|
55168
55199
|
animationConfig[key] = Object.assign({}, config[key]);
|
|
@@ -55188,29 +55219,6 @@
|
|
|
55188
55219
|
}
|
|
55189
55220
|
this._stage.context.animationState = animationState;
|
|
55190
55221
|
}
|
|
55191
|
-
runStageAnimation() {
|
|
55192
|
-
var _a;
|
|
55193
|
-
const animationState = (_a = this._stage.context) === null || _a === void 0 ? void 0 : _a.animationState;
|
|
55194
|
-
if (!this._stateAnimationConfig || animationState === AnimationStateEnum.none) {
|
|
55195
|
-
return;
|
|
55196
|
-
}
|
|
55197
|
-
const animationConfigs = array(this._stateAnimationConfig[animationState]).filter(config => config.type);
|
|
55198
|
-
if (!animationConfigs.length) {
|
|
55199
|
-
return;
|
|
55200
|
-
}
|
|
55201
|
-
if (animationState === AnimationStateEnum.appear) {
|
|
55202
|
-
this._stage.stopAnimationState(AnimationStateEnum.disappear);
|
|
55203
|
-
}
|
|
55204
|
-
else if (animationState === AnimationStateEnum.disappear) {
|
|
55205
|
-
this._stage.stopAnimationState(AnimationStateEnum.appear);
|
|
55206
|
-
}
|
|
55207
|
-
this._stage.applyAnimationState([animationState], [
|
|
55208
|
-
{
|
|
55209
|
-
name: animationState,
|
|
55210
|
-
animation: animationConfigs
|
|
55211
|
-
}
|
|
55212
|
-
]);
|
|
55213
|
-
}
|
|
55214
55222
|
updateViewBox(viewBox, reRender = true) {
|
|
55215
55223
|
if (!this._stage) {
|
|
55216
55224
|
return;
|
|
@@ -59666,6 +59674,29 @@
|
|
|
59666
59674
|
}
|
|
59667
59675
|
}
|
|
59668
59676
|
|
|
59677
|
+
class CallbackDisappearAnimate extends AStageAnimate {
|
|
59678
|
+
constructor(from, to, duration, easing, params) {
|
|
59679
|
+
super(from, to, duration, easing, params);
|
|
59680
|
+
this.currentAnimationRatio = 0;
|
|
59681
|
+
this.animationTime = 0;
|
|
59682
|
+
}
|
|
59683
|
+
onUpdate(end, ratio, out) {
|
|
59684
|
+
super.onUpdate(end, ratio, out);
|
|
59685
|
+
this.currentAnimationRatio = ratio;
|
|
59686
|
+
this.animationTime = ratio * Math.PI * 2;
|
|
59687
|
+
}
|
|
59688
|
+
getAnimationTime() {
|
|
59689
|
+
if (this.currentAnimationRatio > 0) {
|
|
59690
|
+
return this.animationTime;
|
|
59691
|
+
}
|
|
59692
|
+
return Date.now() / 1000.0;
|
|
59693
|
+
}
|
|
59694
|
+
afterStageRender(stage, canvas) {
|
|
59695
|
+
var _a, _b;
|
|
59696
|
+
(_b = (_a = this.params) === null || _a === void 0 ? void 0 : _a.callBack) === null || _b === void 0 ? void 0 : _b.call(_a, stage, canvas, this.currentAnimationRatio, this.animationTime);
|
|
59697
|
+
}
|
|
59698
|
+
}
|
|
59699
|
+
|
|
59669
59700
|
const DEFAULT_ANIMATION_CONFIG = {
|
|
59670
59701
|
appear: {
|
|
59671
59702
|
duration: 1000,
|
|
@@ -59696,14 +59727,12 @@
|
|
|
59696
59727
|
const ScaleInOutAnimation = {
|
|
59697
59728
|
appear: { type: 'scaleIn' },
|
|
59698
59729
|
enter: { type: 'scaleIn' },
|
|
59699
|
-
exit: { type: 'scaleOut' }
|
|
59700
|
-
disappear: { type: 'scaleOut' }
|
|
59730
|
+
exit: { type: 'scaleOut' }
|
|
59701
59731
|
};
|
|
59702
59732
|
const FadeInOutAnimation = {
|
|
59703
59733
|
appear: { type: 'fadeIn' },
|
|
59704
59734
|
enter: { type: 'fadeIn' },
|
|
59705
|
-
exit: { type: 'fadeOut' }
|
|
59706
|
-
disappear: { type: 'fadeOut' }
|
|
59735
|
+
exit: { type: 'fadeOut' }
|
|
59707
59736
|
};
|
|
59708
59737
|
const registerScaleInOutAnimation = () => {
|
|
59709
59738
|
Factory.registerAnimation('scaleInOut', () => ScaleInOutAnimation);
|
|
@@ -59726,19 +59755,6 @@
|
|
|
59726
59755
|
orient: params.orient()
|
|
59727
59756
|
};
|
|
59728
59757
|
}
|
|
59729
|
-
},
|
|
59730
|
-
disappear: {
|
|
59731
|
-
custom: ClipDirectionAnimate,
|
|
59732
|
-
customParameters: (datum, g) => {
|
|
59733
|
-
return {
|
|
59734
|
-
animationType: 'out',
|
|
59735
|
-
group: g,
|
|
59736
|
-
direction: params.direction(),
|
|
59737
|
-
width: params.width(),
|
|
59738
|
-
height: params.height(),
|
|
59739
|
-
orient: params.orient()
|
|
59740
|
-
};
|
|
59741
|
-
}
|
|
59742
59758
|
}
|
|
59743
59759
|
};
|
|
59744
59760
|
});
|
|
@@ -59762,8 +59778,7 @@
|
|
|
59762
59778
|
clipRangeByDimension: params.direction === "horizontal" ? 'y' : 'x'
|
|
59763
59779
|
}
|
|
59764
59780
|
}
|
|
59765
|
-
]
|
|
59766
|
-
disappear: { type: 'clipOut' }
|
|
59781
|
+
]
|
|
59767
59782
|
};
|
|
59768
59783
|
};
|
|
59769
59784
|
const registerLineAnimation = () => {
|
|
@@ -59813,13 +59828,7 @@
|
|
|
59813
59828
|
AnimateExecutor.registerBuiltInAnimate('growPointsOut', GrowPointsOut);
|
|
59814
59829
|
};
|
|
59815
59830
|
const registerStageAnimation = () => {
|
|
59816
|
-
AnimateExecutor.registerBuiltInAnimate(
|
|
59817
|
-
AnimateExecutor.registerBuiltInAnimate('particle', Particle);
|
|
59818
|
-
AnimateExecutor.registerBuiltInAnimate('pixelation', Pixelation);
|
|
59819
|
-
AnimateExecutor.registerBuiltInAnimate('gaussianBlur', GaussianBlur);
|
|
59820
|
-
AnimateExecutor.registerBuiltInAnimate('glitch', Glitch);
|
|
59821
|
-
AnimateExecutor.registerBuiltInAnimate('grayscale', Grayscale);
|
|
59822
|
-
AnimateExecutor.registerBuiltInAnimate('dissolve', Dissolve);
|
|
59831
|
+
AnimateExecutor.registerBuiltInAnimate(BuiltIn_DISAPPEAR_ANIMATE_NAME, CallbackDisappearAnimate);
|
|
59823
59832
|
};
|
|
59824
59833
|
|
|
59825
59834
|
const registerAnimate = () => {
|
|
@@ -60366,6 +60375,7 @@
|
|
|
60366
60375
|
};
|
|
60367
60376
|
this._observer = null;
|
|
60368
60377
|
this._context = {};
|
|
60378
|
+
this._renderState = RenderStateEnum.render;
|
|
60369
60379
|
this._doResize = () => {
|
|
60370
60380
|
const { width, height } = this.getCurrentSize();
|
|
60371
60381
|
if (this._currentSize.width !== width || this._currentSize.height !== height) {
|
|
@@ -60386,6 +60396,7 @@
|
|
|
60386
60396
|
};
|
|
60387
60397
|
this._updateSpec = (spec, forceMerge = false, userUpdateOptions) => {
|
|
60388
60398
|
var _a;
|
|
60399
|
+
this._reSetRenderState();
|
|
60389
60400
|
const lastSpec = this._spec;
|
|
60390
60401
|
const result = {
|
|
60391
60402
|
changeBackground: false,
|
|
@@ -60858,6 +60869,7 @@
|
|
|
60858
60869
|
});
|
|
60859
60870
|
}
|
|
60860
60871
|
updateDataSync(id, data, parserOptions, userUpdateOptions) {
|
|
60872
|
+
this._reSetRenderState();
|
|
60861
60873
|
if (isNil$1(this._dataSet)) {
|
|
60862
60874
|
return this;
|
|
60863
60875
|
}
|
|
@@ -60875,6 +60887,7 @@
|
|
|
60875
60887
|
return this;
|
|
60876
60888
|
}
|
|
60877
60889
|
updateFullDataSync(data, reRender = true, userUpdateOptions) {
|
|
60890
|
+
this._reSetRenderState();
|
|
60878
60891
|
if (this._chart) {
|
|
60879
60892
|
this._chart.updateFullData(data);
|
|
60880
60893
|
if (reRender) {
|
|
@@ -61599,6 +61612,20 @@
|
|
|
61599
61612
|
componentShowContent: this._option.componentShowContent
|
|
61600
61613
|
};
|
|
61601
61614
|
}
|
|
61615
|
+
runDisappearAnimation() {
|
|
61616
|
+
this._renderState = RenderStateEnum.disappear;
|
|
61617
|
+
this.getStage().eventSystem.pauseTriggerEvent();
|
|
61618
|
+
this.getStage().applyAnimationState(['disappear'], [
|
|
61619
|
+
{
|
|
61620
|
+
name: 'disappear',
|
|
61621
|
+
animation: this._compiler.stateAnimationConfig.disappear
|
|
61622
|
+
}
|
|
61623
|
+
]);
|
|
61624
|
+
}
|
|
61625
|
+
_reSetRenderState() {
|
|
61626
|
+
this._renderState = RenderStateEnum.render;
|
|
61627
|
+
this.getStage().eventSystem.resumeTriggerEvent();
|
|
61628
|
+
}
|
|
61602
61629
|
}
|
|
61603
61630
|
VChart.InstanceManager = InstanceManager;
|
|
61604
61631
|
VChart.ThemeManager = ThemeManager;
|
|
@@ -61715,7 +61742,7 @@
|
|
|
61715
61742
|
});
|
|
61716
61743
|
};
|
|
61717
61744
|
|
|
61718
|
-
const version = "2.0.
|
|
61745
|
+
const version = "2.0.12";
|
|
61719
61746
|
|
|
61720
61747
|
const addVChartProperty = (data, op) => {
|
|
61721
61748
|
const context = op.beforeCall();
|
|
@@ -62765,7 +62792,6 @@
|
|
|
62765
62792
|
this.initMarkState();
|
|
62766
62793
|
if (hasAnimation) {
|
|
62767
62794
|
this.initAnimation();
|
|
62768
|
-
this.initStageAnimation();
|
|
62769
62795
|
}
|
|
62770
62796
|
this.afterInitMark();
|
|
62771
62797
|
this.initEvent();
|
|
@@ -63222,13 +63248,6 @@
|
|
|
63222
63248
|
}
|
|
63223
63249
|
initAnimation() {
|
|
63224
63250
|
}
|
|
63225
|
-
initStageAnimation() {
|
|
63226
|
-
const compiler = this._option.getCompiler();
|
|
63227
|
-
if (!(compiler === null || compiler === void 0 ? void 0 : compiler.setStageAnimationConfig)) {
|
|
63228
|
-
return;
|
|
63229
|
-
}
|
|
63230
|
-
compiler.setStageAnimationConfig(animationConfig({}, userAnimationConfig('stage', this._spec, this._markAttributeContext), null));
|
|
63231
|
-
}
|
|
63232
63251
|
initMarkState() {
|
|
63233
63252
|
this.initSeriesStyleState();
|
|
63234
63253
|
}
|
|
@@ -67088,7 +67107,10 @@
|
|
|
67088
67107
|
maxWidth: this._getTitleLimit(isX)
|
|
67089
67108
|
},
|
|
67090
67109
|
items,
|
|
67091
|
-
scale: this._scale.clone()
|
|
67110
|
+
scale: this._scale.clone(),
|
|
67111
|
+
maxWidth: this._layout.maxWidth,
|
|
67112
|
+
minWidth: this._layout.minWidth,
|
|
67113
|
+
width: this._spec.width ? this.getLayoutRect().width : undefined
|
|
67092
67114
|
};
|
|
67093
67115
|
if (!ignoreGrid) {
|
|
67094
67116
|
attrs.grid = {
|
|
@@ -69744,6 +69766,14 @@
|
|
|
69744
69766
|
(_d = (_c = this)._initStack) === null || _d === void 0 ? void 0 : _d.call(_c);
|
|
69745
69767
|
this.reDataFlow();
|
|
69746
69768
|
this._initInteractions();
|
|
69769
|
+
this.initStageAnimation();
|
|
69770
|
+
}
|
|
69771
|
+
initStageAnimation() {
|
|
69772
|
+
const compiler = this._option.getCompiler();
|
|
69773
|
+
if (!(compiler === null || compiler === void 0 ? void 0 : compiler.setStageAnimationConfig)) {
|
|
69774
|
+
return;
|
|
69775
|
+
}
|
|
69776
|
+
compiler.setStageAnimationConfig(animationConfig({}, userAnimationConfig('stage', this._spec, {}), null));
|
|
69747
69777
|
}
|
|
69748
69778
|
reDataFlow() {
|
|
69749
69779
|
this._series.forEach(s => { var _a; return (_a = s.getRawData()) === null || _a === void 0 ? void 0 : _a.markRunning(); });
|
|
@@ -72419,7 +72449,7 @@
|
|
|
72419
72449
|
appear: barPresetAnimation(params, preset),
|
|
72420
72450
|
enter: barGrowIn(params, false),
|
|
72421
72451
|
exit: barGrowOut(params, false),
|
|
72422
|
-
disappear:
|
|
72452
|
+
disappear: { duration: DEFAULT_ANIMATION_CONFIG.disappear.duration }
|
|
72423
72453
|
};
|
|
72424
72454
|
});
|
|
72425
72455
|
};
|
|
@@ -74271,7 +74301,9 @@
|
|
|
74271
74301
|
};
|
|
74272
74302
|
this._handleChartZoom = (params, event) => {
|
|
74273
74303
|
var _a, _b, _c, _d, _e, _f;
|
|
74274
|
-
|
|
74304
|
+
const rate = isValid$1(this._spec.zoomRate) ? Math.max(0, this._spec.zoomRate) : 1;
|
|
74305
|
+
const delta = Math.max(params.zoomDelta, 1e-6);
|
|
74306
|
+
let scale = Math.pow(delta, rate);
|
|
74275
74307
|
const _lastActualScale = this._actualScale;
|
|
74276
74308
|
this._actualScale *= scale;
|
|
74277
74309
|
if (this._actualScale < ((_a = this._spec.zoomLimit) === null || _a === void 0 ? void 0 : _a.min)) {
|
|
@@ -74563,7 +74595,7 @@
|
|
|
74563
74595
|
_compareSpec(spec, prevSpec) {
|
|
74564
74596
|
const result = super._compareSpec(spec, prevSpec);
|
|
74565
74597
|
if (!result.reMake) {
|
|
74566
|
-
result.reMake = ['roam', 'longitudeField', 'latitudeField', 'projection', 'zoomLimit'].some(k => {
|
|
74598
|
+
result.reMake = ['roam', 'longitudeField', 'latitudeField', 'projection', 'zoomLimit', 'zoomRate'].some(k => {
|
|
74567
74599
|
return !isEqual(prevSpec === null || prevSpec === void 0 ? void 0 : prevSpec[k], spec[k]);
|
|
74568
74600
|
});
|
|
74569
74601
|
}
|
|
@@ -75149,7 +75181,7 @@
|
|
|
75149
75181
|
appear: waterfallPresetAnimation(params, preset),
|
|
75150
75182
|
enter: barGrowIn(params, false),
|
|
75151
75183
|
exit: barGrowOut(params, false),
|
|
75152
|
-
disappear:
|
|
75184
|
+
disappear: { duration: DEFAULT_ANIMATION_CONFIG.disappear.duration }
|
|
75153
75185
|
};
|
|
75154
75186
|
});
|
|
75155
75187
|
};
|
|
@@ -77387,7 +77419,7 @@
|
|
|
77387
77419
|
appear: rangeColumnPresetAnimation(params, preset),
|
|
77388
77420
|
enter: rangeColumnGrowIn(params),
|
|
77389
77421
|
exit: rangeColumnGrowOut(params),
|
|
77390
|
-
disappear:
|
|
77422
|
+
disappear: { duration: DEFAULT_ANIMATION_CONFIG.disappear.duration }
|
|
77391
77423
|
}));
|
|
77392
77424
|
};
|
|
77393
77425
|
|
|
@@ -78049,7 +78081,7 @@
|
|
|
78049
78081
|
appear: piePresetAnimation(params, preset),
|
|
78050
78082
|
enter: pieEnter(params),
|
|
78051
78083
|
exit: pieExit(params),
|
|
78052
|
-
disappear:
|
|
78084
|
+
disappear: { duration: DEFAULT_ANIMATION_CONFIG.disappear.duration }
|
|
78053
78085
|
};
|
|
78054
78086
|
});
|
|
78055
78087
|
};
|
|
@@ -78642,7 +78674,6 @@
|
|
|
78642
78674
|
type: growOutType(params.growField)
|
|
78643
78675
|
};
|
|
78644
78676
|
};
|
|
78645
|
-
const roseDisappear = roseExit;
|
|
78646
78677
|
function rosePresetAnimation(params, preset) {
|
|
78647
78678
|
if (preset === false) {
|
|
78648
78679
|
return {};
|
|
@@ -78662,7 +78693,7 @@
|
|
|
78662
78693
|
appear: rosePresetAnimation(params, preset),
|
|
78663
78694
|
enter: roseEnter(params),
|
|
78664
78695
|
exit: roseExit(params),
|
|
78665
|
-
disappear:
|
|
78696
|
+
disappear: { duration: DEFAULT_ANIMATION_CONFIG.disappear.duration }
|
|
78666
78697
|
};
|
|
78667
78698
|
});
|
|
78668
78699
|
};
|
|
@@ -78996,7 +79027,7 @@
|
|
|
78996
79027
|
return this._startAngle;
|
|
78997
79028
|
}
|
|
78998
79029
|
_layoutAngleAxis() {
|
|
78999
|
-
var _a, _b, _c;
|
|
79030
|
+
var _a, _b, _c, _d, _e;
|
|
79000
79031
|
const center = this.getCenter();
|
|
79001
79032
|
const radius = this.computeLayoutOuterRadius();
|
|
79002
79033
|
const innerRadius = this.computeLayoutInnerRadius();
|
|
@@ -79004,7 +79035,7 @@
|
|
|
79004
79035
|
const items = this.getLabelItems(angleRange);
|
|
79005
79036
|
const commonAttrs = Object.assign(Object.assign({}, this.getLayoutStartPoint()), { inside: this._spec.inside, center,
|
|
79006
79037
|
radius,
|
|
79007
|
-
innerRadius, startAngle: this._startAngle, endAngle: this._endAngle,
|
|
79038
|
+
innerRadius, startAngle: this._startAngle, endAngle: this._endAngle, layoutRect: this.getRefLayoutRect(), autoLabelMaxWidth: (_b = (_a = this._spec.label) === null || _a === void 0 ? void 0 : _a.autoLabelMaxWidth) !== null && _b !== void 0 ? _b : false, sides: ((_e = (_d = (_c = this._getRelatedAxis(this._option.radiusAxisIndex)) === null || _c === void 0 ? void 0 : _c.getSpec()) === null || _d === void 0 ? void 0 : _d.grid) === null || _e === void 0 ? void 0 : _e.smooth)
|
|
79008
79039
|
? undefined
|
|
79009
79040
|
: this.getScale().domain().length });
|
|
79010
79041
|
const attrs = Object.assign(Object.assign({}, commonAttrs), { size: this.getRefLayoutRect(), title: {
|
|
@@ -79549,7 +79580,7 @@
|
|
|
79549
79580
|
appear: preset === 'clipIn' ? undefined : radarPresetAnimation(params, preset, 'in'),
|
|
79550
79581
|
enter: radarPresetAnimation(params, preset, 'in'),
|
|
79551
79582
|
exit: radarPresetAnimation(params, preset, 'out'),
|
|
79552
|
-
disappear: preset === 'clipIn' ? undefined :
|
|
79583
|
+
disappear: preset === 'clipIn' ? undefined : { duration: DEFAULT_ANIMATION_CONFIG.disappear.duration },
|
|
79553
79584
|
update: [
|
|
79554
79585
|
{
|
|
79555
79586
|
channel: ['points', 'center'],
|
|
@@ -79569,7 +79600,7 @@
|
|
|
79569
79600
|
appear: preset === 'clipIn' ? undefined : radarSymbolPresetAnimation(params, preset, 'in'),
|
|
79570
79601
|
enter: { type: 'scaleIn' },
|
|
79571
79602
|
exit: { type: 'scaleOut' },
|
|
79572
|
-
disappear: preset === 'clipIn' ? undefined :
|
|
79603
|
+
disappear: preset === 'clipIn' ? undefined : { duration: DEFAULT_ANIMATION_CONFIG.disappear.duration },
|
|
79573
79604
|
update: [
|
|
79574
79605
|
{
|
|
79575
79606
|
options: { excludeChannels: ['x', 'y', 'center'] }
|
|
@@ -79586,7 +79617,7 @@
|
|
|
79586
79617
|
Factory.registerAnimation('radarGroup', (params, preset) => {
|
|
79587
79618
|
return {
|
|
79588
79619
|
appear: radarGroupClipAnimation(params, 'in'),
|
|
79589
|
-
disappear:
|
|
79620
|
+
disappear: { duration: DEFAULT_ANIMATION_CONFIG.disappear.duration }
|
|
79590
79621
|
};
|
|
79591
79622
|
});
|
|
79592
79623
|
registerArc();
|
|
@@ -80788,7 +80819,7 @@
|
|
|
80788
80819
|
Factory.registerAnimation('circularProgress', (params, preset) => ({
|
|
80789
80820
|
appear: progressLikePresetAnimation(params, preset),
|
|
80790
80821
|
enter: { type: 'growAngleIn' },
|
|
80791
|
-
disappear: {
|
|
80822
|
+
disappear: { duration: DEFAULT_ANIMATION_CONFIG.disappear.duration }
|
|
80792
80823
|
}));
|
|
80793
80824
|
};
|
|
80794
80825
|
|
|
@@ -80993,12 +81024,6 @@
|
|
|
80993
81024
|
options: LinearProgressGrowOption(params)
|
|
80994
81025
|
};
|
|
80995
81026
|
};
|
|
80996
|
-
const linearProgressDisappear = (params) => {
|
|
80997
|
-
return {
|
|
80998
|
-
type: params.direction === "horizontal" ? 'growWidthOut' : 'growHeightOut',
|
|
80999
|
-
options: LinearProgressGrowOption(params)
|
|
81000
|
-
};
|
|
81001
|
-
};
|
|
81002
81027
|
const Appear_FadeIn$1 = {
|
|
81003
81028
|
type: 'fadeIn'
|
|
81004
81029
|
};
|
|
@@ -81018,7 +81043,7 @@
|
|
|
81018
81043
|
return {
|
|
81019
81044
|
appear: linearProgressPresetAnimation(params, preset),
|
|
81020
81045
|
enter: linearProgressPresetAnimation(params),
|
|
81021
|
-
disappear:
|
|
81046
|
+
disappear: { duration: DEFAULT_ANIMATION_CONFIG.disappear.duration }
|
|
81022
81047
|
};
|
|
81023
81048
|
});
|
|
81024
81049
|
};
|
|
@@ -81662,7 +81687,7 @@
|
|
|
81662
81687
|
appear: wordcloudPresetAnimation(params, preset),
|
|
81663
81688
|
enter: { type: 'fadeIn' },
|
|
81664
81689
|
exit: { type: 'fadeOut' },
|
|
81665
|
-
disappear: {
|
|
81690
|
+
disappear: { duration: DEFAULT_ANIMATION_CONFIG.disappear.duration }
|
|
81666
81691
|
}));
|
|
81667
81692
|
};
|
|
81668
81693
|
|
|
@@ -87932,7 +87957,7 @@
|
|
|
87932
87957
|
appear: sunburstPresetAnimation(params, preset),
|
|
87933
87958
|
enter: sunburstEnter(params),
|
|
87934
87959
|
exit: sunburstExit(params),
|
|
87935
|
-
disappear:
|
|
87960
|
+
disappear: { duration: DEFAULT_ANIMATION_CONFIG.disappear.duration }
|
|
87936
87961
|
}));
|
|
87937
87962
|
};
|
|
87938
87963
|
|
|
@@ -88435,7 +88460,7 @@
|
|
|
88435
88460
|
appear: circlePackingPresetAnimation(preset),
|
|
88436
88461
|
enter: { type: 'growRadiusIn' },
|
|
88437
88462
|
exit: { type: 'growRadiusOut' },
|
|
88438
|
-
disappear: {
|
|
88463
|
+
disappear: { duration: DEFAULT_ANIMATION_CONFIG.disappear.duration }
|
|
88439
88464
|
}));
|
|
88440
88465
|
};
|
|
88441
88466
|
|
|
@@ -88905,7 +88930,7 @@
|
|
|
88905
88930
|
appear: sankeyLinkPresetAnimation(preset),
|
|
88906
88931
|
enter: { type: 'linkPathGrowIn' },
|
|
88907
88932
|
exit: { type: 'linkPathGrowOut' },
|
|
88908
|
-
disappear: {
|
|
88933
|
+
disappear: { duration: DEFAULT_ANIMATION_CONFIG.disappear.duration }
|
|
88909
88934
|
}));
|
|
88910
88935
|
AnimateExecutor.registerBuiltInAnimate('linkPathGrowOut', LinkPathGrowOut);
|
|
88911
88936
|
AnimateExecutor.registerBuiltInAnimate('linkPathGrowIn', LinkPathGrowIn);
|
|
@@ -90099,7 +90124,7 @@
|
|
|
90099
90124
|
appear: treemapPresetAnimation(preset),
|
|
90100
90125
|
enter: { type: 'growCenterIn' },
|
|
90101
90126
|
exit: { type: 'growCenterOut' },
|
|
90102
|
-
disappear: {
|
|
90127
|
+
disappear: { duration: DEFAULT_ANIMATION_CONFIG.disappear.duration }
|
|
90103
90128
|
};
|
|
90104
90129
|
});
|
|
90105
90130
|
};
|
|
@@ -90589,7 +90614,7 @@
|
|
|
90589
90614
|
return {
|
|
90590
90615
|
appear: animation,
|
|
90591
90616
|
enter: animation,
|
|
90592
|
-
disappear: {
|
|
90617
|
+
disappear: { duration: DEFAULT_ANIMATION_CONFIG.disappear.duration }
|
|
90593
90618
|
};
|
|
90594
90619
|
});
|
|
90595
90620
|
};
|
|
@@ -91065,7 +91090,7 @@
|
|
|
91065
91090
|
const heatmap = {
|
|
91066
91091
|
cell: {
|
|
91067
91092
|
style: {
|
|
91068
|
-
shape: '
|
|
91093
|
+
shape: 'rect',
|
|
91069
91094
|
fillOpacity: 1
|
|
91070
91095
|
}
|
|
91071
91096
|
},
|
|
@@ -91157,7 +91182,7 @@
|
|
|
91157
91182
|
var _a;
|
|
91158
91183
|
return {
|
|
91159
91184
|
scale: (_a = this._option.globalScale.getScale('color')) !== null && _a !== void 0 ? _a : this._getDefaultColorScale(),
|
|
91160
|
-
field: this.getFieldValue[0]
|
|
91185
|
+
field: this.getFieldValue()[0]
|
|
91161
91186
|
};
|
|
91162
91187
|
}
|
|
91163
91188
|
getInteractionTriggers() {
|
|
@@ -91178,7 +91203,7 @@
|
|
|
91178
91203
|
this._cellMark && this._tooltipHelper.activeTriggerSet.mark.add(this._cellMark);
|
|
91179
91204
|
}
|
|
91180
91205
|
getDefaultShapeType() {
|
|
91181
|
-
return '
|
|
91206
|
+
return 'rect';
|
|
91182
91207
|
}
|
|
91183
91208
|
getDimensionField() {
|
|
91184
91209
|
return [].concat(this.fieldX, this.fieldY);
|
|
@@ -92304,7 +92329,7 @@
|
|
|
92304
92329
|
appear: vennCirclePresetAnimation(preset),
|
|
92305
92330
|
enter: { type: 'growRadiusIn' },
|
|
92306
92331
|
exit: { type: 'growRadiusOut' },
|
|
92307
|
-
disappear: {
|
|
92332
|
+
disappear: { duration: DEFAULT_ANIMATION_CONFIG.disappear.duration }
|
|
92308
92333
|
};
|
|
92309
92334
|
});
|
|
92310
92335
|
Factory.registerAnimation('vennOverlap', (params, preset) => {
|
|
@@ -92313,7 +92338,7 @@
|
|
|
92313
92338
|
update: { custom: VennOverlapAnimation },
|
|
92314
92339
|
enter: { type: 'fadeIn' },
|
|
92315
92340
|
exit: { type: 'fadeOut' },
|
|
92316
|
-
disappear: {
|
|
92341
|
+
disappear: { duration: DEFAULT_ANIMATION_CONFIG.disappear.duration }
|
|
92317
92342
|
};
|
|
92318
92343
|
});
|
|
92319
92344
|
};
|