@visactor/vseed 0.4.28 → 0.5.1
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/dist/cjs/index.cjs +2 -2
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/esm/builder/builder/advanced/colorItems.d.ts +1 -0
- package/dist/esm/builder/builder/advanced/colorItems.js +21 -1
- package/dist/esm/builder/builder/advanced/colorItems.js.map +1 -1
- package/dist/esm/builder/builder/buildSpec.js.map +1 -1
- package/dist/esm/builder/builder/builder.d.ts +4 -0
- package/dist/esm/builder/builder/builder.js +2 -1
- package/dist/esm/builder/builder/builder.js.map +1 -1
- package/dist/esm/dataSelector/selector.js.map +1 -1
- package/dist/esm/pipeline/advanced/chart/pipes/config/column.js +2 -1
- package/dist/esm/pipeline/advanced/chart/pipes/config/column.js.map +1 -1
- package/dist/esm/pipeline/advanced/chart/pipes/config/line.js +2 -1
- package/dist/esm/pipeline/advanced/chart/pipes/config/line.js.map +1 -1
- package/dist/esm/pipeline/advanced/chart/pipes/config/pie.js +2 -1
- package/dist/esm/pipeline/advanced/chart/pipes/config/pie.js.map +1 -1
- package/dist/esm/pipeline/advanced/chart/pipes/config/scatter.js +2 -1
- package/dist/esm/pipeline/advanced/chart/pipes/config/scatter.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipeline/area.js +3 -1
- package/dist/esm/pipeline/spec/chart/pipeline/area.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipeline/areaPercent.js +3 -1
- package/dist/esm/pipeline/spec/chart/pipeline/areaPercent.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipeline/bar.js +3 -1
- package/dist/esm/pipeline/spec/chart/pipeline/bar.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipeline/barParallel.js +3 -1
- package/dist/esm/pipeline/spec/chart/pipeline/barParallel.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipeline/barPercent.js +3 -1
- package/dist/esm/pipeline/spec/chart/pipeline/barPercent.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipeline/column.js +3 -1
- package/dist/esm/pipeline/spec/chart/pipeline/column.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipeline/columnParallel.js +3 -1
- package/dist/esm/pipeline/spec/chart/pipeline/columnParallel.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipeline/columnPercent.js +3 -1
- package/dist/esm/pipeline/spec/chart/pipeline/columnPercent.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipeline/donut.js +3 -1
- package/dist/esm/pipeline/spec/chart/pipeline/donut.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipeline/line.js +3 -1
- package/dist/esm/pipeline/spec/chart/pipeline/line.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipeline/pie.js +3 -1
- package/dist/esm/pipeline/spec/chart/pipeline/pie.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipeline/radar.js +3 -1
- package/dist/esm/pipeline/spec/chart/pipeline/radar.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipeline/rose.js +3 -1
- package/dist/esm/pipeline/spec/chart/pipeline/rose.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipeline/roseParallel.js +3 -1
- package/dist/esm/pipeline/spec/chart/pipeline/roseParallel.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipeline/scatter.js +3 -1
- package/dist/esm/pipeline/spec/chart/pipeline/scatter.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/animation/animation.d.ts +15 -0
- package/dist/esm/pipeline/spec/chart/pipes/animation/animation.js +94 -0
- package/dist/esm/pipeline/spec/chart/pipes/animation/animation.js.map +1 -0
- package/dist/esm/pipeline/spec/chart/pipes/animation/bar.d.ts +77 -0
- package/dist/esm/pipeline/spec/chart/pipes/animation/bar.js +88 -0
- package/dist/esm/pipeline/spec/chart/pipes/animation/bar.js.map +1 -0
- package/dist/esm/pipeline/spec/chart/pipes/animation/index.d.ts +2 -0
- package/dist/esm/pipeline/spec/chart/pipes/animation/index.js +2 -0
- package/dist/esm/pipeline/spec/chart/pipes/animation/lineOrArea.d.ts +254 -0
- package/dist/esm/pipeline/spec/chart/pipes/animation/lineOrArea.js +138 -0
- package/dist/esm/pipeline/spec/chart/pipes/animation/lineOrArea.js.map +1 -0
- package/dist/esm/pipeline/spec/chart/pipes/animation/pie.d.ts +71 -0
- package/dist/esm/pipeline/spec/chart/pipes/animation/pie.js +176 -0
- package/dist/esm/pipeline/spec/chart/pipes/animation/pie.js.map +1 -0
- package/dist/esm/pipeline/spec/chart/pipes/animation/radar.d.ts +131 -0
- package/dist/esm/pipeline/spec/chart/pipes/animation/radar.js +46 -0
- package/dist/esm/pipeline/spec/chart/pipes/animation/radar.js.map +1 -0
- package/dist/esm/pipeline/spec/chart/pipes/animation/scatter.d.ts +102 -0
- package/dist/esm/pipeline/spec/chart/pipes/animation/scatter.js +57 -0
- package/dist/esm/pipeline/spec/chart/pipes/animation/scatter.js.map +1 -0
- package/dist/esm/pipeline/spec/chart/pipes/animation/types.d.ts +130 -0
- package/dist/esm/pipeline/spec/chart/pipes/animation/types.js +19 -0
- package/dist/esm/pipeline/spec/chart/pipes/animation/types.js.map +1 -0
- package/dist/esm/pipeline/spec/chart/pipes/animation/utils/bar.d.ts +11 -0
- package/dist/esm/pipeline/spec/chart/pipes/animation/utils/bar.js +13 -0
- package/dist/esm/pipeline/spec/chart/pipes/animation/utils/bar.js.map +1 -0
- package/dist/esm/pipeline/spec/chart/pipes/animation/utils/barColor.d.ts +52 -0
- package/dist/esm/pipeline/spec/chart/pipes/animation/utils/barColor.js +51 -0
- package/dist/esm/pipeline/spec/chart/pipes/animation/utils/barColor.js.map +1 -0
- package/dist/esm/pipeline/spec/chart/pipes/animation/utils/barGroup.d.ts +102 -0
- package/dist/esm/pipeline/spec/chart/pipes/animation/utils/barGroup.js +84 -0
- package/dist/esm/pipeline/spec/chart/pipes/animation/utils/barGroup.js.map +1 -0
- package/dist/esm/pipeline/spec/chart/pipes/animation/utils/barMotion.d.ts +66 -0
- package/dist/esm/pipeline/spec/chart/pipes/animation/utils/barMotion.js +72 -0
- package/dist/esm/pipeline/spec/chart/pipes/animation/utils/barMotion.js.map +1 -0
- package/dist/esm/pipeline/spec/chart/pipes/animation/utils/index.d.ts +86 -0
- package/dist/esm/pipeline/spec/chart/pipes/animation/utils/index.js +60 -0
- package/dist/esm/pipeline/spec/chart/pipes/animation/utils/index.js.map +1 -0
- package/dist/esm/pipeline/spec/chart/pipes/animation/utils/lineOrArea.d.ts +29 -0
- package/dist/esm/pipeline/spec/chart/pipes/animation/utils/lineOrArea.js +20 -0
- package/dist/esm/pipeline/spec/chart/pipes/animation/utils/lineOrArea.js.map +1 -0
- package/dist/esm/pipeline/spec/chart/pipes/animation/utils/pie.d.ts +14 -0
- package/dist/esm/pipeline/spec/chart/pipes/animation/utils/pie.js +9 -0
- package/dist/esm/pipeline/spec/chart/pipes/animation/utils/pie.js.map +1 -0
- package/dist/esm/pipeline/spec/chart/pipes/animation/utils/scatter.d.ts +69 -0
- package/dist/esm/pipeline/spec/chart/pipes/animation/utils/scatter.js +59 -0
- package/dist/esm/pipeline/spec/chart/pipes/animation/utils/scatter.js.map +1 -0
- package/dist/esm/pipeline/spec/chart/pipes/annotation/annotationArea.js +2 -2
- package/dist/esm/pipeline/spec/chart/pipes/annotation/annotationArea.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/annotation/annotationAreaBand.js +2 -2
- package/dist/esm/pipeline/spec/chart/pipes/annotation/annotationAreaBand.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/annotation/annotationDifferenceLine.js +63 -18
- package/dist/esm/pipeline/spec/chart/pipes/annotation/annotationDifferenceLine.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/annotation/annotationHorizontalLine.js +7 -13
- package/dist/esm/pipeline/spec/chart/pipes/annotation/annotationHorizontalLine.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/annotation/annotationPointCommon.js +2 -2
- package/dist/esm/pipeline/spec/chart/pipes/annotation/annotationPointCommon.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/annotation/annotationVerticalLine.js +9 -15
- package/dist/esm/pipeline/spec/chart/pipes/annotation/annotationVerticalLine.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/annotation/utils.d.ts +2 -0
- package/dist/esm/pipeline/spec/chart/pipes/annotation/utils.js +15 -1
- package/dist/esm/pipeline/spec/chart/pipes/annotation/utils.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/index.d.ts +1 -0
- package/dist/esm/pipeline/spec/chart/pipes/index.js +1 -0
- package/dist/esm/pipeline/utils/sandbox/execute.js.map +1 -1
- package/dist/esm/theme/tokenTheme.d.ts +6 -0
- package/dist/esm/theme/tokenTheme.js +36 -7
- package/dist/esm/theme/tokenTheme.js.map +1 -1
- package/dist/esm/types/builder/builder.d.ts +1 -0
- package/dist/esm/types/builder/builder.js.map +1 -1
- package/dist/esm/types/chartType/area/area.d.ts +6 -1
- package/dist/esm/types/chartType/area/zArea.d.ts +50 -0
- package/dist/esm/types/chartType/area/zArea.js +2 -1
- package/dist/esm/types/chartType/area/zArea.js.map +1 -1
- package/dist/esm/types/chartType/areaPercent/areaPercent.d.ts +6 -1
- package/dist/esm/types/chartType/areaPercent/zAreaPercent.d.ts +40 -0
- package/dist/esm/types/chartType/areaPercent/zAreaPercent.js +2 -1
- package/dist/esm/types/chartType/areaPercent/zAreaPercent.js.map +1 -1
- package/dist/esm/types/chartType/bar/bar.d.ts +6 -1
- package/dist/esm/types/chartType/bar/zBar.d.ts +50 -0
- package/dist/esm/types/chartType/bar/zBar.js +2 -1
- package/dist/esm/types/chartType/bar/zBar.js.map +1 -1
- package/dist/esm/types/chartType/barParallel/barParallel.d.ts +6 -1
- package/dist/esm/types/chartType/barParallel/zBarParallel.d.ts +50 -0
- package/dist/esm/types/chartType/barParallel/zBarParallel.js +2 -1
- package/dist/esm/types/chartType/barParallel/zBarParallel.js.map +1 -1
- package/dist/esm/types/chartType/barPercent/barPercent.d.ts +6 -1
- package/dist/esm/types/chartType/barPercent/zBarPercent.d.ts +40 -0
- package/dist/esm/types/chartType/barPercent/zBarPercent.js +2 -1
- package/dist/esm/types/chartType/barPercent/zBarPercent.js.map +1 -1
- package/dist/esm/types/chartType/column/column.d.ts +6 -1
- package/dist/esm/types/chartType/column/zColumn.d.ts +50 -0
- package/dist/esm/types/chartType/column/zColumn.js +2 -1
- package/dist/esm/types/chartType/column/zColumn.js.map +1 -1
- package/dist/esm/types/chartType/columnParallel/columnParallel.d.ts +6 -1
- package/dist/esm/types/chartType/columnParallel/zColumnParallel.d.ts +50 -0
- package/dist/esm/types/chartType/columnParallel/zColumnParallel.js +2 -1
- package/dist/esm/types/chartType/columnParallel/zColumnParallel.js.map +1 -1
- package/dist/esm/types/chartType/columnPercent/columnPercent.d.ts +6 -1
- package/dist/esm/types/chartType/columnPercent/zColumnPercent.d.ts +40 -0
- package/dist/esm/types/chartType/columnPercent/zColumnPercent.js +2 -1
- package/dist/esm/types/chartType/columnPercent/zColumnPercent.js.map +1 -1
- package/dist/esm/types/chartType/donut/donut.d.ts +6 -1
- package/dist/esm/types/chartType/donut/zDonut.d.ts +40 -0
- package/dist/esm/types/chartType/donut/zDonut.js +2 -1
- package/dist/esm/types/chartType/donut/zDonut.js.map +1 -1
- package/dist/esm/types/chartType/line/line.d.ts +6 -1
- package/dist/esm/types/chartType/line/zLine.d.ts +50 -0
- package/dist/esm/types/chartType/line/zLine.js +2 -1
- package/dist/esm/types/chartType/line/zLine.js.map +1 -1
- package/dist/esm/types/chartType/pie/pie.d.ts +6 -1
- package/dist/esm/types/chartType/pie/zPie.d.ts +40 -0
- package/dist/esm/types/chartType/pie/zPie.js +2 -1
- package/dist/esm/types/chartType/pie/zPie.js.map +1 -1
- package/dist/esm/types/chartType/radar/radar.d.ts +6 -1
- package/dist/esm/types/chartType/radar/zRadar.d.ts +40 -0
- package/dist/esm/types/chartType/radar/zRadar.js +2 -1
- package/dist/esm/types/chartType/radar/zRadar.js.map +1 -1
- package/dist/esm/types/chartType/rose/rose.d.ts +6 -1
- package/dist/esm/types/chartType/rose/zRose.d.ts +40 -0
- package/dist/esm/types/chartType/rose/zRose.js +2 -1
- package/dist/esm/types/chartType/rose/zRose.js.map +1 -1
- package/dist/esm/types/chartType/roseParallel/roseParallel.d.ts +6 -1
- package/dist/esm/types/chartType/roseParallel/zRoseParallel.d.ts +40 -0
- package/dist/esm/types/chartType/roseParallel/zRoseParallel.js +2 -1
- package/dist/esm/types/chartType/roseParallel/zRoseParallel.js.map +1 -1
- package/dist/esm/types/chartType/scatter/scatter.d.ts +6 -1
- package/dist/esm/types/chartType/scatter/zScatter.d.ts +40 -0
- package/dist/esm/types/chartType/scatter/zScatter.js +2 -1
- package/dist/esm/types/chartType/scatter/zScatter.js.map +1 -1
- package/dist/esm/types/properties/annotation/annotation.d.ts +10 -0
- package/dist/esm/types/properties/annotation/annotationDifferenceLine.d.ts +4 -0
- package/dist/esm/types/properties/annotation/zAnnotationDifferenceLine.d.ts +5 -0
- package/dist/esm/types/properties/annotation/zAnnotationDifferenceLine.js +6 -1
- package/dist/esm/types/properties/annotation/zAnnotationDifferenceLine.js.map +1 -1
- package/dist/esm/types/properties/config/animation/animation.d.ts +72 -0
- package/dist/esm/types/properties/config/animation/animation.js +0 -0
- package/dist/esm/types/properties/config/animation/animationAtmosphere.d.ts +15 -0
- package/dist/esm/types/properties/config/animation/animationAtmosphere.js +0 -0
- package/dist/esm/types/properties/config/animation/animationConfig.d.ts +2 -0
- package/dist/esm/types/properties/config/animation/animationConfig.js +0 -0
- package/dist/esm/types/properties/config/animation/animationEffect.d.ts +72 -0
- package/dist/esm/types/properties/config/animation/animationEffect.js +0 -0
- package/dist/esm/types/properties/config/animation/animationLoop.d.ts +49 -0
- package/dist/esm/types/properties/config/animation/animationLoop.js +0 -0
- package/dist/esm/types/properties/config/animation/index.d.ts +6 -0
- package/dist/esm/types/properties/config/animation/index.js +1 -0
- package/dist/esm/types/properties/config/animation/zAnimation.d.ts +201 -0
- package/dist/esm/types/properties/config/animation/zAnimation.js +114 -0
- package/dist/esm/types/properties/config/animation/zAnimation.js.map +1 -0
- package/dist/esm/types/properties/config/annotation/annotation.d.ts +32 -5
- package/dist/esm/types/properties/config/annotation/zAnnotation.d.ts +30 -4
- package/dist/esm/types/properties/config/annotation/zAnnotation.js +11 -1
- package/dist/esm/types/properties/config/annotation/zAnnotation.js.map +1 -1
- package/dist/esm/types/properties/config/area.d.ts +110 -4
- package/dist/esm/types/properties/config/area.js +3 -1
- package/dist/esm/types/properties/config/area.js.map +1 -1
- package/dist/esm/types/properties/config/bar.d.ts +165 -6
- package/dist/esm/types/properties/config/bar.js +3 -1
- package/dist/esm/types/properties/config/bar.js.map +1 -1
- package/dist/esm/types/properties/config/boxplot.d.ts +15 -2
- package/dist/esm/types/properties/config/column.d.ts +165 -6
- package/dist/esm/types/properties/config/column.js +3 -1
- package/dist/esm/types/properties/config/column.js.map +1 -1
- package/dist/esm/types/properties/config/config.d.ts +1125 -38
- package/dist/esm/types/properties/config/dualAxis.d.ts +15 -2
- package/dist/esm/types/properties/config/histogram.d.ts +15 -2
- package/dist/esm/types/properties/config/index.d.ts +1 -0
- package/dist/esm/types/properties/config/index.js +1 -0
- package/dist/esm/types/properties/config/line.d.ts +55 -2
- package/dist/esm/types/properties/config/line.js +3 -1
- package/dist/esm/types/properties/config/line.js.map +1 -1
- package/dist/esm/types/properties/config/pie.d.ts +120 -0
- package/dist/esm/types/properties/config/pie.js +6 -2
- package/dist/esm/types/properties/config/pie.js.map +1 -1
- package/dist/esm/types/properties/config/race.d.ts +330 -12
- package/dist/esm/types/properties/config/rose.d.ts +80 -0
- package/dist/esm/types/properties/config/rose.js +3 -1
- package/dist/esm/types/properties/config/rose.js.map +1 -1
- package/dist/esm/types/properties/config/scatter.d.ts +55 -2
- package/dist/esm/types/properties/config/scatter.js +3 -1
- package/dist/esm/types/properties/config/scatter.js.map +1 -1
- package/dist/esm/types/properties/theme/customTheme.d.ts +2250 -76
- package/dist/umd/index.js +5152 -689
- package/dist/umd/index.js.map +1 -1
- package/package.json +4 -9
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
import { ChartTypeEnum } from "../../../../utils/index.js";
|
|
2
|
+
import { VScreenAnimationType } from "./types.js";
|
|
3
|
+
import { allowAnimation, getPrimaryEffect } from "./utils/index.js";
|
|
4
|
+
import { radialPie, scalePie } from "./utils/pie.js";
|
|
5
|
+
const pieAppear = (config, chartType)=>{
|
|
6
|
+
if (!config || !allowAnimation(config)) return false;
|
|
7
|
+
const { effects, ease, duration } = config;
|
|
8
|
+
const effect = effects?.[0];
|
|
9
|
+
const durationMs = (duration ?? 1) * 1000;
|
|
10
|
+
let configByType = {};
|
|
11
|
+
if (effect === VScreenAnimationType.radial) configByType = radialPie();
|
|
12
|
+
else if (effect === VScreenAnimationType.scale) configByType = scalePie();
|
|
13
|
+
const result = {
|
|
14
|
+
pie: {
|
|
15
|
+
...configByType,
|
|
16
|
+
easing: ease,
|
|
17
|
+
duration: durationMs
|
|
18
|
+
},
|
|
19
|
+
rose: {
|
|
20
|
+
...configByType,
|
|
21
|
+
easing: ease,
|
|
22
|
+
duration: durationMs
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
if (chartType === ChartTypeEnum.Rose && effect === VScreenAnimationType.radial) result.preset = 'growAngle';
|
|
26
|
+
return result;
|
|
27
|
+
};
|
|
28
|
+
const pieUpdate = (config)=>{
|
|
29
|
+
if (!config || !allowAnimation(config)) return false;
|
|
30
|
+
const { ease, duration } = config;
|
|
31
|
+
const durationMs = (duration ?? 1) * 1000;
|
|
32
|
+
return {
|
|
33
|
+
pie: {
|
|
34
|
+
easing: ease,
|
|
35
|
+
duration: durationMs
|
|
36
|
+
},
|
|
37
|
+
rose: {
|
|
38
|
+
easing: ease,
|
|
39
|
+
duration: durationMs
|
|
40
|
+
}
|
|
41
|
+
};
|
|
42
|
+
};
|
|
43
|
+
const pieEnter = (config, atmosphereConfig)=>{
|
|
44
|
+
if (!config || !allowAnimation(config)) return false;
|
|
45
|
+
const { ease, duration } = config;
|
|
46
|
+
const durationMs = (duration ?? 1) * 1000;
|
|
47
|
+
let configByType = {};
|
|
48
|
+
if (atmosphereConfig?.enable && getPrimaryEffect(atmosphereConfig.loop) === VScreenAnimationType.enlarge) configByType = {
|
|
49
|
+
type: 'fadeIn'
|
|
50
|
+
};
|
|
51
|
+
return {
|
|
52
|
+
pie: {
|
|
53
|
+
easing: ease,
|
|
54
|
+
duration: durationMs
|
|
55
|
+
},
|
|
56
|
+
rose: {
|
|
57
|
+
...configByType,
|
|
58
|
+
easing: ease,
|
|
59
|
+
duration: durationMs
|
|
60
|
+
}
|
|
61
|
+
};
|
|
62
|
+
};
|
|
63
|
+
const pieLoop = (config, ignoreFirstNormal)=>{
|
|
64
|
+
if (!config?.enable) return false;
|
|
65
|
+
const { loop, interval = 0 } = config;
|
|
66
|
+
let loopResult = {};
|
|
67
|
+
const startTime = ignoreFirstNormal ? 1000 * interval : 0;
|
|
68
|
+
const { effects: loopEffects = [], ease: loopEase } = loop ?? {};
|
|
69
|
+
const loopDuration = 1;
|
|
70
|
+
const loopEffect = loopEffects[0];
|
|
71
|
+
if (loopEffect === VScreenAnimationType.enlarge) loopResult = [
|
|
72
|
+
{
|
|
73
|
+
channel: {
|
|
74
|
+
outerRadius: {
|
|
75
|
+
from: (...p)=>p[1].attribute.outerRadius,
|
|
76
|
+
to: (...p)=>p[1].attribute.outerRadius + 10
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
startTime,
|
|
80
|
+
oneByOne: 1000 * loopDuration,
|
|
81
|
+
duration: loopDuration / 2 * 1000,
|
|
82
|
+
loop: true,
|
|
83
|
+
easing: loopEase,
|
|
84
|
+
delayAfter: loopDuration / 2 * 1000 + 1000 * interval,
|
|
85
|
+
controlOptions: {
|
|
86
|
+
immediatelyApply: false
|
|
87
|
+
}
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
channel: {
|
|
91
|
+
outerRadius: {
|
|
92
|
+
from: (...p)=>p[1].attribute.outerRadius + 10,
|
|
93
|
+
to: (...p)=>p[1].attribute.outerRadius
|
|
94
|
+
}
|
|
95
|
+
},
|
|
96
|
+
startTime,
|
|
97
|
+
oneByOne: 1000 * loopDuration,
|
|
98
|
+
duration: loopDuration / 2 * 1000,
|
|
99
|
+
easing: loopEase,
|
|
100
|
+
delay: loopDuration / 2 * 1000,
|
|
101
|
+
delayAfter: 1000 * interval,
|
|
102
|
+
loop: true,
|
|
103
|
+
controlOptions: {
|
|
104
|
+
immediatelyApply: false
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
];
|
|
108
|
+
else if (loopEffect === VScreenAnimationType.relocate) {
|
|
109
|
+
const offset = 10;
|
|
110
|
+
loopResult = [
|
|
111
|
+
{
|
|
112
|
+
channel: {
|
|
113
|
+
x: {
|
|
114
|
+
from: (...p)=>p[1].attribute.x,
|
|
115
|
+
to: (...p)=>{
|
|
116
|
+
const angle = (p[1].attribute.startAngle + p[1].attribute.endAngle) / 2;
|
|
117
|
+
return p[1].attribute.x + offset * Math.cos(angle);
|
|
118
|
+
}
|
|
119
|
+
},
|
|
120
|
+
y: {
|
|
121
|
+
from: (...p)=>p[1].attribute.y,
|
|
122
|
+
to: (...p)=>{
|
|
123
|
+
const angle = (p[1].attribute.startAngle + p[1].attribute.endAngle) / 2;
|
|
124
|
+
return p[1].attribute.y + offset * Math.sin(angle);
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
},
|
|
128
|
+
startTime,
|
|
129
|
+
oneByOne: 1000 * loopDuration,
|
|
130
|
+
duration: loopDuration / 2 * 1000,
|
|
131
|
+
loop: true,
|
|
132
|
+
easing: loopEase,
|
|
133
|
+
delayAfter: loopDuration / 2 * 1000 + 1000 * interval,
|
|
134
|
+
controlOptions: {
|
|
135
|
+
immediatelyApply: false
|
|
136
|
+
}
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
channel: {
|
|
140
|
+
x: {
|
|
141
|
+
from: (...p)=>{
|
|
142
|
+
const angle = (p[1].attribute.startAngle + p[1].attribute.endAngle) / 2;
|
|
143
|
+
return p[1].attribute.x + offset * Math.cos(angle);
|
|
144
|
+
},
|
|
145
|
+
to: (...p)=>p[1].attribute.x
|
|
146
|
+
},
|
|
147
|
+
y: {
|
|
148
|
+
from: (...p)=>{
|
|
149
|
+
const angle = (p[1].attribute.startAngle + p[1].attribute.endAngle) / 2;
|
|
150
|
+
return p[1].attribute.y + offset * Math.sin(angle);
|
|
151
|
+
},
|
|
152
|
+
to: (...p)=>p[1].attribute.y
|
|
153
|
+
}
|
|
154
|
+
},
|
|
155
|
+
startTime,
|
|
156
|
+
oneByOne: 1000 * loopDuration,
|
|
157
|
+
duration: loopDuration / 2 * 1000,
|
|
158
|
+
easing: loopEase,
|
|
159
|
+
delay: loopDuration / 2 * 1000,
|
|
160
|
+
delayAfter: 1000 * interval,
|
|
161
|
+
loop: true,
|
|
162
|
+
controlOptions: {
|
|
163
|
+
immediatelyApply: false
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
];
|
|
167
|
+
}
|
|
168
|
+
return {
|
|
169
|
+
pie: loopResult,
|
|
170
|
+
rose: loopResult
|
|
171
|
+
};
|
|
172
|
+
};
|
|
173
|
+
const pieExit = ()=>false;
|
|
174
|
+
export { pieAppear, pieEnter, pieExit, pieLoop, pieUpdate };
|
|
175
|
+
|
|
176
|
+
//# sourceMappingURL=pie.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pipeline/spec/chart/pipes/animation/pie.js","sources":["../../../../../../../src/pipeline/spec/chart/pipes/animation/pie.ts"],"sourcesContent":["import { ChartTypeEnum } from 'src/pipeline/utils'\nimport {\n VScreenAnimationType,\n type PieLikeAppearConfig,\n type PieLikeLoopConfig,\n type PieLikeUpdateConfig,\n} from './types'\nimport { allowAnimation, getPrimaryEffect } from './utils'\nimport { radialPie, scalePie } from './utils/pie'\n\n/**\n * 饼图/环图/玫瑰图 入场动画\n * 动画类型:\n * 1. radial: 角度展开动画\n * 效果:pie/rose 按扇区角度展开。\n * 编排逻辑:pie/rose 同步使用 growAngleIn, rose 额外补 preset = growAngle。\n * 2. scale: 半径展开动画\n * 效果:pie/rose 按半径从内向外展开。\n * 编排逻辑:pie/rose 同步使用 growRadiusIn, 共用 appear 的 easing 和 duration。\n */\nexport const pieAppear = (config: PieLikeAppearConfig | undefined, chartType: string) => {\n if (!config || !allowAnimation(config)) {\n return false\n }\n\n const { effects, ease, duration } = config\n const effect = effects?.[0]\n const durationMs = (duration ?? 1) * 1000\n\n let configByType = {}\n if (effect === VScreenAnimationType.radial) {\n configByType = radialPie()\n } else if (effect === VScreenAnimationType.scale) {\n configByType = scalePie()\n }\n\n const result = {\n pie: {\n ...configByType,\n easing: ease,\n duration: durationMs,\n },\n rose: {\n ...configByType,\n easing: ease,\n duration: durationMs,\n },\n } as any\n\n if (chartType === ChartTypeEnum.Rose && effect === VScreenAnimationType.radial) {\n result.preset = 'growAngle'\n }\n return result\n}\n\n/**\n * 饼图/环图/玫瑰图 更新动画\n * 动画类型:\n * 1. default: 默认更新动画\n * 效果:pie/rose 使用 VChart 默认补间。\n * 编排逻辑:不指定角度或半径动画, 避免和 normal 阶段的通道动画冲突。\n */\nexport const pieUpdate = (config: PieLikeUpdateConfig | undefined) => {\n if (!config || !allowAnimation(config)) {\n return false\n }\n\n const { ease, duration } = config\n const durationMs = (duration ?? 1) * 1000\n\n // 用默认的补间效果即可\n return {\n pie: {\n easing: ease,\n duration: durationMs,\n },\n rose: {\n easing: ease,\n duration: durationMs,\n },\n }\n}\n\n/**\n * 饼图/环图/玫瑰图 新数据进入动画\n * 动画类型:\n * 1. default: 默认 enter 动画\n * 效果:新数据使用 VChart 默认 enter 补间。\n * 编排逻辑:pie/rose 共用 update 的 easing 和 duration。\n * 2. enlarge + rose: 淡入 enter 动画\n * 效果:rose 新数据使用 fadeIn。\n * 编排逻辑:当 normal 的 loop 效果为 enlarge 时启用, 避免 enter 和 enlarge 同时争用 outerRadius 通道。\n */\nexport const pieEnter = (config: PieLikeUpdateConfig | undefined, atmosphereConfig: PieLikeLoopConfig | undefined) => {\n if (!config || !allowAnimation(config)) {\n return false\n }\n const { ease, duration } = config\n const durationMs = (duration ?? 1) * 1000\n // 当normal动画存在且为radius时:\n // 玫瑰图enter不能用默认, 这样会和normal动画的radius视觉通道冲突\n let configByType = {}\n if (atmosphereConfig?.enable && getPrimaryEffect(atmosphereConfig.loop) === VScreenAnimationType.enlarge) {\n configByType = {\n type: 'fadeIn', // 具体类型可以根据视觉效果自定\n }\n }\n return {\n pie: {\n easing: ease,\n duration: durationMs,\n },\n rose: {\n ...configByType,\n easing: ease,\n duration: durationMs,\n },\n }\n}\n\n/**\n * 饼图/环图/玫瑰图 循环动画\n * 动画类型:\n * 1. enlarge: 半径放大动画\n * 效果:扇区 outerRadius 放大 10px 后恢复。\n * 编排逻辑:startTime = appear 存在 ? interval : 0, 前半段放大, 后半段恢复, oneByOne 错峰执行。\n * 2. relocate: 扇区偏移动画\n * 效果:扇区沿中心角方向向外偏移后恢复。\n * 编排逻辑:前半段计算 x/y 偏移, 后半段回到原始 x/y, 一轮结束后等待 interval。\n */\nexport const pieLoop = (config: PieLikeLoopConfig | undefined, ignoreFirstNormal: boolean) => {\n if (!config?.enable) {\n return false\n }\n const { loop, interval = 0 } = config\n let loopResult = {}\n\n // 轮播动画\n // const startTime = 0\n const startTime = ignoreFirstNormal ? interval * 1000 : 0\n const { effects: loopEffects = [], ease: loopEase } = loop ?? {}\n const loopDuration = 1\n const loopEffect = loopEffects[0]\n if (loopEffect === VScreenAnimationType.enlarge) {\n loopResult = [\n {\n channel: {\n outerRadius: {\n from: (...p: any[]) => {\n return p[1].attribute.outerRadius\n },\n to: (...p: any[]) => {\n return p[1].attribute.outerRadius + 10\n },\n },\n },\n startTime,\n oneByOne: loopDuration * 1000, // true -> loopDuration * 1000, 原理有待考究\n duration: (loopDuration / 2) * 1000,\n loop: true,\n easing: loopEase,\n delayAfter: (loopDuration / 2) * 1000 + interval * 1000,\n controlOptions: {\n immediatelyApply: false,\n },\n },\n {\n channel: {\n outerRadius: {\n from: (...p: any[]) => {\n return p[1].attribute.outerRadius + 10\n },\n to: (...p: any[]) => {\n return p[1].attribute.outerRadius\n },\n },\n },\n startTime,\n oneByOne: loopDuration * 1000, // true -> loopDuration * 1000, 原理有待考究\n duration: (loopDuration / 2) * 1000,\n easing: loopEase,\n delay: (loopDuration / 2) * 1000,\n delayAfter: interval * 1000,\n loop: true,\n controlOptions: {\n immediatelyApply: false,\n },\n },\n ]\n } else if (loopEffect === VScreenAnimationType.relocate) {\n const offset = 10\n loopResult = [\n {\n channel: {\n x: {\n from: (...p: any[]) => {\n return p[1].attribute.x\n },\n to: (...p: any[]) => {\n const angle = (p[1].attribute.startAngle + p[1].attribute.endAngle) / 2\n return p[1].attribute.x + offset * Math.cos(angle)\n },\n },\n y: {\n from: (...p: any[]) => {\n return p[1].attribute.y\n },\n to: (...p: any[]) => {\n const angle = (p[1].attribute.startAngle + p[1].attribute.endAngle) / 2\n return p[1].attribute.y + offset * Math.sin(angle)\n },\n },\n },\n startTime,\n oneByOne: loopDuration * 1000, // true -> loopDuration * 1000, 原理有待考究\n duration: (loopDuration / 2) * 1000,\n loop: true,\n easing: loopEase,\n delayAfter: (loopDuration / 2) * 1000 + interval * 1000,\n controlOptions: {\n immediatelyApply: false,\n },\n },\n {\n channel: {\n x: {\n from: (...p: any[]) => {\n const angle = (p[1].attribute.startAngle + p[1].attribute.endAngle) / 2\n return p[1].attribute.x + offset * Math.cos(angle)\n },\n to: (...p: any[]) => {\n return p[1].attribute.x\n },\n },\n y: {\n from: (...p: any[]) => {\n const angle = (p[1].attribute.startAngle + p[1].attribute.endAngle) / 2\n return p[1].attribute.y + offset * Math.sin(angle)\n },\n to: (...p: any[]) => {\n return p[1].attribute.y\n },\n },\n },\n startTime,\n oneByOne: loopDuration * 1000, // true -> loopDuration * 1000, 原理有待考究\n duration: (loopDuration / 2) * 1000,\n easing: loopEase,\n delay: (loopDuration / 2) * 1000,\n delayAfter: interval * 1000,\n loop: true,\n controlOptions: {\n immediatelyApply: false,\n },\n },\n ]\n }\n\n return {\n pie: loopResult,\n rose: loopResult,\n }\n}\n\n/**\n * 饼图/环图/玫瑰图 离场动画\n * 动画类型:\n * 1. none: 无离场动画\n * 效果:不配置自定义 exit。\n * 编排逻辑:返回 false, 关闭该阶段动画配置。\n */\nexport const pieExit = () => {\n return false\n}\n"],"names":["pieAppear","config","chartType","allowAnimation","effects","ease","duration","effect","durationMs","configByType","VScreenAnimationType","radialPie","scalePie","result","ChartTypeEnum","pieUpdate","pieEnter","atmosphereConfig","getPrimaryEffect","pieLoop","ignoreFirstNormal","loop","interval","loopResult","startTime","loopEffects","loopEase","loopDuration","loopEffect","p","offset","angle","Math","pieExit"],"mappings":";;;;AAoBO,MAAMA,YAAY,CAACC,QAAyCC;IACjE,IAAI,CAACD,UAAU,CAACE,eAAeF,SAC7B,OAAO;IAGT,MAAM,EAAEG,OAAO,EAAEC,IAAI,EAAEC,QAAQ,EAAE,GAAGL;IACpC,MAAMM,SAASH,SAAS,CAAC,EAAE;IAC3B,MAAMI,aAAcF,AAAAA,CAAAA,YAAY,KAAK;IAErC,IAAIG,eAAe,CAAC;IACpB,IAAIF,WAAWG,qBAAqB,MAAM,EACxCD,eAAeE;SACV,IAAIJ,WAAWG,qBAAqB,KAAK,EAC9CD,eAAeG;IAGjB,MAAMC,SAAS;QACb,KAAK;YACH,GAAGJ,YAAY;YACf,QAAQJ;YACR,UAAUG;QACZ;QACA,MAAM;YACJ,GAAGC,YAAY;YACf,QAAQJ;YACR,UAAUG;QACZ;IACF;IAEA,IAAIN,cAAcY,cAAc,IAAI,IAAIP,WAAWG,qBAAqB,MAAM,EAC5EG,OAAO,MAAM,GAAG;IAElB,OAAOA;AACT;AASO,MAAME,YAAY,CAACd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F;SACD;IACH;IAEA,OAAO;QACL,KAAKC;QACL,MAAMA;IACR;AACF;AASO,MAAMU,UAAU,IACd"}
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
import type { RadarAppearConfig, RadarLoopConfig, RadarUpdateConfig } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* 雷达图 入场动画
|
|
4
|
+
* 动画类型:
|
|
5
|
+
* 1. radial: 径向裁剪动画
|
|
6
|
+
* 效果:雷达区域按裁剪方式展开。
|
|
7
|
+
* 编排逻辑:使用 clipIn preset, duration 和 easing 由 appear 配置控制。
|
|
8
|
+
* 2. 其他: 生长动画
|
|
9
|
+
* 效果:雷达整体形状从中心增长。
|
|
10
|
+
* 编排逻辑:使用 grow preset, duration 和 easing 由 appear 配置控制。
|
|
11
|
+
*/
|
|
12
|
+
export declare const radarAppear: (config: RadarAppearConfig | undefined) => false | {
|
|
13
|
+
preset: string;
|
|
14
|
+
duration: number;
|
|
15
|
+
easing: string | undefined;
|
|
16
|
+
};
|
|
17
|
+
/**
|
|
18
|
+
* 雷达图 循环动画
|
|
19
|
+
* 动画类型:
|
|
20
|
+
* 1. atmosphere: 点氛围动画
|
|
21
|
+
* 效果:point 执行 breath/reveal/ripple 等氛围效果。
|
|
22
|
+
* 编排逻辑:startTime = appear 存在 ? interval : 0, 持续 1s, 一轮结束后等待 interval。
|
|
23
|
+
* 2. none: 无循环动画
|
|
24
|
+
* 效果:不配置 normal 动画。
|
|
25
|
+
* 编排逻辑:当 atmosphere.effect 为 none 时返回 false。
|
|
26
|
+
*/
|
|
27
|
+
export declare const radarLoop: (config: RadarLoopConfig | undefined, ignoreFirstNormal: boolean) => false | {
|
|
28
|
+
point: {
|
|
29
|
+
controlOptions: {
|
|
30
|
+
immediatelyApply: boolean;
|
|
31
|
+
};
|
|
32
|
+
channel?: undefined;
|
|
33
|
+
loop: boolean;
|
|
34
|
+
startTime: number;
|
|
35
|
+
delayAfter: number;
|
|
36
|
+
duration: number;
|
|
37
|
+
easing: string | undefined;
|
|
38
|
+
} | {
|
|
39
|
+
controlOptions: {
|
|
40
|
+
immediatelyApply: boolean;
|
|
41
|
+
};
|
|
42
|
+
channel: {
|
|
43
|
+
scaleX: {
|
|
44
|
+
from: number;
|
|
45
|
+
to: number;
|
|
46
|
+
};
|
|
47
|
+
scaleY: {
|
|
48
|
+
from: number;
|
|
49
|
+
to: number;
|
|
50
|
+
};
|
|
51
|
+
fillOpacity?: undefined;
|
|
52
|
+
strokeOpacity?: undefined;
|
|
53
|
+
outerBorder?: undefined;
|
|
54
|
+
};
|
|
55
|
+
loop: boolean;
|
|
56
|
+
startTime: number;
|
|
57
|
+
delayAfter: number;
|
|
58
|
+
duration: number;
|
|
59
|
+
easing: string | undefined;
|
|
60
|
+
} | {
|
|
61
|
+
controlOptions: {
|
|
62
|
+
immediatelyApply: boolean;
|
|
63
|
+
};
|
|
64
|
+
channel: {
|
|
65
|
+
fillOpacity: {
|
|
66
|
+
from: number;
|
|
67
|
+
to: number;
|
|
68
|
+
};
|
|
69
|
+
strokeOpacity: {
|
|
70
|
+
from: number;
|
|
71
|
+
to: number;
|
|
72
|
+
};
|
|
73
|
+
scaleX?: undefined;
|
|
74
|
+
scaleY?: undefined;
|
|
75
|
+
outerBorder?: undefined;
|
|
76
|
+
};
|
|
77
|
+
loop: boolean;
|
|
78
|
+
startTime: number;
|
|
79
|
+
delayAfter: number;
|
|
80
|
+
duration: number;
|
|
81
|
+
easing: string | undefined;
|
|
82
|
+
} | {
|
|
83
|
+
controlOptions: {
|
|
84
|
+
immediatelyApply: boolean;
|
|
85
|
+
};
|
|
86
|
+
channel: {
|
|
87
|
+
outerBorder: {
|
|
88
|
+
from: {
|
|
89
|
+
distance: number;
|
|
90
|
+
strokeOpacity: number;
|
|
91
|
+
};
|
|
92
|
+
to: (...args: any[]) => {
|
|
93
|
+
distance: number;
|
|
94
|
+
strokeOpacity: number;
|
|
95
|
+
stroke: any;
|
|
96
|
+
};
|
|
97
|
+
};
|
|
98
|
+
scaleX?: undefined;
|
|
99
|
+
scaleY?: undefined;
|
|
100
|
+
fillOpacity?: undefined;
|
|
101
|
+
strokeOpacity?: undefined;
|
|
102
|
+
};
|
|
103
|
+
loop: boolean;
|
|
104
|
+
startTime: number;
|
|
105
|
+
delayAfter: number;
|
|
106
|
+
duration: number;
|
|
107
|
+
easing: string | undefined;
|
|
108
|
+
};
|
|
109
|
+
};
|
|
110
|
+
/**
|
|
111
|
+
* 雷达图 更新动画
|
|
112
|
+
* 动画类型:
|
|
113
|
+
* 1. default: 默认更新动画
|
|
114
|
+
* 效果:雷达图使用 VChart 默认补间。
|
|
115
|
+
* 编排逻辑:只保留 update 的 duration 和 easing。
|
|
116
|
+
*/
|
|
117
|
+
export declare const radarUpdate: (config: RadarUpdateConfig | undefined) => false | {
|
|
118
|
+
duration: number;
|
|
119
|
+
easing: string | undefined;
|
|
120
|
+
};
|
|
121
|
+
/**
|
|
122
|
+
* 雷达图 离场动画
|
|
123
|
+
* 动画类型:
|
|
124
|
+
* 1. default: 默认离场动画
|
|
125
|
+
* 效果:雷达图使用 VChart 默认补间完成离场。
|
|
126
|
+
* 编排逻辑:共用 exit 的 duration 和 easing, 保持离场节奏和 update 阶段一致。
|
|
127
|
+
*/
|
|
128
|
+
export declare const radarExit: (config: RadarUpdateConfig | undefined) => false | {
|
|
129
|
+
duration: number;
|
|
130
|
+
easing: string | undefined;
|
|
131
|
+
};
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { EFFECT_NONE, allowAnimation, atmospherePoint, getPrimaryEffect, toMs } from "./utils/index.js";
|
|
2
|
+
const radarAppear = (config)=>{
|
|
3
|
+
if (!allowAnimation(config)) return false;
|
|
4
|
+
const effect = getPrimaryEffect(config);
|
|
5
|
+
return {
|
|
6
|
+
preset: 'radial' === effect ? 'clipIn' : 'grow',
|
|
7
|
+
duration: toMs(config?.duration),
|
|
8
|
+
easing: config?.ease
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
const radarLoop = (config, ignoreFirstNormal)=>{
|
|
12
|
+
if (!config?.enable) return false;
|
|
13
|
+
const interval = config.interval ?? 0;
|
|
14
|
+
const startTime = ignoreFirstNormal ? toMs(interval) : 0;
|
|
15
|
+
if ((config.atmosphere?.effect ?? EFFECT_NONE) === EFFECT_NONE) return false;
|
|
16
|
+
return {
|
|
17
|
+
point: {
|
|
18
|
+
loop: true,
|
|
19
|
+
startTime,
|
|
20
|
+
delayAfter: toMs(interval),
|
|
21
|
+
duration: 1000,
|
|
22
|
+
easing: config.atmosphere?.ease,
|
|
23
|
+
...atmospherePoint(config.atmosphere?.effect),
|
|
24
|
+
controlOptions: {
|
|
25
|
+
immediatelyApply: false
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
const radarUpdate = (config)=>{
|
|
31
|
+
if (!allowAnimation(config)) return false;
|
|
32
|
+
return {
|
|
33
|
+
duration: toMs(config?.duration),
|
|
34
|
+
easing: config?.ease
|
|
35
|
+
};
|
|
36
|
+
};
|
|
37
|
+
const radarExit = (config)=>{
|
|
38
|
+
if (!allowAnimation(config)) return false;
|
|
39
|
+
return {
|
|
40
|
+
duration: toMs(config?.duration),
|
|
41
|
+
easing: config?.ease
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
export { radarAppear, radarExit, radarLoop, radarUpdate };
|
|
45
|
+
|
|
46
|
+
//# sourceMappingURL=radar.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pipeline/spec/chart/pipes/animation/radar.js","sources":["../../../../../../../src/pipeline/spec/chart/pipes/animation/radar.ts"],"sourcesContent":["import type { RadarAppearConfig, RadarLoopConfig, RadarUpdateConfig } from './types'\nimport { allowAnimation, EFFECT_NONE, getPrimaryEffect, toMs, atmospherePoint } from './utils'\n\n/**\n * 雷达图 入场动画\n * 动画类型:\n * 1. radial: 径向裁剪动画\n * 效果:雷达区域按裁剪方式展开。\n * 编排逻辑:使用 clipIn preset, duration 和 easing 由 appear 配置控制。\n * 2. 其他: 生长动画\n * 效果:雷达整体形状从中心增长。\n * 编排逻辑:使用 grow preset, duration 和 easing 由 appear 配置控制。\n */\nexport const radarAppear = (config: RadarAppearConfig | undefined) => {\n if (!allowAnimation(config)) {\n return false\n }\n const effect = getPrimaryEffect(config)\n return {\n preset: effect === 'radial' ? 'clipIn' : 'grow',\n duration: toMs(config?.duration),\n easing: config?.ease,\n }\n}\n\n/**\n * 雷达图 循环动画\n * 动画类型:\n * 1. atmosphere: 点氛围动画\n * 效果:point 执行 breath/reveal/ripple 等氛围效果。\n * 编排逻辑:startTime = appear 存在 ? interval : 0, 持续 1s, 一轮结束后等待 interval。\n * 2. none: 无循环动画\n * 效果:不配置 normal 动画。\n * 编排逻辑:当 atmosphere.effect 为 none 时返回 false。\n */\nexport const radarLoop = (config: RadarLoopConfig | undefined, ignoreFirstNormal: boolean) => {\n if (!config?.enable) {\n return false\n }\n const interval = config.interval ?? 0\n const startTime = ignoreFirstNormal ? toMs(interval) : 0\n if ((config.atmosphere?.effect ?? EFFECT_NONE) === EFFECT_NONE) {\n return false\n }\n\n return {\n point: {\n loop: true,\n startTime,\n delayAfter: toMs(interval),\n duration: 1000,\n easing: config.atmosphere?.ease,\n ...atmospherePoint(config.atmosphere?.effect),\n controlOptions: { immediatelyApply: false },\n },\n }\n}\n\n/**\n * 雷达图 更新动画\n * 动画类型:\n * 1. default: 默认更新动画\n * 效果:雷达图使用 VChart 默认补间。\n * 编排逻辑:只保留 update 的 duration 和 easing。\n */\nexport const radarUpdate = (config: RadarUpdateConfig | undefined) => {\n if (!allowAnimation(config)) {\n return false\n }\n return { duration: toMs(config?.duration), easing: config?.ease }\n}\n\n/**\n * 雷达图 离场动画\n * 动画类型:\n * 1. default: 默认离场动画\n * 效果:雷达图使用 VChart 默认补间完成离场。\n * 编排逻辑:共用 exit 的 duration 和 easing, 保持离场节奏和 update 阶段一致。\n */\nexport const radarExit = (config: RadarUpdateConfig | undefined) => {\n if (!allowAnimation(config)) {\n return false\n }\n return { duration: toMs(config?.duration), easing: config?.ease }\n}\n"],"names":["radarAppear","config","allowAnimation","effect","getPrimaryEffect","toMs","radarLoop","ignoreFirstNormal","interval","startTime","EFFECT_NONE","atmospherePoint","radarUpdate","radarExit"],"mappings":";AAaO,MAAMA,cAAc,CAACC;IAC1B,IAAI,CAACC,eAAeD,SAClB,OAAO;IAET,MAAME,SAASC,iBAAiBH;IAChC,OAAO;QACL,QAAQE,AAAW,aAAXA,SAAsB,WAAW;QACzC,UAAUE,KAAKJ,QAAQ;QACvB,QAAQA,QAAQ;IAClB;AACF;AAYO,MAAMK,YAAY,CAACL,QAAqCM;IAC7D,IAAI,CAACN,QAAQ,QACX,OAAO;IAET,MAAMO,WAAWP,OAAO,QAAQ,IAAI;IACpC,MAAMQ,YAAYF,oBAAoBF,KAAKG,YAAY;IACvD,IAAKP,AAAAA,CAAAA,OAAO,UAAU,EAAE,UAAUS,WAAU,MAAOA,aACjD,OAAO;IAGT,OAAO;QACL,OAAO;YACL,MAAM;YACND;YACA,YAAYJ,KAAKG;YACjB,UAAU;YACV,QAAQP,OAAO,UAAU,EAAE;YAC3B,GAAGU,gBAAgBV,OAAO,UAAU,EAAE,OAAO;YAC7C,gBAAgB;gBAAE,kBAAkB;YAAM;QAC5C;IACF;AACF;AASO,MAAMW,cAAc,CAACX;IAC1B,IAAI,CAACC,eAAeD,SAClB,OAAO;IAET,OAAO;QAAE,UAAUI,KAAKJ,QAAQ;QAAW,QAAQA,QAAQ;IAAK;AAClE;AASO,MAAMY,YAAY,CAACZ;IACxB,IAAI,CAACC,eAAeD,SAClB,OAAO;IAET,OAAO;QAAE,UAAUI,KAAKJ,QAAQ;QAAW,QAAQA,QAAQ;IAAK;AAClE"}
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import type { ScatterAppearConfig, ScatterLoopConfig, ScatterUpdateConfig } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* 散点图 入场动画
|
|
4
|
+
* 动画类型:
|
|
5
|
+
* 1. growth: 飞入动画
|
|
6
|
+
* 效果:点从上方移入, 同时恢复透明度和尺寸。
|
|
7
|
+
* 编排逻辑:只作用于 point mark, 使用 appear 的 easing 和 duration。
|
|
8
|
+
* 2. scale: 缩放动画
|
|
9
|
+
* 效果:点中心保持不变, size 从 0 过渡到最终尺寸。
|
|
10
|
+
* 编排逻辑:只作用于 point mark, 使用 appear 的 easing 和 duration。
|
|
11
|
+
*/
|
|
12
|
+
export declare const scatterAppear: (config: ScatterAppearConfig | undefined) => false | {
|
|
13
|
+
point: ({
|
|
14
|
+
loop: boolean;
|
|
15
|
+
startTime: number;
|
|
16
|
+
duration: number;
|
|
17
|
+
easing: string | undefined;
|
|
18
|
+
type: string;
|
|
19
|
+
delayAfter: number;
|
|
20
|
+
options: {
|
|
21
|
+
direction: string;
|
|
22
|
+
orient: string;
|
|
23
|
+
};
|
|
24
|
+
controlOptions: {
|
|
25
|
+
immediatelyApply: boolean;
|
|
26
|
+
};
|
|
27
|
+
channel?: undefined;
|
|
28
|
+
} | {
|
|
29
|
+
loop: boolean;
|
|
30
|
+
startTime: number;
|
|
31
|
+
duration: number;
|
|
32
|
+
easing: string | undefined;
|
|
33
|
+
delayAfter: number;
|
|
34
|
+
channel: {
|
|
35
|
+
fillOpacity: {
|
|
36
|
+
from: number;
|
|
37
|
+
};
|
|
38
|
+
size: {
|
|
39
|
+
from: (...args: any[]) => any;
|
|
40
|
+
};
|
|
41
|
+
};
|
|
42
|
+
controlOptions: {
|
|
43
|
+
immediatelyApply: boolean;
|
|
44
|
+
};
|
|
45
|
+
type?: undefined;
|
|
46
|
+
options?: undefined;
|
|
47
|
+
})[] | {
|
|
48
|
+
loop: boolean;
|
|
49
|
+
startTime: number;
|
|
50
|
+
duration: number;
|
|
51
|
+
easing: string | undefined;
|
|
52
|
+
delayAfter: number;
|
|
53
|
+
channel: {
|
|
54
|
+
size: {
|
|
55
|
+
from: number;
|
|
56
|
+
to: (...args: any[]) => any;
|
|
57
|
+
};
|
|
58
|
+
};
|
|
59
|
+
controlOptions: {
|
|
60
|
+
immediatelyApply: boolean;
|
|
61
|
+
};
|
|
62
|
+
}[];
|
|
63
|
+
};
|
|
64
|
+
/**
|
|
65
|
+
* 散点图 循环动画
|
|
66
|
+
* 动画类型:
|
|
67
|
+
* 1. growth/scale: 点循环动画
|
|
68
|
+
* 效果:复用飞入或缩放动画形成循环。
|
|
69
|
+
* 编排逻辑:startTime = appear 存在 ? interval : 0, 有 loop 时 loopDuration = 1s, 执行后等待 interval + 1s。
|
|
70
|
+
* 2. atmosphere: 点氛围动画
|
|
71
|
+
* 效果:point 执行 breath/reveal/ripple 等氛围效果。
|
|
72
|
+
* 编排逻辑:有 loop 时持续 1s, 无 loop 时持续 2s, 一轮结束后等待 interval。
|
|
73
|
+
*/
|
|
74
|
+
export declare const scatterLoop: (config: ScatterLoopConfig | undefined, ignoreFirstNormal: boolean) => false | {
|
|
75
|
+
point: any[];
|
|
76
|
+
};
|
|
77
|
+
/**
|
|
78
|
+
* 散点图 更新动画
|
|
79
|
+
* 动画类型:
|
|
80
|
+
* 1. default: 默认更新动画
|
|
81
|
+
* 效果:point 使用 VChart 默认补间。
|
|
82
|
+
* 编排逻辑:只保留 update 的 easing 和 duration。
|
|
83
|
+
*/
|
|
84
|
+
export declare const scatterUpdate: (config: ScatterUpdateConfig | undefined) => false | {
|
|
85
|
+
point: {
|
|
86
|
+
duration: number;
|
|
87
|
+
easing: string | undefined;
|
|
88
|
+
};
|
|
89
|
+
};
|
|
90
|
+
/**
|
|
91
|
+
* 散点图 离场动画
|
|
92
|
+
* 动画类型:
|
|
93
|
+
* 1. default: 默认离场动画
|
|
94
|
+
* 效果:point 使用 VChart 默认补间完成离场。
|
|
95
|
+
* 编排逻辑:共用 exit 的 easing 和 duration, 保持离场节奏和 update 阶段一致。
|
|
96
|
+
*/
|
|
97
|
+
export declare const scatterExit: (config: ScatterUpdateConfig | undefined) => false | {
|
|
98
|
+
point: {
|
|
99
|
+
duration: number;
|
|
100
|
+
easing: string | undefined;
|
|
101
|
+
};
|
|
102
|
+
};
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { EFFECT_NONE, allowAnimation, atmospherePoint, getPrimaryEffect, toMs } from "./utils/index.js";
|
|
2
|
+
import { flyInScatter, scaleInScatter } from "./utils/scatter.js";
|
|
3
|
+
const scatterAppear = (config)=>{
|
|
4
|
+
if (!allowAnimation(config)) return false;
|
|
5
|
+
const effect = getPrimaryEffect(config);
|
|
6
|
+
const duration = toMs(config?.duration);
|
|
7
|
+
const result = 'growth' === effect ? flyInScatter(duration, config?.ease) : 'scale' === effect ? scaleInScatter(duration, config?.ease) : [];
|
|
8
|
+
return {
|
|
9
|
+
point: result
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
const scatterLoop = (config, ignoreFirstNormal)=>{
|
|
13
|
+
if (!config?.enable) return false;
|
|
14
|
+
const interval = config.interval ?? 0;
|
|
15
|
+
const startTime = ignoreFirstNormal ? toMs(interval) : 0;
|
|
16
|
+
const effect = getPrimaryEffect(config.loop);
|
|
17
|
+
const loopDuration = effect === EFFECT_NONE ? 0 : 1000;
|
|
18
|
+
const atmosphereDuration = effect === EFFECT_NONE ? 2000 : 1000;
|
|
19
|
+
const result = [];
|
|
20
|
+
if ('growth' === effect) result.push(...flyInScatter(loopDuration, config.loop?.ease, true, startTime, toMs(interval + 1)));
|
|
21
|
+
else if ('scale' === effect) result.push(...scaleInScatter(loopDuration, config.loop?.ease, true, startTime, toMs(interval + 1)));
|
|
22
|
+
if ((config.atmosphere?.effect ?? EFFECT_NONE) !== EFFECT_NONE) result.push({
|
|
23
|
+
loop: true,
|
|
24
|
+
startTime,
|
|
25
|
+
delayAfter: toMs(interval),
|
|
26
|
+
duration: atmosphereDuration,
|
|
27
|
+
easing: config.atmosphere?.ease,
|
|
28
|
+
...atmospherePoint(config.atmosphere?.effect),
|
|
29
|
+
controlOptions: {
|
|
30
|
+
immediatelyApply: false
|
|
31
|
+
}
|
|
32
|
+
});
|
|
33
|
+
return {
|
|
34
|
+
point: result
|
|
35
|
+
};
|
|
36
|
+
};
|
|
37
|
+
const scatterUpdate = (config)=>{
|
|
38
|
+
if (!allowAnimation(config)) return false;
|
|
39
|
+
return {
|
|
40
|
+
point: {
|
|
41
|
+
duration: toMs(config?.duration),
|
|
42
|
+
easing: config?.ease
|
|
43
|
+
}
|
|
44
|
+
};
|
|
45
|
+
};
|
|
46
|
+
const scatterExit = (config)=>{
|
|
47
|
+
if (!allowAnimation(config)) return false;
|
|
48
|
+
return {
|
|
49
|
+
point: {
|
|
50
|
+
duration: toMs(config?.duration),
|
|
51
|
+
easing: config?.ease
|
|
52
|
+
}
|
|
53
|
+
};
|
|
54
|
+
};
|
|
55
|
+
export { scatterAppear, scatterExit, scatterLoop, scatterUpdate };
|
|
56
|
+
|
|
57
|
+
//# sourceMappingURL=scatter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pipeline/spec/chart/pipes/animation/scatter.js","sources":["../../../../../../../src/pipeline/spec/chart/pipes/animation/scatter.ts"],"sourcesContent":["import type { ScatterAppearConfig, ScatterLoopConfig, ScatterUpdateConfig } from './types'\nimport { allowAnimation, EFFECT_NONE, getPrimaryEffect, toMs, atmospherePoint } from './utils'\nimport { flyInScatter, scaleInScatter } from './utils/scatter'\n\n/**\n * 散点图 入场动画\n * 动画类型:\n * 1. growth: 飞入动画\n * 效果:点从上方移入, 同时恢复透明度和尺寸。\n * 编排逻辑:只作用于 point mark, 使用 appear 的 easing 和 duration。\n * 2. scale: 缩放动画\n * 效果:点中心保持不变, size 从 0 过渡到最终尺寸。\n * 编排逻辑:只作用于 point mark, 使用 appear 的 easing 和 duration。\n */\nexport const scatterAppear = (config: ScatterAppearConfig | undefined) => {\n if (!allowAnimation(config)) {\n return false\n }\n const effect = getPrimaryEffect(config)\n const duration = toMs(config?.duration)\n const result =\n effect === 'growth'\n ? flyInScatter(duration, config?.ease)\n : effect === 'scale'\n ? scaleInScatter(duration, config?.ease)\n : []\n return { point: result }\n}\n\n/**\n * 散点图 循环动画\n * 动画类型:\n * 1. growth/scale: 点循环动画\n * 效果:复用飞入或缩放动画形成循环。\n * 编排逻辑:startTime = appear 存在 ? interval : 0, 有 loop 时 loopDuration = 1s, 执行后等待 interval + 1s。\n * 2. atmosphere: 点氛围动画\n * 效果:point 执行 breath/reveal/ripple 等氛围效果。\n * 编排逻辑:有 loop 时持续 1s, 无 loop 时持续 2s, 一轮结束后等待 interval。\n */\nexport const scatterLoop = (config: ScatterLoopConfig | undefined, ignoreFirstNormal: boolean) => {\n if (!config?.enable) {\n return false\n }\n const interval = config.interval ?? 0\n const startTime = ignoreFirstNormal ? toMs(interval) : 0\n const effect = getPrimaryEffect(config.loop)\n const loopDuration = effect === EFFECT_NONE ? 0 : 1000\n const atmosphereDuration = effect === EFFECT_NONE ? 2000 : 1000\n const result: any[] = []\n\n if (effect === 'growth') {\n result.push(...flyInScatter(loopDuration, config.loop?.ease, true, startTime, toMs(interval + 1)))\n } else if (effect === 'scale') {\n result.push(...scaleInScatter(loopDuration, config.loop?.ease, true, startTime, toMs(interval + 1)))\n }\n\n if ((config.atmosphere?.effect ?? EFFECT_NONE) !== EFFECT_NONE) {\n result.push({\n loop: true,\n startTime,\n delayAfter: toMs(interval),\n duration: atmosphereDuration,\n easing: config.atmosphere?.ease,\n ...atmospherePoint(config.atmosphere?.effect),\n controlOptions: { immediatelyApply: false },\n })\n }\n\n return { point: result }\n}\n\n/**\n * 散点图 更新动画\n * 动画类型:\n * 1. default: 默认更新动画\n * 效果:point 使用 VChart 默认补间。\n * 编排逻辑:只保留 update 的 easing 和 duration。\n */\nexport const scatterUpdate = (config: ScatterUpdateConfig | undefined) => {\n if (!allowAnimation(config)) {\n return false\n }\n return { point: { duration: toMs(config?.duration), easing: config?.ease } }\n}\n\n/**\n * 散点图 离场动画\n * 动画类型:\n * 1. default: 默认离场动画\n * 效果:point 使用 VChart 默认补间完成离场。\n * 编排逻辑:共用 exit 的 easing 和 duration, 保持离场节奏和 update 阶段一致。\n */\nexport const scatterExit = (config: ScatterUpdateConfig | undefined) => {\n if (!allowAnimation(config)) {\n return false\n }\n return { point: { duration: toMs(config?.duration), easing: config?.ease } }\n}\n"],"names":["scatterAppear","config","allowAnimation","effect","getPrimaryEffect","duration","toMs","result","flyInScatter","scaleInScatter","scatterLoop","ignoreFirstNormal","interval","startTime","loopDuration","EFFECT_NONE","atmosphereDuration","atmospherePoint","scatterUpdate","scatterExit"],"mappings":";;AAcO,MAAMA,gBAAgB,CAACC;IAC5B,IAAI,CAACC,eAAeD,SAClB,OAAO;IAET,MAAME,SAASC,iBAAiBH;IAChC,MAAMI,WAAWC,KAAKL,QAAQ;IAC9B,MAAMM,SACJJ,AAAW,aAAXA,SACIK,aAAaH,UAAUJ,QAAQ,QAC/BE,AAAW,YAAXA,SACEM,eAAeJ,UAAUJ,QAAQ,QACjC,EAAE;IACV,OAAO;QAAE,OAAOM;IAAO;AACzB;AAYO,MAAMG,cAAc,CAACT,QAAuCU;IACjE,IAAI,CAACV,QAAQ,QACX,OAAO;IAET,MAAMW,WAAWX,OAAO,QAAQ,IAAI;IACpC,MAAMY,YAAYF,oBAAoBL,KAAKM,YAAY;IACvD,MAAMT,SAASC,iBAAiBH,OAAO,IAAI;IAC3C,MAAMa,eAAeX,WAAWY,cAAc,IAAI;IAClD,MAAMC,qBAAqBb,WAAWY,cAAc,OAAO;IAC3D,MAAMR,SAAgB,EAAE;IAExB,IAAIJ,AAAW,aAAXA,QACFI,OAAO,IAAI,IAAIC,aAAaM,cAAcb,OAAO,IAAI,EAAE,MAAM,MAAMY,WAAWP,KAAKM,WAAW;SACzF,IAAIT,AAAW,YAAXA,QACTI,OAAO,IAAI,IAAIE,eAAeK,cAAcb,OAAO,IAAI,EAAE,MAAM,MAAMY,WAAWP,KAAKM,WAAW;IAGlG,IAAKX,AAAAA,CAAAA,OAAO,UAAU,EAAE,UAAUc,WAAU,MAAOA,aACjDR,OAA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