@visactor/vchart 2.1.0-alpha.13 → 2.1.0-alpha.14
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 +3 -3
- package/build/index.es.js +44999 -51405
- package/build/index.js +44999 -51405
- package/build/index.min.js +3 -3
- package/build/tsconfig.tsbuildinfo +1 -1
- package/cjs/animation/callback-disappear.d.ts +1 -1
- package/cjs/animation/callback-disappear.js +2 -2
- package/cjs/animation/callback-disappear.js.map +1 -1
- package/cjs/animation/config.js +34 -34
- package/cjs/animation/config.js.map +1 -1
- package/cjs/chart/base/base-chart.d.ts +2 -0
- package/cjs/chart/base/base-chart.js +14 -5
- package/cjs/chart/base/base-chart.js.map +1 -1
- package/cjs/compile/compiler.js +1 -2
- package/cjs/compile/compiler.js.map +1 -1
- package/cjs/compile/interface/compiler.d.ts +0 -2
- package/cjs/compile/interface/compiler.js.map +1 -1
- package/cjs/compile/morph.js +4 -4
- package/cjs/compile/morph.js.map +1 -1
- package/cjs/compile/stage-app.d.ts +0 -6
- package/cjs/compile/stage-app.js +15 -100
- package/cjs/compile/stage-app.js.map +1 -1
- package/cjs/component/axis/base-axis.d.ts +1 -1
- package/cjs/component/axis/base-axis.js +2 -2
- package/cjs/component/axis/base-axis.js.map +1 -1
- package/cjs/component/axis/cartesian/band-axis.js +4 -4
- package/cjs/component/axis/cartesian/band-axis.js.map +1 -1
- package/cjs/component/axis/cartesian/linear-axis.d.ts +1 -1
- package/cjs/component/axis/cartesian/linear-axis.js +4 -4
- package/cjs/component/axis/cartesian/linear-axis.js.map +1 -1
- package/cjs/component/crosshair/base.d.ts +1 -1
- package/cjs/component/crosshair/base.js +3 -3
- package/cjs/component/crosshair/base.js.map +1 -1
- package/cjs/component/crosshair/cartesian.js +3 -3
- package/cjs/component/crosshair/cartesian.js.map +1 -1
- package/cjs/component/index.js +1 -2
- package/cjs/component/label/label.js +2 -2
- package/cjs/component/label/label.js.map +1 -1
- package/cjs/component/legend/discrete/legend.d.ts +1 -1
- package/cjs/component/legend/discrete/legend.js +7 -7
- package/cjs/component/legend/discrete/legend.js.map +1 -1
- package/cjs/constant/animate.js +2 -1
- package/cjs/constant/scatter.js +1 -2
- package/cjs/constant/sunburst.js +2 -1
- package/cjs/core/expression-function.js +1 -1
- package/cjs/core/factory.js +1 -1
- package/cjs/core/index.d.ts +2 -1
- package/cjs/core/index.js +9 -5
- package/cjs/core/index.js.map +1 -1
- package/cjs/core/vchart.js +2 -2
- package/cjs/core/vchart.js.map +1 -1
- package/cjs/data/data-view-utils.js +1 -1
- package/cjs/data/initialize.js +1 -1
- package/cjs/data/register.js +1 -1
- package/cjs/env/env.js +10 -10
- package/cjs/env/env.js.map +1 -1
- package/cjs/mark/arc.js +4 -4
- package/cjs/mark/arc.js.map +1 -1
- package/cjs/mark/area.js +4 -5
- package/cjs/mark/area.js.map +1 -1
- package/cjs/mark/base/base-mark.js +5 -5
- package/cjs/mark/base/base-mark.js.map +1 -1
- package/cjs/mark/group.js +5 -5
- package/cjs/mark/group.js.map +1 -1
- package/cjs/mark/line.js +4 -5
- package/cjs/mark/line.js.map +1 -1
- package/cjs/mark/rect.js +3 -3
- package/cjs/mark/rect.js.map +1 -1
- package/cjs/mark/symbol.js +3 -3
- package/cjs/mark/symbol.js.map +1 -1
- package/cjs/mark/text.js +4 -4
- package/cjs/mark/text.js.map +1 -1
- package/cjs/plugin/components/axis-sync/tick-align-transform.js +2 -2
- package/cjs/plugin/components/axis-sync/tick-align-transform.js.map +1 -1
- package/cjs/plugin/components/tooltip-handler/canvas-tooltip-handler.d.ts +2 -2
- package/cjs/plugin/components/tooltip-handler/canvas-tooltip-handler.js +2 -2
- package/cjs/plugin/components/tooltip-handler/canvas-tooltip-handler.js.map +1 -1
- package/cjs/plugin/other.js +5 -5
- package/cjs/plugin/other.js.map +1 -1
- package/cjs/series/base/base-series.d.ts +1 -0
- package/cjs/series/base/base-series.js +16 -6
- package/cjs/series/base/base-series.js.map +1 -1
- package/cjs/series/line/line.js +3 -3
- package/cjs/series/line/line.js.map +1 -1
- package/cjs/series/word-cloud/animation.js +3 -0
- package/cjs/series/word-cloud/animation.js.map +1 -1
- package/cjs/theme/builtin/common/series/word-cloud.js +2 -6
- package/cjs/theme/builtin/common/series/word-cloud.js.map +1 -1
- package/cjs/util/math.d.ts +1 -1
- package/cjs/util/math.js +2 -2
- package/cjs/util/math.js.map +1 -1
- package/cjs/util/text.js +2 -2
- package/cjs/util/text.js.map +1 -1
- package/esm/animation/callback-disappear.d.ts +1 -1
- package/esm/animation/callback-disappear.js +1 -1
- package/esm/animation/callback-disappear.js.map +1 -1
- package/esm/animation/config.js +33 -1
- package/esm/animation/config.js.map +1 -1
- package/esm/chart/base/base-chart.d.ts +2 -0
- package/esm/chart/base/base-chart.js +14 -5
- package/esm/chart/base/base-chart.js.map +1 -1
- package/esm/compile/compiler.js +1 -2
- package/esm/compile/compiler.js.map +1 -1
- package/esm/compile/interface/compiler.d.ts +0 -2
- package/esm/compile/interface/compiler.js.map +1 -1
- package/esm/compile/morph.js +1 -1
- package/esm/compile/morph.js.map +1 -1
- package/esm/compile/stage-app.d.ts +0 -6
- package/esm/compile/stage-app.js +14 -76
- package/esm/compile/stage-app.js.map +1 -1
- package/esm/component/axis/base-axis.d.ts +1 -1
- package/esm/component/axis/base-axis.js +1 -1
- package/esm/component/axis/base-axis.js.map +1 -1
- package/esm/component/axis/cartesian/band-axis.js +4 -2
- package/esm/component/axis/cartesian/band-axis.js.map +1 -1
- package/esm/component/axis/cartesian/linear-axis.d.ts +1 -1
- package/esm/component/axis/cartesian/linear-axis.js +5 -1
- package/esm/component/axis/cartesian/linear-axis.js.map +1 -1
- package/esm/component/crosshair/base.d.ts +1 -1
- package/esm/component/crosshair/base.js +1 -1
- package/esm/component/crosshair/base.js.map +1 -1
- package/esm/component/crosshair/cartesian.js +3 -1
- package/esm/component/crosshair/cartesian.js.map +1 -1
- package/esm/component/index.js +1 -2
- package/esm/component/label/label.js +1 -1
- package/esm/component/label/label.js.map +1 -1
- package/esm/component/legend/discrete/legend.d.ts +1 -1
- package/esm/component/legend/discrete/legend.js +2 -2
- package/esm/component/legend/discrete/legend.js.map +1 -1
- package/esm/constant/animate.js +2 -1
- package/esm/constant/scatter.js +1 -2
- package/esm/constant/sunburst.js +2 -1
- package/esm/core/expression-function.js +1 -1
- package/esm/core/factory.js +1 -1
- package/esm/core/index.d.ts +2 -1
- package/esm/core/index.js +4 -2
- package/esm/core/index.js.map +1 -1
- package/esm/core/vchart.js +1 -1
- package/esm/core/vchart.js.map +1 -1
- package/esm/data/data-view-utils.js +1 -1
- package/esm/data/initialize.js +1 -1
- package/esm/data/register.js +1 -1
- package/esm/env/env.js +1 -1
- package/esm/env/env.js.map +1 -1
- package/esm/mark/arc.js +4 -2
- package/esm/mark/arc.js.map +1 -1
- package/esm/mark/area.js +6 -2
- package/esm/mark/area.js.map +1 -1
- package/esm/mark/base/base-mark.js +5 -5
- package/esm/mark/base/base-mark.js.map +1 -1
- package/esm/mark/group.js +5 -4
- package/esm/mark/group.js.map +1 -1
- package/esm/mark/line.js +6 -2
- package/esm/mark/line.js.map +1 -1
- package/esm/mark/rect.js +4 -2
- package/esm/mark/rect.js.map +1 -1
- package/esm/mark/symbol.js +4 -2
- package/esm/mark/symbol.js.map +1 -1
- package/esm/mark/text.js +5 -1
- package/esm/mark/text.js.map +1 -1
- package/esm/plugin/components/axis-sync/tick-align-transform.js +1 -1
- package/esm/plugin/components/axis-sync/tick-align-transform.js.map +1 -1
- package/esm/plugin/components/tooltip-handler/canvas-tooltip-handler.d.ts +2 -2
- package/esm/plugin/components/tooltip-handler/canvas-tooltip-handler.js +1 -1
- package/esm/plugin/components/tooltip-handler/canvas-tooltip-handler.js.map +1 -1
- package/esm/plugin/other.js +2 -2
- package/esm/plugin/other.js.map +1 -1
- package/esm/series/base/base-series.d.ts +1 -0
- package/esm/series/base/base-series.js +16 -5
- package/esm/series/base/base-series.js.map +1 -1
- package/esm/series/line/line.js +3 -1
- package/esm/series/line/line.js.map +1 -1
- package/esm/series/word-cloud/animation.js +3 -0
- package/esm/series/word-cloud/animation.js.map +1 -1
- package/esm/theme/builtin/common/series/word-cloud.js +2 -6
- package/esm/theme/builtin/common/series/word-cloud.js.map +1 -1
- package/esm/util/math.d.ts +1 -1
- package/esm/util/math.js +1 -1
- package/esm/util/math.js.map +1 -1
- package/esm/util/text.js +1 -1
- package/esm/util/text.js.map +1 -1
- package/package.json +9 -9
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AStageAnimate } from '@visactor/vrender-animate';
|
|
1
|
+
import { AStageAnimate } from '@visactor/vrender-animate/custom/custom-animate';
|
|
2
2
|
import { EasingType } from '@visactor/vrender-core';
|
|
3
3
|
export declare class CallbackDisappearAnimate extends AStageAnimate<any> {
|
|
4
4
|
protected currentAnimationRatio: number;
|
|
@@ -4,9 +4,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: !0
|
|
5
5
|
}), exports.CallbackDisappearAnimate = void 0;
|
|
6
6
|
|
|
7
|
-
const
|
|
7
|
+
const custom_animate_1 = require("@visactor/vrender-animate/custom/custom-animate");
|
|
8
8
|
|
|
9
|
-
class CallbackDisappearAnimate extends
|
|
9
|
+
class CallbackDisappearAnimate extends custom_animate_1.AStageAnimate {
|
|
10
10
|
constructor(from, to, duration, easing, params) {
|
|
11
11
|
super(from, to, duration, easing, params), this.currentAnimationRatio = 0, this.animationTime = 0;
|
|
12
12
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/animation/callback-disappear.ts"],"names":[],"mappings":";;;AAAA
|
|
1
|
+
{"version":3,"sources":["../src/animation/callback-disappear.ts"],"names":[],"mappings":";;;AAAA,oFAAgF;AAMhF,MAAa,wBAAyB,SAAQ,8BAAkB;IAI9D,YAAY,IAAU,EAAE,EAAQ,EAAE,QAAgB,EAAE,MAAkB,EAAE,MAAW;QACjF,KAAK,CAAC,IAAI,EAAE,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;QAJlC,0BAAqB,GAAG,CAAC,CAAC;QAC1B,kBAAa,GAAG,CAAC,CAAC;IAI5B,CAAC;IAED,QAAQ,CAAC,GAAY,EAAE,KAAa,EAAE,GAAQ;QAC5C,KAAK,CAAC,QAAQ,CAAC,GAAG,EAAE,KAAK,EAAE,GAAG,CAAC,CAAC;QAChC,IAAI,CAAC,qBAAqB,GAAG,KAAK,CAAC;QACnC,IAAI,CAAC,aAAa,GAAG,KAAK,GAAG,IAAI,CAAC,EAAE,GAAG,CAAC,CAAC;IAC3C,CAAC;IAKS,gBAAgB;QACxB,IAAI,IAAI,CAAC,qBAAqB,GAAG,CAAC,EAAE;YAClC,OAAO,IAAI,CAAC,aAAa,CAAC;SAC3B;QACD,OAAO,IAAI,CAAC,GAAG,EAAE,GAAG,MAAM,CAAC;IAC7B,CAAC;IAES,gBAAgB,CAAC,KAAU,EAAE,MAAyB;;QAC9D,OAAO,MAAA,MAAA,IAAI,CAAC,MAAM,0CAAE,QAAQ,mDAAG,KAAK,EAAE,MAAM,EAAE,IAAI,CAAC,qBAAqB,EAAE,IAAI,CAAC,aAAa,CAAC,CAAC;IAChG,CAAC;CACF;AA3BD,4DA2BC","file":"callback-disappear.js","sourcesContent":["import { AStageAnimate } from '@visactor/vrender-animate/custom/custom-animate';\nimport { EasingType } from '@visactor/vrender-core';\n\n/**\n * 特效动画基类,提取公共的WebGL和Canvas 2D操作\n */\nexport class CallbackDisappearAnimate extends AStageAnimate<any> {\n protected currentAnimationRatio = 0;\n protected animationTime = 0;\n\n constructor(from: null, to: null, duration: number, easing: EasingType, params: any) {\n super(from, to, duration, easing, params);\n }\n\n onUpdate(end: boolean, ratio: number, out: any): void {\n super.onUpdate(end, ratio, out);\n this.currentAnimationRatio = ratio;\n this.animationTime = ratio * Math.PI * 2;\n }\n\n /**\n * 获取基于动画进度的时间\n */\n protected getAnimationTime(): number {\n if (this.currentAnimationRatio > 0) {\n return this.animationTime;\n }\n return Date.now() / 1000.0;\n }\n\n protected afterStageRender(stage: any, canvas: HTMLCanvasElement): void {\n return this.params?.callBack?.(stage, canvas, this.currentAnimationRatio, this.animationTime);\n }\n}\n"]}
|
package/cjs/animation/config.js
CHANGED
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: !0
|
|
5
5
|
}), exports.registerStageAnimation = exports.registerPolygonAnimation = exports.registerLineOrAreaAnimation = exports.registerArcAnimation = exports.registerRectAnimation = exports.registerBuiltInAnimation = exports.registerAreaAnimation = exports.registerLineAnimation = exports.registerCartesianGroupClipAnimation = exports.registerFadeInOutAnimation = exports.registerScaleInOutAnimation = exports.FadeInOutAnimation = exports.ScaleInOutAnimation = exports.DEFAULT_ANIMATION_CONFIG = void 0;
|
|
6
6
|
|
|
7
|
-
const
|
|
7
|
+
const clip_graphic_1 = require("@visactor/vrender-animate/custom/clip-graphic"), clip_1 = require("@visactor/vrender-animate/custom/clip"), animate_executor_1 = require("@visactor/vrender-animate/executor/animate-executor"), fade_1 = require("@visactor/vrender-animate/custom/fade"), fromTo_1 = require("@visactor/vrender-animate/custom/fromTo"), growAngle_1 = require("@visactor/vrender-animate/custom/growAngle"), growCenter_1 = require("@visactor/vrender-animate/custom/growCenter"), growHeight_1 = require("@visactor/vrender-animate/custom/growHeight"), growPoints_1 = require("@visactor/vrender-animate/custom/growPoints"), growRadius_1 = require("@visactor/vrender-animate/custom/growRadius"), growWidth_1 = require("@visactor/vrender-animate/custom/growWidth"), move_1 = require("@visactor/vrender-animate/custom/move"), rotate_1 = require("@visactor/vrender-animate/custom/rotate"), scale_1 = require("@visactor/vrender-animate/custom/scale"), state_1 = require("@visactor/vrender-animate/custom/state"), tag_points_1 = require("@visactor/vrender-animate/custom/tag-points"), update_1 = require("@visactor/vrender-animate/custom/update"), animation_1 = require("../series/line/animation"), factory_1 = require("../core/factory"), callback_disappear_1 = require("./callback-disappear"), animate_1 = require("../constant/animate");
|
|
8
8
|
|
|
9
9
|
exports.DEFAULT_ANIMATION_CONFIG = {
|
|
10
10
|
appear: {
|
|
@@ -69,7 +69,7 @@ exports.registerFadeInOutAnimation = registerFadeInOutAnimation;
|
|
|
69
69
|
const registerCartesianGroupClipAnimation = () => {
|
|
70
70
|
factory_1.Factory.registerAnimation("cartesianGroupClip", (params => ({
|
|
71
71
|
appear: {
|
|
72
|
-
custom:
|
|
72
|
+
custom: clip_graphic_1.ClipDirectionAnimate,
|
|
73
73
|
customParameters: (datum, g) => ({
|
|
74
74
|
animationType: "in",
|
|
75
75
|
group: g,
|
|
@@ -99,7 +99,7 @@ const lineOrAreaAnimation = (params, preset) => ({
|
|
|
99
99
|
}
|
|
100
100
|
}, {
|
|
101
101
|
channel: [ "points", "segments" ],
|
|
102
|
-
custom:
|
|
102
|
+
custom: tag_points_1.TagPointsUpdate,
|
|
103
103
|
duration: exports.DEFAULT_ANIMATION_CONFIG.update.duration,
|
|
104
104
|
easing: exports.DEFAULT_ANIMATION_CONFIG.update.easing,
|
|
105
105
|
customParameters: {
|
|
@@ -119,62 +119,62 @@ const registerAreaAnimation = () => {
|
|
|
119
119
|
exports.registerAreaAnimation = registerAreaAnimation;
|
|
120
120
|
|
|
121
121
|
const registerBuiltInAnimation = () => {
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
122
|
+
animate_executor_1.AnimateExecutor.registerBuiltInAnimate("scaleIn", scale_1.ScaleIn),
|
|
123
|
+
animate_executor_1.AnimateExecutor.registerBuiltInAnimate("scaleOut", scale_1.ScaleOut),
|
|
124
|
+
animate_executor_1.AnimateExecutor.registerBuiltInAnimate("fadeIn", fade_1.FadeIn),
|
|
125
|
+
animate_executor_1.AnimateExecutor.registerBuiltInAnimate("fadeOut", fade_1.FadeOut),
|
|
126
|
+
animate_executor_1.AnimateExecutor.registerBuiltInAnimate("moveIn", move_1.MoveIn),
|
|
127
|
+
animate_executor_1.AnimateExecutor.registerBuiltInAnimate("moveOut", move_1.MoveOut),
|
|
128
|
+
animate_executor_1.AnimateExecutor.registerBuiltInAnimate("rotateIn", rotate_1.RotateIn),
|
|
129
|
+
animate_executor_1.AnimateExecutor.registerBuiltInAnimate("rotateOut", rotate_1.RotateOut),
|
|
130
|
+
animate_executor_1.AnimateExecutor.registerBuiltInAnimate("update", update_1.Update),
|
|
131
|
+
animate_executor_1.AnimateExecutor.registerBuiltInAnimate("state", state_1.State),
|
|
132
|
+
animate_executor_1.AnimateExecutor.registerBuiltInAnimate("fromTo", fromTo_1.FromTo);
|
|
133
133
|
};
|
|
134
134
|
|
|
135
135
|
exports.registerBuiltInAnimation = registerBuiltInAnimation;
|
|
136
136
|
|
|
137
137
|
const registerRectAnimation = () => {
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
138
|
+
animate_executor_1.AnimateExecutor.registerBuiltInAnimate("growHeightIn", growHeight_1.GrowHeightIn),
|
|
139
|
+
animate_executor_1.AnimateExecutor.registerBuiltInAnimate("growHeightOut", growHeight_1.GrowHeightOut),
|
|
140
|
+
animate_executor_1.AnimateExecutor.registerBuiltInAnimate("growWidthIn", growWidth_1.GrowWidthIn),
|
|
141
|
+
animate_executor_1.AnimateExecutor.registerBuiltInAnimate("growWidthOut", growWidth_1.GrowWidthOut),
|
|
142
|
+
animate_executor_1.AnimateExecutor.registerBuiltInAnimate("growCenterIn", growCenter_1.GrowCenterIn),
|
|
143
|
+
animate_executor_1.AnimateExecutor.registerBuiltInAnimate("growCenterOut", growCenter_1.GrowCenterOut);
|
|
144
144
|
};
|
|
145
145
|
|
|
146
146
|
exports.registerRectAnimation = registerRectAnimation;
|
|
147
147
|
|
|
148
148
|
const registerArcAnimation = () => {
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
149
|
+
animate_executor_1.AnimateExecutor.registerBuiltInAnimate("growRadiusIn", growRadius_1.GrowRadiusIn),
|
|
150
|
+
animate_executor_1.AnimateExecutor.registerBuiltInAnimate("growRadiusOut", growRadius_1.GrowRadiusOut),
|
|
151
|
+
animate_executor_1.AnimateExecutor.registerBuiltInAnimate("growAngleIn", growAngle_1.GrowAngleIn),
|
|
152
|
+
animate_executor_1.AnimateExecutor.registerBuiltInAnimate("growAngleOut", growAngle_1.GrowAngleOut);
|
|
153
153
|
};
|
|
154
154
|
|
|
155
155
|
exports.registerArcAnimation = registerArcAnimation;
|
|
156
156
|
|
|
157
157
|
const registerLineOrAreaAnimation = () => {
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
158
|
+
animate_executor_1.AnimateExecutor.registerBuiltInAnimate("growPointsIn", growPoints_1.GrowPointsIn),
|
|
159
|
+
animate_executor_1.AnimateExecutor.registerBuiltInAnimate("growPointsOut", growPoints_1.GrowPointsOut),
|
|
160
|
+
animate_executor_1.AnimateExecutor.registerBuiltInAnimate("growPointsXIn", growPoints_1.GrowPointsXIn),
|
|
161
|
+
animate_executor_1.AnimateExecutor.registerBuiltInAnimate("growPointsXOut", growPoints_1.GrowPointsXOut),
|
|
162
|
+
animate_executor_1.AnimateExecutor.registerBuiltInAnimate("growPointsYIn", growPoints_1.GrowPointsYIn),
|
|
163
|
+
animate_executor_1.AnimateExecutor.registerBuiltInAnimate("growPointsYOut", growPoints_1.GrowPointsYOut),
|
|
164
|
+
animate_executor_1.AnimateExecutor.registerBuiltInAnimate("clipIn", clip_1.ClipIn),
|
|
165
|
+
animate_executor_1.AnimateExecutor.registerBuiltInAnimate("clipOut", clip_1.ClipOut);
|
|
166
166
|
};
|
|
167
167
|
|
|
168
168
|
exports.registerLineOrAreaAnimation = registerLineOrAreaAnimation;
|
|
169
169
|
|
|
170
170
|
const registerPolygonAnimation = () => {
|
|
171
|
-
|
|
171
|
+
animate_executor_1.AnimateExecutor.registerBuiltInAnimate("growPointsOut", growPoints_1.GrowPointsOut);
|
|
172
172
|
};
|
|
173
173
|
|
|
174
174
|
exports.registerPolygonAnimation = registerPolygonAnimation;
|
|
175
175
|
|
|
176
176
|
const registerStageAnimation = () => {
|
|
177
|
-
|
|
177
|
+
animate_executor_1.AnimateExecutor.registerBuiltInAnimate(animate_1.BuiltIn_DISAPPEAR_ANIMATE_NAME, callback_disappear_1.CallbackDisappearAnimate);
|
|
178
178
|
};
|
|
179
179
|
|
|
180
180
|
exports.registerStageAnimation = registerStageAnimation;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/animation/config.ts"],"names":[],"mappings":";;;AAEA,+DAiCmC;AAGnC,wDAA+D;AAE/D,6CAA0C;AAE1C,6DAAgE;AAChE,iDAAqE;AAExD,QAAA,wBAAwB,GAAG;IACtC,MAAM,EAAE;QACN,QAAQ,EAAE,IAAI;QACd,MAAM,EAAE,UAAU;KACnB;IACD,MAAM,EAAE;QACN,IAAI,EAAE,QAAQ;QACd,QAAQ,EAAE,GAAG;QACb,MAAM,EAAE,QAAQ;KACjB;IACD,KAAK,EAAE;QACL,QAAQ,EAAE,GAAG;QACb,MAAM,EAAE,QAAQ;KACjB;IACD,IAAI,EAAE;QACJ,QAAQ,EAAE,GAAG;QACb,MAAM,EAAE,QAAQ;KACjB;IACD,SAAS,EAAE;QACT,QAAQ,EAAE,GAAG;QACb,MAAM,EAAE,SAAS;KAClB;IACD,KAAK,EAAE;QACL,QAAQ,EAAE,GAAG;QACb,MAAM,EAAE,QAAQ;KACjB;CACF,CAAC;AAEW,QAAA,mBAAmB,GAAG;IACjC,MAAM,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;IAC3B,KAAK,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;IAC1B,IAAI,EAAE,EAAE,IAAI,EAAE,UAAU,EAAE;CAC3B,CAAC;AAEW,QAAA,kBAAkB,GAAG;I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C,CAAC;AACvE,CAAC,CAAC;AALW,QAAA,oBAAoB,wBAK/B;AAEK,MAAM,2BAA2B,GAAG,GAAG,EAAE;IAC9C,iCAAe,CAAC,sBAAsB,CAAC,cAAc,EAAE,8BAAY,CAAC,CAAC;IACrE,iCAAe,CAAC,sBAAsB,CAAC,eAAe,EAAE,+BAAa,CAAC,CAAC;IACvE,iCAAe,CAAC,sBAAsB,CAAC,eAAe,EAAE,+BAAa,CAAC,CAAC;IACvE,iCAAe,CAAC,sBAAsB,CAAC,gBAAgB,EAAE,gCAAc,CAAC,CAAC;IACzE,iCAAe,CAAC,sBAAsB,CAAC,eAAe,EAAE,+BAAa,CAAC,CAAC;IACvE,iCAAe,CAAC,sBAAsB,CAAC,gBAAgB,EAAE,gCAAc,CAAC,CAAC;IACzE,iCAAe,CAAC,sBAAsB,CAAC,QAAQ,EAAE,wBAAM,CAAC,CAAC;IACzD,iCAAe,CAAC,sBAAsB,CAAC,SAAS,EAAE,yBAAO,CAAC,CAAC;AAC7D,CAAC,CAAC;AATW,QAAA,2BAA2B,+BAStC;AAEK,MAAM,wBAAwB,GAAG,GAAG,EAAE;IAC3C,iCAAe,CAAC,sBAAsB,CAAC,eAAe,EAAE,+BAAa,CAAC,CAAC;AACzE,CAAC,CAAC;AAFW,QAAA,wBAAwB,4BAEnC;AAEK,MAAM,sBAAsB,GAAG,GAAG,EAAE;IACzC,iCAAe,CAAC,sBAAsB,CAAC,wCAA8B,EAAE,6CAAwB,CAAC,CAAC;AACnG,CAAC,CAAC;AAFW,QAAA,sBAAsB,0BAEjC","file":"config.js","sourcesContent":["/* eslint-disable no-duplicate-imports */\nimport type { IGraphic } from '@visactor/vrender-core';\nimport {\n TagPointsUpdate,\n ClipDirectionAnimate,\n AnimateExecutor,\n ScaleIn,\n ScaleOut,\n FadeIn,\n FadeOut,\n MoveIn,\n MoveOut,\n RotateIn,\n RotateOut,\n Update,\n State,\n GrowHeightIn,\n GrowHeightOut,\n GrowWidthIn,\n GrowWidthOut,\n GrowCenterIn,\n GrowCenterOut,\n GrowRadiusIn,\n GrowRadiusOut,\n GrowAngleIn,\n GrowAngleOut,\n GrowPointsIn,\n GrowPointsOut,\n GrowPointsXIn,\n GrowPointsXOut,\n GrowPointsYIn,\n GrowPointsYOut,\n ClipIn,\n ClipOut,\n FromTo\n} from '@visactor/vrender-animate';\n\nimport type { ILineAnimationParams, LineAppearPreset } from '../series/line/interface';\nimport { linePresetAnimation } from '../series/line/animation';\nimport type { MarkAnimationSpec, ICartesianGroupAnimationParams } from './interface';\nimport { Factory } from '../core/factory';\nimport { Direction } from '../typings/space';\nimport { CallbackDisappearAnimate } from './callback-disappear';\nimport { BuiltIn_DISAPPEAR_ANIMATE_NAME } from '../constant/animate';\n\nexport const DEFAULT_ANIMATION_CONFIG = {\n appear: {\n duration: 1000,\n easing: 'cubicOut'\n },\n update: {\n type: 'update',\n duration: 300,\n easing: 'linear'\n },\n enter: {\n duration: 300,\n easing: 'linear'\n },\n exit: {\n duration: 300,\n easing: 'linear'\n },\n disappear: {\n duration: 500,\n easing: 'cubicIn'\n },\n state: {\n duration: 300,\n easing: 'linear'\n }\n};\n\nexport const ScaleInOutAnimation = {\n appear: { type: 'scaleIn' },\n enter: { type: 'scaleIn' },\n exit: { type: 'scaleOut' }\n};\n\nexport const FadeInOutAnimation = {\n appear: { type: 'fadeIn' },\n enter: { type: 'fadeIn' },\n exit: { type: 'fadeOut' }\n};\n\nexport const registerScaleInOutAnimation = () => {\n Factory.registerAnimation('scaleInOut', () => ScaleInOutAnimation);\n};\n\nexport const registerFadeInOutAnimation = () => {\n Factory.registerAnimation('fadeInOut', () => FadeInOutAnimation);\n};\n\nexport const registerCartesianGroupClipAnimation = () => {\n Factory.registerAnimation('cartesianGroupClip', (params?: ICartesianGroupAnimationParams) => {\n return {\n appear: {\n custom: ClipDirectionAnimate,\n customParameters: (datum: any, g: IGraphic) => {\n return {\n animationType: 'in',\n group: g,\n direction: params.direction(),\n width: params.width(),\n height: params.height(),\n orient: params.orient()\n };\n }\n }\n };\n });\n};\n\nconst lineOrAreaAnimation = (params: ILineAnimationParams, preset: LineAppearPreset) => {\n return {\n appear: linePresetAnimation(params, preset),\n enter: { type: 'fadeIn' },\n exit: { type: 'fadeOut' },\n update: [\n {\n type: 'update',\n options: { excludeChannels: ['points', 'defined', 'segments'] }\n },\n {\n channel: ['points', 'segments'],\n custom: TagPointsUpdate,\n duration: DEFAULT_ANIMATION_CONFIG.update.duration,\n easing: DEFAULT_ANIMATION_CONFIG.update.easing,\n customParameters: {\n clipRangeByDimension: params.direction === Direction.horizontal ? 'y' : 'x'\n }\n }\n ]\n } as MarkAnimationSpec;\n};\n\nexport const registerLineAnimation = () => {\n Factory.registerAnimation('line', lineOrAreaAnimation);\n};\n\nexport const registerAreaAnimation = () => {\n Factory.registerAnimation('area', lineOrAreaAnimation);\n};\n\nexport const registerBuiltInAnimation = () => {\n AnimateExecutor.registerBuiltInAnimate('scaleIn', ScaleIn);\n AnimateExecutor.registerBuiltInAnimate('scaleOut', ScaleOut);\n AnimateExecutor.registerBuiltInAnimate('fadeIn', FadeIn);\n AnimateExecutor.registerBuiltInAnimate('fadeOut', FadeOut);\n AnimateExecutor.registerBuiltInAnimate('moveIn', MoveIn);\n AnimateExecutor.registerBuiltInAnimate('moveOut', MoveOut);\n AnimateExecutor.registerBuiltInAnimate('rotateIn', RotateIn);\n AnimateExecutor.registerBuiltInAnimate('rotateOut', RotateOut);\n AnimateExecutor.registerBuiltInAnimate('update', Update);\n AnimateExecutor.registerBuiltInAnimate('state', State);\n AnimateExecutor.registerBuiltInAnimate('fromTo', FromTo);\n};\n\nexport const registerRectAnimation = () => {\n AnimateExecutor.registerBuiltInAnimate('growHeightIn', GrowHeightIn);\n AnimateExecutor.registerBuiltInAnimate('growHeightOut', GrowHeightOut);\n AnimateExecutor.registerBuiltInAnimate('growWidthIn', GrowWidthIn);\n AnimateExecutor.registerBuiltInAnimate('growWidthOut', GrowWidthOut);\n AnimateExecutor.registerBuiltInAnimate('growCenterIn', GrowCenterIn);\n AnimateExecutor.registerBuiltInAnimate('growCenterOut', GrowCenterOut);\n};\n\nexport const registerArcAnimation = () => {\n AnimateExecutor.registerBuiltInAnimate('growRadiusIn', GrowRadiusIn);\n AnimateExecutor.registerBuiltInAnimate('growRadiusOut', GrowRadiusOut);\n AnimateExecutor.registerBuiltInAnimate('growAngleIn', GrowAngleIn);\n AnimateExecutor.registerBuiltInAnimate('growAngleOut', GrowAngleOut);\n};\n\nexport const registerLineOrAreaAnimation = () => {\n AnimateExecutor.registerBuiltInAnimate('growPointsIn', GrowPointsIn);\n AnimateExecutor.registerBuiltInAnimate('growPointsOut', GrowPointsOut);\n AnimateExecutor.registerBuiltInAnimate('growPointsXIn', GrowPointsXIn);\n AnimateExecutor.registerBuiltInAnimate('growPointsXOut', GrowPointsXOut);\n AnimateExecutor.registerBuiltInAnimate('growPointsYIn', GrowPointsYIn);\n AnimateExecutor.registerBuiltInAnimate('growPointsYOut', GrowPointsYOut);\n AnimateExecutor.registerBuiltInAnimate('clipIn', ClipIn);\n AnimateExecutor.registerBuiltInAnimate('clipOut', ClipOut);\n};\n\nexport const registerPolygonAnimation = () => {\n AnimateExecutor.registerBuiltInAnimate('growPointsOut', GrowPointsOut);\n};\n\nexport const registerStageAnimation = () => {\n AnimateExecutor.registerBuiltInAnimate(BuiltIn_DISAPPEAR_ANIMATE_NAME, CallbackDisappearAnimate);\n};\n"]}
|
|
1
|
+
{"version":3,"sources":["../src/animation/config.ts"],"names":[],"mappings":";;;AAEA,gFAAqF;AACrF,gEAAwE;AACxE,0FAAsF;AACtF,gEAAwE;AACxE,oEAAiE;AACjE,0EAAuF;AACvF,4EAA0F;AAC1F,4EAA0F;AAC1F,4EAOqD;AACrD,4EAA0F;AAC1F,0EAAuF;AACvF,gEAAwE;AACxE,oEAA8E;AAC9E,kEAA2E;AAC3E,kEAA+D;AAC/D,4EAA8E;AAC9E,oEAAiE;AAGjE,wDAA+D;AAE/D,6CAA0C;AAE1C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CAAC,QAAQ,EAAE,aAAM,CAAC,CAAC;IACzD,kCAAe,CAAC,sBAAsB,CAAC,SAAS,EAAE,cAAO,CAAC,CAAC;AAC7D,CAAC,CAAC;AATW,QAAA,2BAA2B,+BAStC;AAEK,MAAM,wBAAwB,GAAG,GAAG,EAAE;IAC3C,kCAAe,CAAC,sBAAsB,CAAC,eAAe,EAAE,0BAAa,CAAC,CAAC;AACzE,CAAC,CAAC;AAFW,QAAA,wBAAwB,4BAEnC;AAEK,MAAM,sBAAsB,GAAG,GAAG,EAAE;IACzC,kCAAe,CAAC,sBAAsB,CAAC,wCAA8B,EAAE,6CAAwB,CAAC,CAAC;AACnG,CAAC,CAAC;AAFW,QAAA,sBAAsB,0BAEjC","file":"config.js","sourcesContent":["/* eslint-disable no-duplicate-imports */\nimport type { IGraphic } from '@visactor/vrender-core';\nimport { ClipDirectionAnimate } from '@visactor/vrender-animate/custom/clip-graphic';\nimport { ClipIn, ClipOut } from '@visactor/vrender-animate/custom/clip';\nimport { AnimateExecutor } from '@visactor/vrender-animate/executor/animate-executor';\nimport { FadeIn, FadeOut } from '@visactor/vrender-animate/custom/fade';\nimport { FromTo } from '@visactor/vrender-animate/custom/fromTo';\nimport { GrowAngleIn, GrowAngleOut } from '@visactor/vrender-animate/custom/growAngle';\nimport { GrowCenterIn, GrowCenterOut } from '@visactor/vrender-animate/custom/growCenter';\nimport { GrowHeightIn, GrowHeightOut } from '@visactor/vrender-animate/custom/growHeight';\nimport {\n GrowPointsIn,\n GrowPointsOut,\n GrowPointsXIn,\n GrowPointsXOut,\n GrowPointsYIn,\n GrowPointsYOut\n} from '@visactor/vrender-animate/custom/growPoints';\nimport { GrowRadiusIn, GrowRadiusOut } from '@visactor/vrender-animate/custom/growRadius';\nimport { GrowWidthIn, GrowWidthOut } from '@visactor/vrender-animate/custom/growWidth';\nimport { MoveIn, MoveOut } from '@visactor/vrender-animate/custom/move';\nimport { RotateIn, RotateOut } from '@visactor/vrender-animate/custom/rotate';\nimport { ScaleIn, ScaleOut } from '@visactor/vrender-animate/custom/scale';\nimport { State } from '@visactor/vrender-animate/custom/state';\nimport { TagPointsUpdate } from '@visactor/vrender-animate/custom/tag-points';\nimport { Update } from '@visactor/vrender-animate/custom/update';\n\nimport type { ILineAnimationParams, LineAppearPreset } from '../series/line/interface';\nimport { linePresetAnimation } from '../series/line/animation';\nimport type { MarkAnimationSpec, ICartesianGroupAnimationParams } from './interface';\nimport { Factory } from '../core/factory';\nimport { Direction } from '../typings/space';\nimport { CallbackDisappearAnimate } from './callback-disappear';\nimport { BuiltIn_DISAPPEAR_ANIMATE_NAME } from '../constant/animate';\n\nexport const DEFAULT_ANIMATION_CONFIG = {\n appear: {\n duration: 1000,\n easing: 'cubicOut'\n },\n update: {\n type: 'update',\n duration: 300,\n easing: 'linear'\n },\n enter: {\n duration: 300,\n easing: 'linear'\n },\n exit: {\n duration: 300,\n easing: 'linear'\n },\n disappear: {\n duration: 500,\n easing: 'cubicIn'\n },\n state: {\n duration: 300,\n easing: 'linear'\n }\n};\n\nexport const ScaleInOutAnimation = {\n appear: { type: 'scaleIn' },\n enter: { type: 'scaleIn' },\n exit: { type: 'scaleOut' }\n};\n\nexport const FadeInOutAnimation = {\n appear: { type: 'fadeIn' },\n enter: { type: 'fadeIn' },\n exit: { type: 'fadeOut' }\n};\n\nexport const registerScaleInOutAnimation = () => {\n Factory.registerAnimation('scaleInOut', () => ScaleInOutAnimation);\n};\n\nexport const registerFadeInOutAnimation = () => {\n Factory.registerAnimation('fadeInOut', () => FadeInOutAnimation);\n};\n\nexport const registerCartesianGroupClipAnimation = () => {\n Factory.registerAnimation('cartesianGroupClip', (params?: ICartesianGroupAnimationParams) => {\n return {\n appear: {\n custom: ClipDirectionAnimate,\n customParameters: (datum: any, g: IGraphic) => {\n return {\n animationType: 'in',\n group: g,\n direction: params.direction(),\n width: params.width(),\n height: params.height(),\n orient: params.orient()\n };\n }\n }\n };\n });\n};\n\nconst lineOrAreaAnimation = (params: ILineAnimationParams, preset: LineAppearPreset) => {\n return {\n appear: linePresetAnimation(params, preset),\n enter: { type: 'fadeIn' },\n exit: { type: 'fadeOut' },\n update: [\n {\n type: 'update',\n options: { excludeChannels: ['points', 'defined', 'segments'] }\n },\n {\n channel: ['points', 'segments'],\n custom: TagPointsUpdate,\n duration: DEFAULT_ANIMATION_CONFIG.update.duration,\n easing: DEFAULT_ANIMATION_CONFIG.update.easing,\n customParameters: {\n clipRangeByDimension: params.direction === Direction.horizontal ? 'y' : 'x'\n }\n }\n ]\n } as MarkAnimationSpec;\n};\n\nexport const registerLineAnimation = () => {\n Factory.registerAnimation('line', lineOrAreaAnimation);\n};\n\nexport const registerAreaAnimation = () => {\n Factory.registerAnimation('area', lineOrAreaAnimation);\n};\n\nexport const registerBuiltInAnimation = () => {\n AnimateExecutor.registerBuiltInAnimate('scaleIn', ScaleIn);\n AnimateExecutor.registerBuiltInAnimate('scaleOut', ScaleOut);\n AnimateExecutor.registerBuiltInAnimate('fadeIn', FadeIn);\n AnimateExecutor.registerBuiltInAnimate('fadeOut', FadeOut);\n AnimateExecutor.registerBuiltInAnimate('moveIn', MoveIn);\n AnimateExecutor.registerBuiltInAnimate('moveOut', MoveOut);\n AnimateExecutor.registerBuiltInAnimate('rotateIn', RotateIn);\n AnimateExecutor.registerBuiltInAnimate('rotateOut', RotateOut);\n AnimateExecutor.registerBuiltInAnimate('update', Update);\n AnimateExecutor.registerBuiltInAnimate('state', State);\n AnimateExecutor.registerBuiltInAnimate('fromTo', FromTo);\n};\n\nexport const registerRectAnimation = () => {\n AnimateExecutor.registerBuiltInAnimate('growHeightIn', GrowHeightIn);\n AnimateExecutor.registerBuiltInAnimate('growHeightOut', GrowHeightOut);\n AnimateExecutor.registerBuiltInAnimate('growWidthIn', GrowWidthIn);\n AnimateExecutor.registerBuiltInAnimate('growWidthOut', GrowWidthOut);\n AnimateExecutor.registerBuiltInAnimate('growCenterIn', GrowCenterIn);\n AnimateExecutor.registerBuiltInAnimate('growCenterOut', GrowCenterOut);\n};\n\nexport const registerArcAnimation = () => {\n AnimateExecutor.registerBuiltInAnimate('growRadiusIn', GrowRadiusIn);\n AnimateExecutor.registerBuiltInAnimate('growRadiusOut', GrowRadiusOut);\n AnimateExecutor.registerBuiltInAnimate('growAngleIn', GrowAngleIn);\n AnimateExecutor.registerBuiltInAnimate('growAngleOut', GrowAngleOut);\n};\n\nexport const registerLineOrAreaAnimation = () => {\n AnimateExecutor.registerBuiltInAnimate('growPointsIn', GrowPointsIn);\n AnimateExecutor.registerBuiltInAnimate('growPointsOut', GrowPointsOut);\n AnimateExecutor.registerBuiltInAnimate('growPointsXIn', GrowPointsXIn);\n AnimateExecutor.registerBuiltInAnimate('growPointsXOut', GrowPointsXOut);\n AnimateExecutor.registerBuiltInAnimate('growPointsYIn', GrowPointsYIn);\n AnimateExecutor.registerBuiltInAnimate('growPointsYOut', GrowPointsYOut);\n AnimateExecutor.registerBuiltInAnimate('clipIn', ClipIn);\n AnimateExecutor.registerBuiltInAnimate('clipOut', ClipOut);\n};\n\nexport const registerPolygonAnimation = () => {\n AnimateExecutor.registerBuiltInAnimate('growPointsOut', GrowPointsOut);\n};\n\nexport const registerStageAnimation = () => {\n AnimateExecutor.registerBuiltInAnimate(BuiltIn_DISAPPEAR_ANIMATE_NAME, CallbackDisappearAnimate);\n};\n"]}
|
|
@@ -119,6 +119,8 @@ export declare class BaseChart<T extends IChartSpec> extends CompilableBase impl
|
|
|
119
119
|
updateGlobalScale(result: IUpdateSpecResult): void;
|
|
120
120
|
updateGlobalScaleTheme(): void;
|
|
121
121
|
private _getSpecKeys;
|
|
122
|
+
private _isSeriesRelatedSpecKey;
|
|
123
|
+
private _canChangeSpecKeysWithoutRemake;
|
|
122
124
|
updateSpec(spec: T): IUpdateSpecResult;
|
|
123
125
|
updateChartConfig(result: IUpdateSpecResult, oldSpec: IChartSpec): void;
|
|
124
126
|
updateDataSpec(): void;
|
|
@@ -440,6 +440,14 @@ class BaseChart extends compilable_base_1.CompilableBase {
|
|
|
440
440
|
};
|
|
441
441
|
return Object.keys(spec).filter((key => !ignoreKeys[key])).sort();
|
|
442
442
|
}
|
|
443
|
+
_isSeriesRelatedSpecKey(key) {
|
|
444
|
+
var _a, _b;
|
|
445
|
+
return !!(null === (_b = null === (_a = this._specTransformer) || void 0 === _a ? void 0 : _a.getSeriesRelatedSpecKeys()) || void 0 === _b ? void 0 : _b[key]);
|
|
446
|
+
}
|
|
447
|
+
_canChangeSpecKeysWithoutRemake(currentKeys, nextKeys) {
|
|
448
|
+
const currentKeySet = new Set(currentKeys), nextKeySet = new Set(nextKeys), changedKeys = [ ...currentKeys.filter((key => !nextKeySet.has(key))), ...nextKeys.filter((key => !currentKeySet.has(key))) ];
|
|
449
|
+
return changedKeys.length > 0 && changedKeys.every((key => this._isSeriesRelatedSpecKey(key)));
|
|
450
|
+
}
|
|
443
451
|
updateSpec(spec) {
|
|
444
452
|
var _a, _b;
|
|
445
453
|
const result = {
|
|
@@ -452,14 +460,15 @@ class BaseChart extends compilable_base_1.CompilableBase {
|
|
|
452
460
|
if (spec.type !== this.type) return result.reMake = !0, this.setLayoutTag(!0, null, !1),
|
|
453
461
|
result;
|
|
454
462
|
const currentKeys = this._getSpecKeys(this._spec), nextKeys = this._getSpecKeys(spec);
|
|
455
|
-
if (!(0, vutils_1.isEqual)(currentKeys, nextKeys)) return result.reMake = !0,
|
|
456
|
-
result;
|
|
457
|
-
|
|
458
|
-
|
|
463
|
+
if (!(0, vutils_1.isEqual)(currentKeys, nextKeys) && !this._canChangeSpecKeysWithoutRemake(currentKeys, nextKeys)) return result.reMake = !0,
|
|
464
|
+
this.setLayoutTag(!0, null, !1), result;
|
|
465
|
+
const specKeys = Array.from(new Set([ ...currentKeys, ...nextKeys ])).sort();
|
|
466
|
+
for (let i = 0; i < specKeys.length; i++) {
|
|
467
|
+
const key = specKeys[i], currentSpec = this._spec[key], nextSpec = spec[key];
|
|
459
468
|
if ((0, util_1.isArray)(currentSpec) && currentSpec.length !== (0, util_1.array)(nextSpec).length && !this._canChangeMarkerComponentsWithoutRemake(key, currentSpec, nextSpec)) return result.reMake = !0,
|
|
460
469
|
this.setLayoutTag(!0, null, !1), result;
|
|
461
470
|
}
|
|
462
|
-
const oldSpec = this._spec, onlyMarkerComponentsRemoved = this._isOnlyMarkerComponentsRemoved(this._spec, spec,
|
|
471
|
+
const oldSpec = this._spec, onlyMarkerComponentsRemoved = this._isOnlyMarkerComponentsRemoved(this._spec, spec, specKeys), onlyComponentSpecsChanged = this._isOnlyComponentSpecsChanged(this._spec, spec, specKeys), onlySeriesSpecsChanged = this._isOnlySeriesSpecsChanged(this._spec, spec, specKeys), onlyComponentOrSeriesSpecsChanged = !(!onlyComponentSpecsChanged && !onlySeriesSpecsChanged) || this._isOnlyComponentOrSeriesSpecsChanged(this._spec, spec, specKeys);
|
|
463
472
|
if (this._spec = spec, onlyMarkerComponentsRemoved) return this._removeMarkerComponentsForEmptySpecs(result),
|
|
464
473
|
result;
|
|
465
474
|
if (this.updateChartConfig(result, oldSpec), result.reMake) return this.setLayoutTag(!0, null, !1),
|