@visactor/vchart 2.1.0-alpha.9 → 2.1.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 +3 -3
- package/build/index.es.js +49550 -52388
- package/build/index.js +49552 -52390
- package/build/index.min.js +2 -2
- 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/animation/grammar-dector.js +1 -2
- package/cjs/animation/index.js +2 -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 +8 -3
- package/cjs/compile/compiler.js.map +1 -1
- 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 +10 -2
- package/cjs/compile/stage-app.js +69 -26
- package/cjs/compile/stage-app.js.map +1 -1
- package/cjs/compile/util.js +1 -2
- package/cjs/component/axis/base-axis.d.ts +1 -1
- package/cjs/component/axis/base-axis.js +3 -3
- 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 +3 -2
- package/cjs/component/axis/cartesian/linear-axis.js +8 -4
- package/cjs/component/axis/cartesian/linear-axis.js.map +1 -1
- package/cjs/component/axis/mixin/linear-axis-mixin.d.ts +2 -0
- package/cjs/component/axis/mixin/linear-axis-mixin.js +7 -1
- package/cjs/component/axis/mixin/linear-axis-mixin.js.map +1 -1
- package/cjs/component/brush/brush.d.ts +1 -0
- package/cjs/component/brush/brush.js +15 -10
- package/cjs/component/brush/brush.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 +2 -1
- package/cjs/component/label/label.js +2 -2
- package/cjs/component/label/label.js.map +1 -1
- package/cjs/component/legend/base-legend.js +1 -1
- package/cjs/component/legend/base-legend.js.map +1 -1
- package/cjs/component/legend/discrete/interface.d.ts +11 -1
- package/cjs/component/legend/discrete/interface.js.map +1 -1
- package/cjs/component/legend/discrete/legend.d.ts +1 -1
- package/cjs/component/legend/discrete/legend.js +9 -8
- package/cjs/component/legend/discrete/legend.js.map +1 -1
- package/cjs/component/legend/discrete/util.d.ts +2 -1
- package/cjs/component/legend/discrete/util.js +39 -5
- package/cjs/component/legend/discrete/util.js.map +1 -1
- package/cjs/component/marker/base-marker.js +11 -7
- package/cjs/component/marker/base-marker.js.map +1 -1
- package/cjs/component/marker/mark-line/cartesian-mark-line.js +18 -7
- package/cjs/component/marker/mark-line/cartesian-mark-line.js.map +1 -1
- package/cjs/component/marker/mark-line/interface/spec.d.ts +9 -2
- package/cjs/component/marker/mark-line/interface/spec.js.map +1 -1
- package/cjs/component/marker/mark-point/base-mark-point.js +30 -17
- package/cjs/component/marker/mark-point/base-mark-point.js.map +1 -1
- package/cjs/component/marker/utils.js +17 -7
- package/cjs/component/marker/utils.js.map +1 -1
- package/cjs/constant/correlation.js +2 -1
- package/cjs/constant/event.js +1 -2
- package/cjs/constant/marker.js +1 -1
- package/cjs/constant/polar.js +1 -1
- package/cjs/core/index.d.ts +3 -2
- package/cjs/core/index.js +9 -5
- package/cjs/core/index.js.map +1 -1
- package/cjs/core/vchart.js +16 -6
- 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-line.js +2 -2
- package/cjs/mark/base/base-line.js.map +1 -1
- package/cjs/mark/base/base-mark.d.ts +0 -1
- package/cjs/mark/base/base-mark.js +16 -24
- package/cjs/mark/base/base-mark.js.map +1 -1
- package/cjs/mark/glyph.d.ts +3 -0
- package/cjs/mark/glyph.js +29 -5
- package/cjs/mark/glyph.js.map +1 -1
- package/cjs/mark/group.js +5 -5
- package/cjs/mark/group.js.map +1 -1
- package/cjs/mark/interface/common.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 +3 -0
- package/cjs/series/base/base-series.js +57 -27
- package/cjs/series/base/base-series.js.map +1 -1
- package/cjs/series/dot/dot.d.ts +1 -0
- package/cjs/series/interface/common.d.ts +2 -1
- package/cjs/series/interface/common.js.map +1 -1
- package/cjs/series/line/line.js +3 -3
- package/cjs/series/line/line.js.map +1 -1
- package/cjs/series/waterfall/waterfall.d.ts +2 -0
- package/cjs/series/waterfall/waterfall.js +12 -4
- package/cjs/series/waterfall/waterfall.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/mark.js +7 -3
- package/cjs/util/mark.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/style.js +24 -2
- package/cjs/util/style.js.map +1 -1
- package/cjs/util/text.js +2 -2
- package/cjs/util/text.js.map +1 -1
- package/cjs/vchart-line.d.ts +4 -0
- package/cjs/vchart-line.js +35 -0
- package/cjs/vchart-line.js.map +1 -0
- package/cjs/vchart-simple.d.ts +5 -1
- package/cjs/vchart-simple.js +11 -10
- package/cjs/vchart-simple.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/animation/grammar-dector.js +1 -2
- package/esm/animation/index.js +2 -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 +8 -4
- package/esm/compile/compiler.js.map +1 -1
- 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 +10 -2
- package/esm/compile/stage-app.js +65 -23
- package/esm/compile/stage-app.js.map +1 -1
- package/esm/compile/util.js +1 -2
- package/esm/component/axis/base-axis.d.ts +1 -1
- package/esm/component/axis/base-axis.js +2 -2
- 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 +3 -2
- package/esm/component/axis/cartesian/linear-axis.js +9 -1
- package/esm/component/axis/cartesian/linear-axis.js.map +1 -1
- package/esm/component/axis/mixin/linear-axis-mixin.d.ts +2 -0
- package/esm/component/axis/mixin/linear-axis-mixin.js +7 -1
- package/esm/component/axis/mixin/linear-axis-mixin.js.map +1 -1
- package/esm/component/brush/brush.d.ts +1 -0
- package/esm/component/brush/brush.js +16 -10
- package/esm/component/brush/brush.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 +2 -1
- package/esm/component/label/label.js +1 -1
- package/esm/component/label/label.js.map +1 -1
- package/esm/component/legend/base-legend.js +1 -1
- package/esm/component/legend/base-legend.js.map +1 -1
- package/esm/component/legend/discrete/interface.d.ts +11 -1
- package/esm/component/legend/discrete/interface.js.map +1 -1
- package/esm/component/legend/discrete/legend.d.ts +1 -1
- package/esm/component/legend/discrete/legend.js +4 -3
- package/esm/component/legend/discrete/legend.js.map +1 -1
- package/esm/component/legend/discrete/util.d.ts +2 -1
- package/esm/component/legend/discrete/util.js +37 -4
- package/esm/component/legend/discrete/util.js.map +1 -1
- package/esm/component/marker/base-marker.js +11 -7
- package/esm/component/marker/base-marker.js.map +1 -1
- package/esm/component/marker/mark-line/cartesian-mark-line.js +18 -8
- package/esm/component/marker/mark-line/cartesian-mark-line.js.map +1 -1
- package/esm/component/marker/mark-line/interface/spec.d.ts +9 -2
- package/esm/component/marker/mark-line/interface/spec.js.map +1 -1
- package/esm/component/marker/mark-point/base-mark-point.js +29 -16
- package/esm/component/marker/mark-point/base-mark-point.js.map +1 -1
- package/esm/component/marker/utils.js +16 -6
- package/esm/component/marker/utils.js.map +1 -1
- package/esm/constant/correlation.js +2 -1
- package/esm/constant/event.js +1 -2
- package/esm/constant/marker.js +1 -1
- package/esm/constant/polar.js +1 -1
- package/esm/core/index.d.ts +3 -2
- package/esm/core/index.js +4 -2
- package/esm/core/index.js.map +1 -1
- package/esm/core/vchart.js +15 -5
- 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-line.js +2 -2
- package/esm/mark/base/base-line.js.map +1 -1
- package/esm/mark/base/base-mark.d.ts +0 -1
- package/esm/mark/base/base-mark.js +16 -24
- package/esm/mark/base/base-mark.js.map +1 -1
- package/esm/mark/glyph.d.ts +3 -0
- package/esm/mark/glyph.js +30 -4
- package/esm/mark/glyph.js.map +1 -1
- package/esm/mark/group.js +5 -4
- package/esm/mark/group.js.map +1 -1
- package/esm/mark/interface/common.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 +3 -0
- package/esm/series/base/base-series.js +54 -24
- package/esm/series/base/base-series.js.map +1 -1
- package/esm/series/dot/dot.d.ts +1 -0
- package/esm/series/interface/common.d.ts +2 -1
- package/esm/series/interface/common.js.map +1 -1
- package/esm/series/line/line.js +3 -1
- package/esm/series/line/line.js.map +1 -1
- package/esm/series/waterfall/waterfall.d.ts +2 -0
- package/esm/series/waterfall/waterfall.js +12 -4
- package/esm/series/waterfall/waterfall.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/mark.js +8 -2
- package/esm/util/mark.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/style.js +23 -2
- package/esm/util/style.js.map +1 -1
- package/esm/util/text.js +1 -1
- package/esm/util/text.js.map +1 -1
- package/esm/vchart-line.d.ts +4 -0
- package/esm/vchart-line.js +28 -0
- package/esm/vchart-line.js.map +1 -0
- package/esm/vchart-simple.d.ts +5 -1
- package/esm/vchart-simple.js +9 -1
- package/esm/vchart-simple.js.map +1 -1
- package/package.json +10 -9
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/animation/callback-disappear.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,
|
|
1
|
+
{"version":3,"sources":["../src/animation/callback-disappear.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,iDAAiD,CAAC;AAMhF,MAAM,OAAO,wBAAyB,SAAQ,aAAkB;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","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/esm/animation/config.js
CHANGED
|
@@ -1,4 +1,36 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ClipDirectionAnimate } from "@visactor/vrender-animate/custom/clip-graphic";
|
|
2
|
+
|
|
3
|
+
import { ClipIn, ClipOut } from "@visactor/vrender-animate/custom/clip";
|
|
4
|
+
|
|
5
|
+
import { AnimateExecutor } from "@visactor/vrender-animate/executor/animate-executor";
|
|
6
|
+
|
|
7
|
+
import { FadeIn, FadeOut } from "@visactor/vrender-animate/custom/fade";
|
|
8
|
+
|
|
9
|
+
import { FromTo } from "@visactor/vrender-animate/custom/fromTo";
|
|
10
|
+
|
|
11
|
+
import { GrowAngleIn, GrowAngleOut } from "@visactor/vrender-animate/custom/growAngle";
|
|
12
|
+
|
|
13
|
+
import { GrowCenterIn, GrowCenterOut } from "@visactor/vrender-animate/custom/growCenter";
|
|
14
|
+
|
|
15
|
+
import { GrowHeightIn, GrowHeightOut } from "@visactor/vrender-animate/custom/growHeight";
|
|
16
|
+
|
|
17
|
+
import { GrowPointsIn, GrowPointsOut, GrowPointsXIn, GrowPointsXOut, GrowPointsYIn, GrowPointsYOut } from "@visactor/vrender-animate/custom/growPoints";
|
|
18
|
+
|
|
19
|
+
import { GrowRadiusIn, GrowRadiusOut } from "@visactor/vrender-animate/custom/growRadius";
|
|
20
|
+
|
|
21
|
+
import { GrowWidthIn, GrowWidthOut } from "@visactor/vrender-animate/custom/growWidth";
|
|
22
|
+
|
|
23
|
+
import { MoveIn, MoveOut } from "@visactor/vrender-animate/custom/move";
|
|
24
|
+
|
|
25
|
+
import { RotateIn, RotateOut } from "@visactor/vrender-animate/custom/rotate";
|
|
26
|
+
|
|
27
|
+
import { ScaleIn, ScaleOut } from "@visactor/vrender-animate/custom/scale";
|
|
28
|
+
|
|
29
|
+
import { State } from "@visactor/vrender-animate/custom/state";
|
|
30
|
+
|
|
31
|
+
import { TagPointsUpdate } from "@visactor/vrender-animate/custom/tag-points";
|
|
32
|
+
|
|
33
|
+
import { Update } from "@visactor/vrender-animate/custom/update";
|
|
2
34
|
|
|
3
35
|
import { linePresetAnimation } from "../series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AC,sBAAsB,CAAC,cAAc,EAAE,YAAY,CAAC,CAAC;AACvE,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,2BAA2B,GAAG,GAAG,EAAE;IAC9C,eAAe,CAAC,sBAAsB,CAAC,cAAc,EAAE,YAAY,CAAC,CAAC;IACrE,eAAe,CAAC,sBAAsB,CAAC,eAAe,EAAE,aAAa,CAAC,CAAC;IACvE,eAAe,CAAC,sBAAsB,CAAC,eAAe,EAAE,aAAa,CAAC,CAAC;IACvE,eAAe,CAAC,sBAAsB,CAAC,gBAAgB,EAAE,cAAc,CAAC,CAAC;IACzE,eAAe,CAAC,sBAAsB,CAAC,eAAe,EAAE,aAAa,CAAC,CAAC;IACvE,eAAe,CAAC,sBAAsB,CAAC,gBAAgB,EAAE,cAAc,CAAC,CAAC;IACzE,eAAe,CAAC,sBAAsB,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;IACzD,eAAe,CAAC,sBAAsB,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;AAC7D,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,wBAAwB,GAAG,GAAG,EAAE;IAC3C,eAAe,CAAC,sBAAsB,CAAC,eAAe,EAAE,aAAa,CAAC,CAAC;AACzE,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,sBAAsB,GAAG,GAAG,EAAE;IACzC,eAAe,CAAC,sBAAsB,CAAC,8BAA8B,EAAE,wBAAwB,CAAC,CAAC;AACnG,CAAC,CAAC","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,OAAO,EAAE,oBAAoB,EAAE,MAAM,+CAA+C,CAAC;AACrF,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,uCAAuC,CAAC;AACxE,OAAO,EAAE,eAAe,EAAE,MAAM,qDAAqD,CAAC;AACtF,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,uCAAuC,CAAC;AACxE,OAAO,EAAE,MAAM,EAAE,MAAM,yCAAyC,CAAC;AACjE,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,4CAA4C,CAAC;AACvF,OAAO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ACvC,eAAe,CAAC,sBAAsB,CAAC,cAAc,EAAE,YAAY,CAAC,CAAC;IACrE,eAAe,CAAC,sBAAsB,CAAC,eAAe,EAAE,aAAa,CAAC,CAAC;IACvE,eAAe,CAAC,sBAAsB,CAAC,aAAa,EAAE,WAAW,CAAC,CAAC;IACnE,eAAe,CAAC,sBAAsB,CAAC,cAAc,EAAE,YAAY,CAAC,CAAC;AACvE,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,2BAA2B,GAAG,GAAG,EAAE;IAC9C,eAAe,CAAC,sBAAsB,CAAC,cAAc,EAAE,YAAY,CAAC,CAAC;IACrE,eAAe,CAAC,sBAAsB,CAAC,eAAe,EAAE,aAAa,CAAC,CAAC;IACvE,eAAe,CAAC,sBAAsB,CAAC,eAAe,EAAE,aAAa,CAAC,CAAC;IACvE,eAAe,CAAC,sBAAsB,CAAC,gBAAgB,EAAE,cAAc,CAAC,CAAC;IACzE,eAAe,CAAC,sBAAsB,CAAC,eAAe,EAAE,aAAa,CAAC,CAAC;IACvE,eAAe,CAAC,sBAAsB,CAAC,gBAAgB,EAAE,cAAc,CAAC,CAAC;IACzE,eAAe,CAAC,sBAAsB,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;IACzD,eAAe,CAAC,sBAAsB,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;AAC7D,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,wBAAwB,GAAG,GAAG,EAAE;IAC3C,eAAe,CAAC,sBAAsB,CAAC,eAAe,EAAE,aAAa,CAAC,CAAC;AACzE,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,sBAAsB,GAAG,GAAG,EAAE;IACzC,eAAe,CAAC,sBAAsB,CAAC,8BAA8B,EAAE,wBAAwB,CAAC,CAAC;AACnG,CAAC,CAAC","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"]}
|
package/esm/animation/index.js
CHANGED
|
@@ -6,4 +6,5 @@ export { registerSequentialAnimate } from "./sequential-animate";
|
|
|
6
6
|
|
|
7
7
|
export { registerPolygonAnimation, registerRectAnimation, registerArcAnimation, registerScaleInOutAnimation, DEFAULT_ANIMATION_CONFIG } from "./config";
|
|
8
8
|
|
|
9
|
-
export { animationConfig, userAnimationConfig, shouldMarkDoMorph } from "./utils";
|
|
9
|
+
export { animationConfig, userAnimationConfig, shouldMarkDoMorph } from "./utils";
|
|
10
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -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;
|
|
@@ -469,6 +469,14 @@ export class BaseChart extends CompilableBase {
|
|
|
469
469
|
};
|
|
470
470
|
return Object.keys(spec).filter((key => !ignoreKeys[key])).sort();
|
|
471
471
|
}
|
|
472
|
+
_isSeriesRelatedSpecKey(key) {
|
|
473
|
+
var _a, _b;
|
|
474
|
+
return !!(null === (_b = null === (_a = this._specTransformer) || void 0 === _a ? void 0 : _a.getSeriesRelatedSpecKeys()) || void 0 === _b ? void 0 : _b[key]);
|
|
475
|
+
}
|
|
476
|
+
_canChangeSpecKeysWithoutRemake(currentKeys, nextKeys) {
|
|
477
|
+
const currentKeySet = new Set(currentKeys), nextKeySet = new Set(nextKeys), changedKeys = [ ...currentKeys.filter((key => !nextKeySet.has(key))), ...nextKeys.filter((key => !currentKeySet.has(key))) ];
|
|
478
|
+
return changedKeys.length > 0 && changedKeys.every((key => this._isSeriesRelatedSpecKey(key)));
|
|
479
|
+
}
|
|
472
480
|
updateSpec(spec) {
|
|
473
481
|
var _a, _b;
|
|
474
482
|
const result = {
|
|
@@ -481,14 +489,15 @@ export class BaseChart extends CompilableBase {
|
|
|
481
489
|
if (spec.type !== this.type) return result.reMake = !0, this.setLayoutTag(!0, null, !1),
|
|
482
490
|
result;
|
|
483
491
|
const currentKeys = this._getSpecKeys(this._spec), nextKeys = this._getSpecKeys(spec);
|
|
484
|
-
if (!isEqual(currentKeys, nextKeys)) return result.reMake = !0,
|
|
485
|
-
result;
|
|
486
|
-
|
|
487
|
-
|
|
492
|
+
if (!isEqual(currentKeys, nextKeys) && !this._canChangeSpecKeysWithoutRemake(currentKeys, nextKeys)) return result.reMake = !0,
|
|
493
|
+
this.setLayoutTag(!0, null, !1), result;
|
|
494
|
+
const specKeys = Array.from(new Set([ ...currentKeys, ...nextKeys ])).sort();
|
|
495
|
+
for (let i = 0; i < specKeys.length; i++) {
|
|
496
|
+
const key = specKeys[i], currentSpec = this._spec[key], nextSpec = spec[key];
|
|
488
497
|
if (isArray(currentSpec) && currentSpec.length !== array(nextSpec).length && !this._canChangeMarkerComponentsWithoutRemake(key, currentSpec, nextSpec)) return result.reMake = !0,
|
|
489
498
|
this.setLayoutTag(!0, null, !1), result;
|
|
490
499
|
}
|
|
491
|
-
const oldSpec = this._spec, onlyMarkerComponentsRemoved = this._isOnlyMarkerComponentsRemoved(this._spec, spec,
|
|
500
|
+
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);
|
|
492
501
|
if (this._spec = spec, onlyMarkerComponentsRemoved) return this._removeMarkerComponentsForEmptySpecs(result),
|
|
493
502
|
result;
|
|
494
503
|
if (this.updateChartConfig(result, oldSpec), result.reMake) return this.setLayoutTag(!0, null, !1),
|