@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,130 @@
|
|
|
1
|
+
export declare const VScreenAnimationType: {
|
|
2
|
+
readonly growth: "growth";
|
|
3
|
+
readonly load: "load";
|
|
4
|
+
readonly moveIn: "moveIn";
|
|
5
|
+
readonly highLight: "highLight";
|
|
6
|
+
readonly none: "none";
|
|
7
|
+
readonly ripple: "ripple";
|
|
8
|
+
readonly breath: "breath";
|
|
9
|
+
readonly reveal: "reveal";
|
|
10
|
+
readonly scale: "scale";
|
|
11
|
+
readonly radial: "radial";
|
|
12
|
+
readonly enlarge: "enlarge";
|
|
13
|
+
readonly relocate: "relocate";
|
|
14
|
+
readonly wave: "wave";
|
|
15
|
+
readonly waveGrowth: "waveGrowth";
|
|
16
|
+
};
|
|
17
|
+
export type AnimationEffect = (typeof VScreenAnimationType)[keyof typeof VScreenAnimationType];
|
|
18
|
+
export type EffectConfig<E extends AnimationEffect> = {
|
|
19
|
+
enable?: boolean;
|
|
20
|
+
effects?: E[];
|
|
21
|
+
ease?: string;
|
|
22
|
+
duration?: number;
|
|
23
|
+
color?: string;
|
|
24
|
+
};
|
|
25
|
+
export type AnimationEffectConfig = EffectConfig<AnimationEffect>;
|
|
26
|
+
export type AtmosphereConfig<E extends AnimationEffect = never> = {
|
|
27
|
+
effect?: E;
|
|
28
|
+
ease?: string;
|
|
29
|
+
color?: string;
|
|
30
|
+
};
|
|
31
|
+
export type LoopConfig<LE extends AnimationEffect, AE extends AnimationEffect = never> = {
|
|
32
|
+
enable?: boolean;
|
|
33
|
+
interval?: number;
|
|
34
|
+
loop?: EffectConfig<LE>;
|
|
35
|
+
atmosphere?: AtmosphereConfig<AE>;
|
|
36
|
+
};
|
|
37
|
+
export type AnimationLoopConfig = LoopConfig<AnimationEffect, AnimationEffect>;
|
|
38
|
+
type AnimationParams<A, U, L> = {
|
|
39
|
+
appear?: A;
|
|
40
|
+
update?: U;
|
|
41
|
+
loop?: L;
|
|
42
|
+
};
|
|
43
|
+
export type BarLikeAppearConfig = EffectConfig<'growth'>;
|
|
44
|
+
export type BarLikeUpdateConfig = EffectConfig<'growth' | 'moveIn'>;
|
|
45
|
+
export type BarLikeLoopConfig = LoopConfig<'highLight' | 'growth' | 'moveIn' | 'none', 'ripple' | 'reveal' | 'breath'>;
|
|
46
|
+
export type LineAreaAppearConfig = EffectConfig<'load' | 'growth'>;
|
|
47
|
+
export type LineAreaUpdateConfig = EffectConfig<'growth'>;
|
|
48
|
+
export type LineAreaLoopConfig = LoopConfig<'load' | 'growth' | 'none', 'ripple' | 'reveal' | 'breath'>;
|
|
49
|
+
export type ScatterAppearConfig = EffectConfig<'growth' | 'scale'>;
|
|
50
|
+
export type ScatterUpdateConfig = EffectConfig<'growth'>;
|
|
51
|
+
export type ScatterLoopConfig = LoopConfig<'growth' | 'scale' | 'none', 'ripple' | 'reveal' | 'breath'>;
|
|
52
|
+
export type PieLikeAppearConfig = EffectConfig<'radial' | 'scale'>;
|
|
53
|
+
export type PieLikeUpdateConfig = EffectConfig<'radial'>;
|
|
54
|
+
export type PieLikeLoopConfig = LoopConfig<'enlarge' | 'relocate'>;
|
|
55
|
+
export type RadarAppearConfig = EffectConfig<'radial' | 'scale'>;
|
|
56
|
+
export type RadarUpdateConfig = EffectConfig<'growth'>;
|
|
57
|
+
export type RadarLoopConfig = {
|
|
58
|
+
enable?: boolean;
|
|
59
|
+
interval?: number;
|
|
60
|
+
atmosphere?: AtmosphereConfig<'ripple' | 'reveal' | 'breath'>;
|
|
61
|
+
};
|
|
62
|
+
export type BarLikeAnimation = {
|
|
63
|
+
enable?: boolean;
|
|
64
|
+
params?: AnimationParams<BarLikeAppearConfig, BarLikeUpdateConfig, BarLikeLoopConfig>;
|
|
65
|
+
};
|
|
66
|
+
export type LineAreaAnimation = {
|
|
67
|
+
enable?: boolean;
|
|
68
|
+
params?: AnimationParams<LineAreaAppearConfig, LineAreaUpdateConfig, LineAreaLoopConfig>;
|
|
69
|
+
};
|
|
70
|
+
export type ScatterAnimation = {
|
|
71
|
+
enable?: boolean;
|
|
72
|
+
params?: AnimationParams<ScatterAppearConfig, ScatterUpdateConfig, ScatterLoopConfig>;
|
|
73
|
+
};
|
|
74
|
+
export type PieLikeAnimation = {
|
|
75
|
+
enable?: boolean;
|
|
76
|
+
params?: AnimationParams<PieLikeAppearConfig, PieLikeUpdateConfig, PieLikeLoopConfig>;
|
|
77
|
+
};
|
|
78
|
+
export type RadarAnimation = {
|
|
79
|
+
enable?: boolean;
|
|
80
|
+
params?: AnimationParams<RadarAppearConfig, RadarUpdateConfig, RadarLoopConfig>;
|
|
81
|
+
};
|
|
82
|
+
export type BarLikeChartType = 'bar' | 'barPercent' | 'barParallel' | 'column' | 'columnPercent' | 'columnParallel';
|
|
83
|
+
export type LineAreaChartType = 'line' | 'area' | 'areaPercent';
|
|
84
|
+
export type PieLikeChartType = 'pie' | 'donut' | 'rose' | 'roseParallel';
|
|
85
|
+
export type SupportedAnimationChartType = BarLikeChartType | LineAreaChartType | PieLikeChartType | 'scatter' | 'radar';
|
|
86
|
+
export type ChartAnimationByChartType<T extends SupportedAnimationChartType> = T extends BarLikeChartType ? BarLikeAnimation : T extends LineAreaChartType ? LineAreaAnimation : T extends PieLikeChartType ? PieLikeAnimation : T extends 'scatter' ? ScatterAnimation : RadarAnimation;
|
|
87
|
+
export type ChartAnimation = BarLikeAnimation | LineAreaAnimation | ScatterAnimation | PieLikeAnimation | RadarAnimation;
|
|
88
|
+
export type ChartAppearConfigByChartType<T extends SupportedAnimationChartType> = NonNullable<NonNullable<ChartAnimationByChartType<T>['params']>['appear']>;
|
|
89
|
+
export type ChartUpdateConfigByChartType<T extends SupportedAnimationChartType> = NonNullable<NonNullable<ChartAnimationByChartType<T>['params']>['update']>;
|
|
90
|
+
export type ChartLoopConfigByChartType<T extends SupportedAnimationChartType> = NonNullable<NonNullable<ChartAnimationByChartType<T>['params']>['loop']>;
|
|
91
|
+
export type BarAppearConfig = ChartAppearConfigByChartType<'bar'>;
|
|
92
|
+
export type BarUpdateConfig = ChartUpdateConfigByChartType<'bar'>;
|
|
93
|
+
export type BarLoopConfig = ChartLoopConfigByChartType<'bar'>;
|
|
94
|
+
export type BarPercentAppearConfig = ChartAppearConfigByChartType<'barPercent'>;
|
|
95
|
+
export type BarPercentUpdateConfig = ChartUpdateConfigByChartType<'barPercent'>;
|
|
96
|
+
export type BarPercentLoopConfig = ChartLoopConfigByChartType<'barPercent'>;
|
|
97
|
+
export type BarParallelAppearConfig = ChartAppearConfigByChartType<'barParallel'>;
|
|
98
|
+
export type BarParallelUpdateConfig = ChartUpdateConfigByChartType<'barParallel'>;
|
|
99
|
+
export type BarParallelLoopConfig = ChartLoopConfigByChartType<'barParallel'>;
|
|
100
|
+
export type ColumnAppearConfig = ChartAppearConfigByChartType<'column'>;
|
|
101
|
+
export type ColumnUpdateConfig = ChartUpdateConfigByChartType<'column'>;
|
|
102
|
+
export type ColumnLoopConfig = ChartLoopConfigByChartType<'column'>;
|
|
103
|
+
export type ColumnPercentAppearConfig = ChartAppearConfigByChartType<'columnPercent'>;
|
|
104
|
+
export type ColumnPercentUpdateConfig = ChartUpdateConfigByChartType<'columnPercent'>;
|
|
105
|
+
export type ColumnPercentLoopConfig = ChartLoopConfigByChartType<'columnPercent'>;
|
|
106
|
+
export type ColumnParallelAppearConfig = ChartAppearConfigByChartType<'columnParallel'>;
|
|
107
|
+
export type ColumnParallelUpdateConfig = ChartUpdateConfigByChartType<'columnParallel'>;
|
|
108
|
+
export type ColumnParallelLoopConfig = ChartLoopConfigByChartType<'columnParallel'>;
|
|
109
|
+
export type LineAppearConfig = ChartAppearConfigByChartType<'line'>;
|
|
110
|
+
export type LineUpdateConfig = ChartUpdateConfigByChartType<'line'>;
|
|
111
|
+
export type LineLoopConfig = ChartLoopConfigByChartType<'line'>;
|
|
112
|
+
export type AreaAppearConfig = ChartAppearConfigByChartType<'area'>;
|
|
113
|
+
export type AreaUpdateConfig = ChartUpdateConfigByChartType<'area'>;
|
|
114
|
+
export type AreaLoopConfig = ChartLoopConfigByChartType<'area'>;
|
|
115
|
+
export type AreaPercentAppearConfig = ChartAppearConfigByChartType<'areaPercent'>;
|
|
116
|
+
export type AreaPercentUpdateConfig = ChartUpdateConfigByChartType<'areaPercent'>;
|
|
117
|
+
export type AreaPercentLoopConfig = ChartLoopConfigByChartType<'areaPercent'>;
|
|
118
|
+
export type PieAppearConfig = ChartAppearConfigByChartType<'pie'>;
|
|
119
|
+
export type PieUpdateConfig = ChartUpdateConfigByChartType<'pie'>;
|
|
120
|
+
export type PieLoopConfig = ChartLoopConfigByChartType<'pie'>;
|
|
121
|
+
export type DonutAppearConfig = ChartAppearConfigByChartType<'donut'>;
|
|
122
|
+
export type DonutUpdateConfig = ChartUpdateConfigByChartType<'donut'>;
|
|
123
|
+
export type DonutLoopConfig = ChartLoopConfigByChartType<'donut'>;
|
|
124
|
+
export type RoseAppearConfig = ChartAppearConfigByChartType<'rose'>;
|
|
125
|
+
export type RoseUpdateConfig = ChartUpdateConfigByChartType<'rose'>;
|
|
126
|
+
export type RoseLoopConfig = ChartLoopConfigByChartType<'rose'>;
|
|
127
|
+
export type RoseParallelAppearConfig = ChartAppearConfigByChartType<'roseParallel'>;
|
|
128
|
+
export type RoseParallelUpdateConfig = ChartUpdateConfigByChartType<'roseParallel'>;
|
|
129
|
+
export type RoseParallelLoopConfig = ChartLoopConfigByChartType<'roseParallel'>;
|
|
130
|
+
export {};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
const VScreenAnimationType = {
|
|
2
|
+
growth: 'growth',
|
|
3
|
+
load: 'load',
|
|
4
|
+
moveIn: 'moveIn',
|
|
5
|
+
highLight: 'highLight',
|
|
6
|
+
none: 'none',
|
|
7
|
+
ripple: 'ripple',
|
|
8
|
+
breath: 'breath',
|
|
9
|
+
reveal: 'reveal',
|
|
10
|
+
scale: 'scale',
|
|
11
|
+
radial: 'radial',
|
|
12
|
+
enlarge: 'enlarge',
|
|
13
|
+
relocate: 'relocate',
|
|
14
|
+
wave: 'wave',
|
|
15
|
+
waveGrowth: 'waveGrowth'
|
|
16
|
+
};
|
|
17
|
+
export { VScreenAnimationType };
|
|
18
|
+
|
|
19
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pipeline/spec/chart/pipes/animation/types.js","sources":["../../../../../../../src/pipeline/spec/chart/pipes/animation/types.ts"],"sourcesContent":["export const VScreenAnimationType = {\n growth: 'growth', // 生长\n load: 'load', // 加载\n moveIn: 'moveIn', // 移入\n highLight: 'highLight', // 分组高亮\n none: 'none', // 无动画\n ripple: 'ripple', // 涟漪\n breath: 'breath', // 呼吸\n reveal: 'reveal', // 显隐\n scale: 'scale', // 缩放\n radial: 'radial', // 径向\n enlarge: 'enlarge', // 改变尺寸\n relocate: 'relocate', // 改变中心\n wave: 'wave', // 波浪\n waveGrowth: 'waveGrowth', // 波浪生长\n} as const\n\nexport type AnimationEffect = (typeof VScreenAnimationType)[keyof typeof VScreenAnimationType]\n\nexport type EffectConfig<E extends AnimationEffect> = {\n enable?: boolean\n effects?: E[]\n ease?: string\n duration?: number\n color?: string\n}\n\nexport type AnimationEffectConfig = EffectConfig<AnimationEffect>\nexport type AtmosphereConfig<E extends AnimationEffect = never> = { effect?: E; ease?: string; color?: string }\nexport type LoopConfig<LE extends AnimationEffect, AE extends AnimationEffect = never> = {\n enable?: boolean\n interval?: number\n loop?: EffectConfig<LE>\n atmosphere?: AtmosphereConfig<AE>\n}\nexport type AnimationLoopConfig = LoopConfig<AnimationEffect, AnimationEffect>\n\ntype AnimationParams<A, U, L> = {\n appear?: A\n update?: U\n loop?: L\n}\n\nexport type BarLikeAppearConfig = EffectConfig<'growth'>\nexport type BarLikeUpdateConfig = EffectConfig<'growth' | 'moveIn'>\nexport type BarLikeLoopConfig = LoopConfig<'highLight' | 'growth' | 'moveIn' | 'none', 'ripple' | 'reveal' | 'breath'>\n\nexport type LineAreaAppearConfig = EffectConfig<'load' | 'growth'>\nexport type LineAreaUpdateConfig = EffectConfig<'growth'>\nexport type LineAreaLoopConfig = LoopConfig<'load' | 'growth' | 'none', 'ripple' | 'reveal' | 'breath'>\n\nexport type ScatterAppearConfig = EffectConfig<'growth' | 'scale'>\nexport type ScatterUpdateConfig = EffectConfig<'growth'>\nexport type ScatterLoopConfig = LoopConfig<'growth' | 'scale' | 'none', 'ripple' | 'reveal' | 'breath'>\n\nexport type PieLikeAppearConfig = EffectConfig<'radial' | 'scale'>\nexport type PieLikeUpdateConfig = EffectConfig<'radial'>\nexport type PieLikeLoopConfig = LoopConfig<'enlarge' | 'relocate'>\n\nexport type RadarAppearConfig = EffectConfig<'radial' | 'scale'>\nexport type RadarUpdateConfig = EffectConfig<'growth'>\nexport type RadarLoopConfig = {\n enable?: boolean\n interval?: number\n atmosphere?: AtmosphereConfig<'ripple' | 'reveal' | 'breath'>\n}\n\n// 堆叠/百分比/并列条、柱图\nexport type BarLikeAnimation = {\n enable?: boolean\n params?: AnimationParams<BarLikeAppearConfig, BarLikeUpdateConfig, BarLikeLoopConfig>\n}\n\n// 折线、面积、百分比面积\nexport type LineAreaAnimation = {\n enable?: boolean\n params?: AnimationParams<LineAreaAppearConfig, LineAreaUpdateConfig, LineAreaLoopConfig>\n}\n\n// 散点\nexport type ScatterAnimation = {\n enable?: boolean\n params?: AnimationParams<ScatterAppearConfig, ScatterUpdateConfig, ScatterLoopConfig>\n}\n\n// 饼、环、玫瑰\nexport type PieLikeAnimation = {\n enable?: boolean\n params?: AnimationParams<PieLikeAppearConfig, PieLikeUpdateConfig, PieLikeLoopConfig>\n}\n\n// 雷达\nexport type RadarAnimation = {\n enable?: boolean\n params?: AnimationParams<RadarAppearConfig, RadarUpdateConfig, RadarLoopConfig>\n}\n\nexport type BarLikeChartType = 'bar' | 'barPercent' | 'barParallel' | 'column' | 'columnPercent' | 'columnParallel'\nexport type LineAreaChartType = 'line' | 'area' | 'areaPercent'\nexport type PieLikeChartType = 'pie' | 'donut' | 'rose' | 'roseParallel'\nexport type SupportedAnimationChartType = BarLikeChartType | LineAreaChartType | PieLikeChartType | 'scatter' | 'radar'\n\nexport type ChartAnimationByChartType<T extends SupportedAnimationChartType> = T extends BarLikeChartType\n ? BarLikeAnimation\n : T extends LineAreaChartType\n ? LineAreaAnimation\n : T extends PieLikeChartType\n ? PieLikeAnimation\n : T extends 'scatter'\n ? ScatterAnimation\n : RadarAnimation\n\nexport type ChartAnimation = BarLikeAnimation | LineAreaAnimation | ScatterAnimation | PieLikeAnimation | RadarAnimation\n\nexport type ChartAppearConfigByChartType<T extends SupportedAnimationChartType> = NonNullable<\n NonNullable<ChartAnimationByChartType<T>['params']>['appear']\n>\nexport type ChartUpdateConfigByChartType<T extends SupportedAnimationChartType> = NonNullable<\n NonNullable<ChartAnimationByChartType<T>['params']>['update']\n>\nexport type ChartLoopConfigByChartType<T extends SupportedAnimationChartType> = NonNullable<\n NonNullable<ChartAnimationByChartType<T>['params']>['loop']\n>\n\nexport type BarAppearConfig = ChartAppearConfigByChartType<'bar'>\nexport type BarUpdateConfig = ChartUpdateConfigByChartType<'bar'>\nexport type BarLoopConfig = ChartLoopConfigByChartType<'bar'>\nexport type BarPercentAppearConfig = ChartAppearConfigByChartType<'barPercent'>\nexport type BarPercentUpdateConfig = ChartUpdateConfigByChartType<'barPercent'>\nexport type BarPercentLoopConfig = ChartLoopConfigByChartType<'barPercent'>\nexport type BarParallelAppearConfig = ChartAppearConfigByChartType<'barParallel'>\nexport type BarParallelUpdateConfig = ChartUpdateConfigByChartType<'barParallel'>\nexport type BarParallelLoopConfig = ChartLoopConfigByChartType<'barParallel'>\nexport type ColumnAppearConfig = ChartAppearConfigByChartType<'column'>\nexport type ColumnUpdateConfig = ChartUpdateConfigByChartType<'column'>\nexport type ColumnLoopConfig = ChartLoopConfigByChartType<'column'>\nexport type ColumnPercentAppearConfig = ChartAppearConfigByChartType<'columnPercent'>\nexport type ColumnPercentUpdateConfig = ChartUpdateConfigByChartType<'columnPercent'>\nexport type ColumnPercentLoopConfig = ChartLoopConfigByChartType<'columnPercent'>\nexport type ColumnParallelAppearConfig = ChartAppearConfigByChartType<'columnParallel'>\nexport type ColumnParallelUpdateConfig = ChartUpdateConfigByChartType<'columnParallel'>\nexport type ColumnParallelLoopConfig = ChartLoopConfigByChartType<'columnParallel'>\nexport type LineAppearConfig = ChartAppearConfigByChartType<'line'>\nexport type LineUpdateConfig = ChartUpdateConfigByChartType<'line'>\nexport type LineLoopConfig = ChartLoopConfigByChartType<'line'>\nexport type AreaAppearConfig = ChartAppearConfigByChartType<'area'>\nexport type AreaUpdateConfig = ChartUpdateConfigByChartType<'area'>\nexport type AreaLoopConfig = ChartLoopConfigByChartType<'area'>\nexport type AreaPercentAppearConfig = ChartAppearConfigByChartType<'areaPercent'>\nexport type AreaPercentUpdateConfig = ChartUpdateConfigByChartType<'areaPercent'>\nexport type AreaPercentLoopConfig = ChartLoopConfigByChartType<'areaPercent'>\nexport type PieAppearConfig = ChartAppearConfigByChartType<'pie'>\nexport type PieUpdateConfig = ChartUpdateConfigByChartType<'pie'>\nexport type PieLoopConfig = ChartLoopConfigByChartType<'pie'>\nexport type DonutAppearConfig = ChartAppearConfigByChartType<'donut'>\nexport type DonutUpdateConfig = ChartUpdateConfigByChartType<'donut'>\nexport type DonutLoopConfig = ChartLoopConfigByChartType<'donut'>\nexport type RoseAppearConfig = ChartAppearConfigByChartType<'rose'>\nexport type RoseUpdateConfig = ChartUpdateConfigByChartType<'rose'>\nexport type RoseLoopConfig = ChartLoopConfigByChartType<'rose'>\nexport type RoseParallelAppearConfig = ChartAppearConfigByChartType<'roseParallel'>\nexport type RoseParallelUpdateConfig = ChartUpdateConfigByChartType<'roseParallel'>\nexport type RoseParallelLoopConfig = ChartLoopConfigByChartType<'roseParallel'>\n"],"names":["VScreenAnimationType"],"mappings":"AAAO,MAAMA,uBAAuB;IAClC,QAAQ;IACR,MAAM;IACN,QAAQ;IACR,WAAW;IACX,MAAM;IACN,QAAQ;IACR,QAAQ;IACR,QAAQ;IACR,OAAO;IACP,QAAQ;IACR,SAAS;IACT,UAAU;IACV,MAAM;IACN,YAAY;AACd"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export { atmosphereColorToFill, atmosphereColorToStroke, transform2VChartColor } from './barColor';
|
|
2
|
+
export { getGroupCountFromSpec, groupHighLightBar } from './barGroup';
|
|
3
|
+
export { fadeInBar, growBar, isHorizontalBar, moveInBar, moveOutBar } from './barMotion';
|
|
4
|
+
/**
|
|
5
|
+
* @description 根据循环动画效果类型生成柱图 normal 阶段动画配置。
|
|
6
|
+
* @param effect 循环动画效果类型。
|
|
7
|
+
* @param chartType 图表类型。
|
|
8
|
+
* @param spec 当前 VChart spec。
|
|
9
|
+
* @returns 柱图 normal 阶段动画配置。
|
|
10
|
+
*/
|
|
11
|
+
export declare const getLoopResult: (effect: string, chartType: string, spec: any) => {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { VScreenAnimationType } from "../types.js";
|
|
2
|
+
import { fadeInBar, growBar, isHorizontalBar, moveInBar, moveOutBar } from "./barMotion.js";
|
|
3
|
+
const getLoopResult = (effect, chartType, spec)=>{
|
|
4
|
+
if (effect === VScreenAnimationType.growth) return growBar(chartType);
|
|
5
|
+
if (effect === VScreenAnimationType.moveIn) return moveInBar(chartType, spec);
|
|
6
|
+
if (effect === VScreenAnimationType.load) return fadeInBar();
|
|
7
|
+
return {};
|
|
8
|
+
};
|
|
9
|
+
export { atmosphereColorToFill, atmosphereColorToStroke, transform2VChartColor } from "./barColor.js";
|
|
10
|
+
export { getGroupCountFromSpec, groupHighLightBar } from "./barGroup.js";
|
|
11
|
+
export { fadeInBar, getLoopResult, growBar, isHorizontalBar, moveInBar, moveOutBar };
|
|
12
|
+
|
|
13
|
+
//# sourceMappingURL=bar.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pipeline/spec/chart/pipes/animation/utils/bar.js","sources":["../../../../../../../../src/pipeline/spec/chart/pipes/animation/utils/bar.ts"],"sourcesContent":["import { VScreenAnimationType } from '../types'\nimport { fadeInBar, growBar, moveInBar } from './barMotion'\n\nexport { atmosphereColorToFill, atmosphereColorToStroke, transform2VChartColor } from './barColor'\nexport { getGroupCountFromSpec, groupHighLightBar } from './barGroup'\nexport { fadeInBar, growBar, isHorizontalBar, moveInBar, moveOutBar } from './barMotion'\n\n/**\n * @description 根据循环动画效果类型生成柱图 normal 阶段动画配置。\n * @param effect 循环动画效果类型。\n * @param chartType 图表类型。\n * @param spec 当前 VChart spec。\n * @returns 柱图 normal 阶段动画配置。\n */\nexport const getLoopResult = (effect: string, chartType: string, spec: any) => {\n if (effect === VScreenAnimationType.growth) return growBar(chartType)\n if (effect === VScreenAnimationType.moveIn) return moveInBar(chartType, spec)\n if (effect === VScreenAnimationType.load) return fadeInBar()\n return {}\n}\n"],"names":["getLoopResult","effect","chartType","spec","VScreenAnimationType","growBar","moveInBar","fadeInBar"],"mappings":";;AAcO,MAAMA,gBAAgB,CAACC,QAAgBC,WAAmBC;IAC/D,IAAIF,WAAWG,qBAAqB,MAAM,EAAE,OAAOC,QAAQH;IAC3D,IAAID,WAAWG,qBAAqB,MAAM,EAAE,OAAOE,UAAUJ,WAAWC;IACxE,IAAIF,WAAWG,qBAAqB,IAAI,EAAE,OAAOG;IACjD,OAAO,CAAC;AACV"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @description 将普通色值或 DSL 渐变色统一转换为 VChart 可消费的颜色配置。
|
|
3
|
+
* @param colorStr 普通色值或 DSL 渐变色。
|
|
4
|
+
* @returns VChart 可消费的颜色配置。
|
|
5
|
+
*/
|
|
6
|
+
export declare const transform2VChartColor: (colorStr?: string) => string | {
|
|
7
|
+
gradient: string;
|
|
8
|
+
x0: number;
|
|
9
|
+
x1: number;
|
|
10
|
+
y1: number;
|
|
11
|
+
y0: number;
|
|
12
|
+
stops: {
|
|
13
|
+
offset: number;
|
|
14
|
+
color: string;
|
|
15
|
+
}[];
|
|
16
|
+
} | undefined;
|
|
17
|
+
/**
|
|
18
|
+
* @description 生成柱图氛围高亮的填充色;渐变柱图会补齐透明度渐变。
|
|
19
|
+
* @param color 高亮色。
|
|
20
|
+
* @param isGradientChart 当前图表是否使用渐变填充。
|
|
21
|
+
* @param isHorizontal 是否为横向柱图。
|
|
22
|
+
* @returns 柱图氛围高亮填充色。
|
|
23
|
+
*/
|
|
24
|
+
export declare const atmosphereColorToFill: (color: string, isGradientChart: boolean, isHorizontal: boolean) => string | {
|
|
25
|
+
gradient: string;
|
|
26
|
+
x0: number;
|
|
27
|
+
x1: number;
|
|
28
|
+
y1: number;
|
|
29
|
+
y0: number;
|
|
30
|
+
stops: {
|
|
31
|
+
offset: number;
|
|
32
|
+
color: string;
|
|
33
|
+
}[];
|
|
34
|
+
};
|
|
35
|
+
/**
|
|
36
|
+
* @description 生成柱图氛围高亮的描边色;渐变柱图会补齐透明度渐变。
|
|
37
|
+
* @param color 高亮色。
|
|
38
|
+
* @param isGradientChart 当前图表是否使用渐变填充。
|
|
39
|
+
* @param isHorizontal 是否为横向柱图。
|
|
40
|
+
* @returns 柱图氛围高亮描边色。
|
|
41
|
+
*/
|
|
42
|
+
export declare const atmosphereColorToStroke: (color: string, isGradientChart: boolean, isHorizontal: boolean) => string | {
|
|
43
|
+
gradient: string;
|
|
44
|
+
x0: number;
|
|
45
|
+
x1: number;
|
|
46
|
+
y1: number;
|
|
47
|
+
y0: number;
|
|
48
|
+
stops: {
|
|
49
|
+
offset: number;
|
|
50
|
+
color: string;
|
|
51
|
+
}[];
|
|
52
|
+
};
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import tinycolor2 from "tinycolor2";
|
|
2
|
+
const isGradient = (color)=>color.includes('deg');
|
|
3
|
+
const splitLinearColor = (str)=>str.split(', ');
|
|
4
|
+
const transformColor2Gradient = (colorStr)=>{
|
|
5
|
+
const [degStr, startColor, endColor] = splitLinearColor(colorStr);
|
|
6
|
+
const deg = +degStr.slice(0, -3);
|
|
7
|
+
const endX = Math.cos(deg / 180 * Math.PI);
|
|
8
|
+
const endY = Math.sin(deg / 180 * Math.PI);
|
|
9
|
+
return {
|
|
10
|
+
gradient: 'linear',
|
|
11
|
+
x0: endX < 0 ? Math.abs(endX) : 0,
|
|
12
|
+
x1: endX > 0 ? endX : 0,
|
|
13
|
+
y1: endY < 0 ? Math.abs(endY) : 0,
|
|
14
|
+
y0: endY > 0 ? endY : 0,
|
|
15
|
+
stops: [
|
|
16
|
+
{
|
|
17
|
+
offset: 0,
|
|
18
|
+
color: startColor
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
offset: 1,
|
|
22
|
+
color: endColor
|
|
23
|
+
}
|
|
24
|
+
]
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
const transform2VChartColor = (colorStr)=>{
|
|
28
|
+
if (!colorStr) return colorStr;
|
|
29
|
+
return isGradient(colorStr) ? transformColor2Gradient(colorStr) : colorStr;
|
|
30
|
+
};
|
|
31
|
+
const fillColorToStrokeColor = (color)=>tinycolor2(color).lighten(10).toRgbString();
|
|
32
|
+
const atmosphereColorToFill = (color, isGradientChart, isHorizontal)=>{
|
|
33
|
+
if (isGradient(color)) return transformColor2Gradient(color);
|
|
34
|
+
if (!isGradientChart) return color;
|
|
35
|
+
const deg = isHorizontal ? 90 : 0;
|
|
36
|
+
const start = tinycolor2(color).setAlpha(0.2).toRgbString();
|
|
37
|
+
const end = tinycolor2(color).setAlpha(1).toRgbString();
|
|
38
|
+
return transformColor2Gradient(`${deg}deg, ${start}, ${end}`);
|
|
39
|
+
};
|
|
40
|
+
const atmosphereColorToStroke = (color, isGradientChart, isHorizontal)=>{
|
|
41
|
+
if (isGradient(color)) return transformColor2Gradient(color);
|
|
42
|
+
if (!isGradientChart) return color;
|
|
43
|
+
const deg = isHorizontal ? 90 : 0;
|
|
44
|
+
const base = fillColorToStrokeColor(color);
|
|
45
|
+
const start = tinycolor2(base).setAlpha(0.2).toRgbString();
|
|
46
|
+
const end = tinycolor2(base).setAlpha(1).toRgbString();
|
|
47
|
+
return transformColor2Gradient(`${deg}deg, ${start}, ${end}`);
|
|
48
|
+
};
|
|
49
|
+
export { atmosphereColorToFill, atmosphereColorToStroke, transform2VChartColor };
|
|
50
|
+
|
|
51
|
+
//# sourceMappingURL=barColor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pipeline/spec/chart/pipes/animation/utils/barColor.js","sources":["../../../../../../../../src/pipeline/spec/chart/pipes/animation/utils/barColor.ts"],"sourcesContent":["import tinycolor from 'tinycolor2'\n\nconst isGradient = (color: string) => color.includes('deg')\nconst splitLinearColor = (str: string) => str.split(', ')\n\n/**\n * @description 将 DSL 中的线性渐变字符串转换为 VChart gradient 对象。\n * @param colorStr DSL 线性渐变字符串。\n * @returns VChart gradient 对象。\n */\nconst transformColor2Gradient = (colorStr: string) => {\n const [degStr, startColor, endColor] = splitLinearColor(colorStr)\n const deg = +degStr.slice(0, -3)\n const endX = Math.cos((deg / 180) * Math.PI)\n const endY = Math.sin((deg / 180) * Math.PI)\n\n return {\n gradient: 'linear',\n x0: endX < 0 ? Math.abs(endX) : 0,\n x1: endX > 0 ? endX : 0,\n y1: endY < 0 ? Math.abs(endY) : 0,\n y0: endY > 0 ? endY : 0,\n stops: [\n { offset: 0, color: startColor },\n { offset: 1, color: endColor },\n ],\n }\n}\n\n/**\n * @description 将普通色值或 DSL 渐变色统一转换为 VChart 可消费的颜色配置。\n * @param colorStr 普通色值或 DSL 渐变色。\n * @returns VChart 可消费的颜色配置。\n */\nexport const transform2VChartColor = (colorStr?: string) => {\n if (!colorStr) return colorStr\n return isGradient(colorStr) ? transformColor2Gradient(colorStr) : colorStr\n}\n\n/**\n * @description 从填充色推导更亮的描边色,用于柱图氛围高亮。\n * @param color 填充色。\n * @returns 推导后的描边色。\n */\nconst fillColorToStrokeColor = (color: string) => {\n return tinycolor(color).lighten(10).toRgbString()\n}\n\n/**\n * @description 生成柱图氛围高亮的填充色;渐变柱图会补齐透明度渐变。\n * @param color 高亮色。\n * @param isGradientChart 当前图表是否使用渐变填充。\n * @param isHorizontal 是否为横向柱图。\n * @returns 柱图氛围高亮填充色。\n */\nexport const atmosphereColorToFill = (color: string, isGradientChart: boolean, isHorizontal: boolean) => {\n if (isGradient(color)) return transformColor2Gradient(color)\n if (!isGradientChart) return color\n\n const deg = isHorizontal ? 90 : 0\n const start = tinycolor(color).setAlpha(0.2).toRgbString()\n const end = tinycolor(color).setAlpha(1).toRgbString()\n return transformColor2Gradient(`${deg}deg, ${start}, ${end}`)\n}\n\n/**\n * @description 生成柱图氛围高亮的描边色;渐变柱图会补齐透明度渐变。\n * @param color 高亮色。\n * @param isGradientChart 当前图表是否使用渐变填充。\n * @param isHorizontal 是否为横向柱图。\n * @returns 柱图氛围高亮描边色。\n */\nexport const atmosphereColorToStroke = (color: string, isGradientChart: boolean, isHorizontal: boolean) => {\n if (isGradient(color)) return transformColor2Gradient(color)\n if (!isGradientChart) return color\n\n const deg = isHorizontal ? 90 : 0\n const base = fillColorToStrokeColor(color)\n const start = tinycolor(base).setAlpha(0.2).toRgbString()\n const end = tinycolor(base).setAlpha(1).toRgbString()\n return transformColor2Gradient(`${deg}deg, ${start}, ${end}`)\n}\n"],"names":["isGradient","color","splitLinearColor","str","transformColor2Gradient","colorStr","degStr","startColor","endColor","deg","endX","Math","endY","transform2VChartColor","fillColorToStrokeColor","tinycolor","atmosphereColorToFill","isGradientChart","isHorizontal","start","end","atmosphereColorToStroke","base"],"mappings":";AAEA,MAAMA,aAAa,CAACC,QAAkBA,MAAM,QAAQ,CAAC;AACrD,MAAMC,mBAAmB,CAACC,MAAgBA,IAAI,KAAK,CAAC;AAOpD,MAAMC,0BAA0B,CAACC;IAC/B,MAAM,CAACC,QAAQC,YAAYC,SAAS,GAAGN,iBAAiBG;IACxD,MAAMI,MAAM,CAACH,OAAO,KAAK,CAAC,GAAG;IAC7B,MAAMI,OAAOC,KAAK,GAAG,CAAEF,MAAM,MAAOE,KAAK,EAAE;IAC3C,MAAMC,OAAOD,KAAK,GAAG,CAAEF,MAAM,MAAOE,KAAK,EAAE;IAE3C,OAAO;QACL,UAAU;QACV,IAAID,OAAO,IAAIC,KAAK,GAAG,CAACD,QAAQ;QAChC,IAAIA,OAAO,IAAIA,OAAO;QACtB,IAAIE,OAAO,IAAID,KAAK,GAAG,CAACC,QAAQ;QAChC,IAAIA,OAAO,IAAIA,OAAO;QACtB,OAAO;YACL;gBAAE,QAAQ;gBAAG,OAAOL;YAAW;YAC/B;gBAAE,QAAQ;gBAAG,OAAOC;YAAS;SAC9B;IACH;AACF;AAOO,MAAMK,wBAAwB,CAACR;IACpC,IAAI,CAACA,UAAU,OAAOA;IACtB,OAAOL,WAAWK,YAAYD,wBAAwBC,YAAYA;AACpE;AAOA,MAAMS,yBAAyB,CAACb,QACvBc,WAAUd,OAAO,OAAO,CAAC,IAAI,WAAW;AAU1C,MAAMe,wBAAwB,CAACf,OAAegB,iBAA0BC;IAC7E,IAAIlB,WAAWC,QAAQ,OAAOG,wBAAwBH;IACtD,IAAI,CAACgB,iBAAiB,OAAOhB;IAE7B,MAAMQ,MAAMS,eAAe,KAAK;IAChC,MAAMC,QAAQJ,WAAUd,OAAO,QAAQ,CAAC,KAAK,WAAW;IACxD,MAAMmB,MAAML,WAAUd,OAAO,QAAQ,CAAC,GAAG,WAAW;IACpD,OAAOG,wBAAwB,GAAGK,IAAI,KAAK,EAAEU,MAAM,EAAE,EAAEC,KAAK;AAC9D;AASO,MAAMC,0BAA0B,CAACpB,OAAegB,iBAA0BC;IAC/E,IAAIlB,WAAWC,QAAQ,OAAOG,wBAAwBH;IACtD,IAAI,CAACgB,iBAAiB,OAAOhB;IAE7B,MAAMQ,MAAMS,eAAe,KAAK;IAChC,MAAMI,OAAOR,uBAAuBb;IACpC,MAAMkB,QAAQJ,WAAUO,MAAM,QAAQ,CAAC,KAAK,WAAW;IACvD,MAAMF,MAAML,WAAUO,MAAM,QAAQ,CAAC,GAAG,WAAW;IACnD,OAAOlB,wBAAwB,GAAGK,IAAI,KAAK,EAAEU,MAAM,EAAE,EAAEC,KAAK;AAC9D"}
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import type { EffectConfig } from '../types';
|
|
2
|
+
/**
|
|
3
|
+
* @description 从 spec 数据中统计类目分组数量,用于计算分组高亮总时长。
|
|
4
|
+
* @param spec 当前 VChart spec。
|
|
5
|
+
* @returns 类目分组数量。
|
|
6
|
+
*/
|
|
7
|
+
export declare const getGroupCountFromSpec: (spec: any) => {
|
|
8
|
+
groupCount: number;
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* @description 生成柱图分组高亮循环动画配置。
|
|
12
|
+
* @param startTime 动画开始时间,单位毫秒。
|
|
13
|
+
* @param config 高亮动画配置,包含颜色和缓动。
|
|
14
|
+
* @param duration 分组高亮总时长,单位秒。
|
|
15
|
+
* @param interval 每轮循环间隔,单位秒。
|
|
16
|
+
* @param atmosphereDuration 氛围动画占用时长,单位秒。
|
|
17
|
+
* @param isHorizontal 是否为横向柱图。
|
|
18
|
+
* @param spec 当前 VChart spec。
|
|
19
|
+
* @returns 柱图分组高亮循环动画配置。
|
|
20
|
+
*/
|
|
21
|
+
export declare const groupHighLightBar: (startTime: number, config: EffectConfig<any>, duration: number, interval: number, atmosphereDuration: number, isHorizontal: boolean, spec: any) => {
|
|
22
|
+
loop: boolean;
|
|
23
|
+
startTime: number;
|
|
24
|
+
controlOptions: {
|
|
25
|
+
immediatelyApply: boolean;
|
|
26
|
+
};
|
|
27
|
+
timeSlices: ({
|
|
28
|
+
effects: {
|
|
29
|
+
channel: {
|
|
30
|
+
fill: {
|
|
31
|
+
to: string | {
|
|
32
|
+
gradient: string;
|
|
33
|
+
x0: number;
|
|
34
|
+
x1: number;
|
|
35
|
+
y1: number;
|
|
36
|
+
y0: number;
|
|
37
|
+
stops: {
|
|
38
|
+
offset: number;
|
|
39
|
+
color: string;
|
|
40
|
+
}[];
|
|
41
|
+
};
|
|
42
|
+
from?: undefined;
|
|
43
|
+
};
|
|
44
|
+
stroke: {
|
|
45
|
+
to: string | {
|
|
46
|
+
gradient: string;
|
|
47
|
+
x0: number;
|
|
48
|
+
x1: number;
|
|
49
|
+
y1: number;
|
|
50
|
+
y0: number;
|
|
51
|
+
stops: {
|
|
52
|
+
offset: number;
|
|
53
|
+
color: string;
|
|
54
|
+
}[];
|
|
55
|
+
};
|
|
56
|
+
from?: undefined;
|
|
57
|
+
};
|
|
58
|
+
};
|
|
59
|
+
easing: string | undefined;
|
|
60
|
+
};
|
|
61
|
+
delay: (datum: any, _element: any, _ctx: any, context: any) => number;
|
|
62
|
+
duration: (_datum: any, _element: any, _ctx: any, context: any) => number;
|
|
63
|
+
delayAfter?: undefined;
|
|
64
|
+
} | {
|
|
65
|
+
effects: {
|
|
66
|
+
channel: {
|
|
67
|
+
fill: {
|
|
68
|
+
from: string | {
|
|
69
|
+
gradient: string;
|
|
70
|
+
x0: number;
|
|
71
|
+
x1: number;
|
|
72
|
+
y1: number;
|
|
73
|
+
y0: number;
|
|
74
|
+
stops: {
|
|
75
|
+
offset: number;
|
|
76
|
+
color: string;
|
|
77
|
+
}[];
|
|
78
|
+
};
|
|
79
|
+
to: (...p: any[]) => any;
|
|
80
|
+
};
|
|
81
|
+
stroke: {
|
|
82
|
+
from: string | {
|
|
83
|
+
gradient: string;
|
|
84
|
+
x0: number;
|
|
85
|
+
x1: number;
|
|
86
|
+
y1: number;
|
|
87
|
+
y0: number;
|
|
88
|
+
stops: {
|
|
89
|
+
offset: number;
|
|
90
|
+
color: string;
|
|
91
|
+
}[];
|
|
92
|
+
};
|
|
93
|
+
to: (...p: any[]) => any;
|
|
94
|
+
};
|
|
95
|
+
};
|
|
96
|
+
easing: string | undefined;
|
|
97
|
+
};
|
|
98
|
+
delayAfter: (datum: any, _element: any, _ctx: any, context: any) => number;
|
|
99
|
+
duration: (_datum: any, _element: any, _ctx: any, context: any) => number;
|
|
100
|
+
delay?: undefined;
|
|
101
|
+
})[];
|
|
102
|
+
}[];
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { array } from "@visactor/vutils";
|
|
2
|
+
import { atmosphereColorToFill, atmosphereColorToStroke } from "./barColor.js";
|
|
3
|
+
const getGroupCountFromSpec = (spec)=>{
|
|
4
|
+
const field = 'horizontal' === spec.direction ? array(spec.yField)[0] : array(spec.xField)[0];
|
|
5
|
+
const groupCount = new Set((spec.data?.[0]?.values ?? []).map((row)=>row[field])).size;
|
|
6
|
+
return {
|
|
7
|
+
groupCount
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
const getGroupInfo = (chartInstance, datum)=>{
|
|
11
|
+
const series = chartInstance.getChart().getAllSeries()[0];
|
|
12
|
+
const indexField = 'horizontal' === series.direction ? series.fieldY[0] : series.fieldX[0];
|
|
13
|
+
const indexValue = datum?.[indexField];
|
|
14
|
+
const scale = 'horizontal' === series.direction ? series.scaleY : series.scaleX;
|
|
15
|
+
const index = (scale?.domain?.() ?? []).indexOf(indexValue) || 0;
|
|
16
|
+
const count = (scale?.domain?.() ?? []).length ?? 1;
|
|
17
|
+
return {
|
|
18
|
+
index,
|
|
19
|
+
count
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
const getSliceDuration = (totalDuration)=>(_datum, _element, _ctx, context)=>{
|
|
23
|
+
const { count } = getGroupInfo(context.vchart, _datum);
|
|
24
|
+
return 0 === count ? 1000 : totalDuration / count / 2;
|
|
25
|
+
};
|
|
26
|
+
const groupHighLightBar = (startTime, config, duration, interval, atmosphereDuration, isHorizontal, spec)=>{
|
|
27
|
+
const totalDuration = 1000 * duration;
|
|
28
|
+
const color = config.color ?? '#4A90E2';
|
|
29
|
+
const isGradientChart = spec?.bar?.style?.fill?.gradient === 'linear';
|
|
30
|
+
const fillColor = atmosphereColorToFill(color, isGradientChart, isHorizontal);
|
|
31
|
+
const strokeColor = atmosphereColorToStroke(color, isGradientChart, isHorizontal);
|
|
32
|
+
return [
|
|
33
|
+
{
|
|
34
|
+
loop: true,
|
|
35
|
+
startTime,
|
|
36
|
+
controlOptions: {
|
|
37
|
+
immediatelyApply: false
|
|
38
|
+
},
|
|
39
|
+
timeSlices: [
|
|
40
|
+
{
|
|
41
|
+
effects: {
|
|
42
|
+
channel: {
|
|
43
|
+
fill: {
|
|
44
|
+
to: fillColor
|
|
45
|
+
},
|
|
46
|
+
stroke: {
|
|
47
|
+
to: strokeColor
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
easing: config.ease
|
|
51
|
+
},
|
|
52
|
+
delay: (datum, _element, _ctx, context)=>{
|
|
53
|
+
const { count, index } = getGroupInfo(context.vchart, datum);
|
|
54
|
+
return 0 === count ? 0 : index * totalDuration / count;
|
|
55
|
+
},
|
|
56
|
+
duration: getSliceDuration(totalDuration)
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
effects: {
|
|
60
|
+
channel: {
|
|
61
|
+
fill: {
|
|
62
|
+
from: fillColor,
|
|
63
|
+
to: (...p)=>p[1].attribute.fill
|
|
64
|
+
},
|
|
65
|
+
stroke: {
|
|
66
|
+
from: strokeColor,
|
|
67
|
+
to: (...p)=>p[1].attribute.fill
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
easing: config.ease
|
|
71
|
+
},
|
|
72
|
+
delayAfter: (datum, _element, _ctx, context)=>{
|
|
73
|
+
const { count, index } = getGroupInfo(context.vchart, datum);
|
|
74
|
+
return 0 === count ? 0 : (interval + atmosphereDuration) * 1000 + (count - index - 1) * totalDuration / count;
|
|
75
|
+
},
|
|
76
|
+
duration: getSliceDuration(totalDuration)
|
|
77
|
+
}
|
|
78
|
+
]
|
|
79
|
+
}
|
|
80
|
+
];
|
|
81
|
+
};
|
|
82
|
+
export { getGroupCountFromSpec, groupHighLightBar };
|
|
83
|
+
|
|
84
|
+
//# sourceMappingURL=barGroup.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pipeline/spec/chart/pipes/animation/utils/barGroup.js","sources":["../../../../../../../../src/pipeline/spec/chart/pipes/animation/utils/barGroup.ts"],"sourcesContent":["import { array } from '@visactor/vutils'\nimport type { EffectConfig } from '../types'\nimport { atmosphereColorToFill, atmosphereColorToStroke } from './barColor'\n\n/**\n * @description 从 spec 数据中统计类目分组数量,用于计算分组高亮总时长。\n * @param spec 当前 VChart spec。\n * @returns 类目分组数量。\n */\nexport const getGroupCountFromSpec = (spec: any) => {\n const field = spec.direction === 'horizontal' ? array(spec.yField)[0] : array(spec.xField)[0]\n const groupCount = new Set((spec.data?.[0]?.values ?? []).map((row: any) => row[field])).size\n return { groupCount }\n}\n\n/**\n * @description 获取当前 datum 在类目轴 domain 中的位置和总数。\n * @param chartInstance VChart 实例。\n * @param datum 当前数据项。\n * @returns 当前数据项索引和类目总数。\n */\nconst getGroupInfo = (chartInstance: any, datum: any) => {\n const series = chartInstance.getChart().getAllSeries()[0]\n const indexField = series.direction === 'horizontal' ? series.fieldY[0] : series.fieldX[0]\n const indexValue = datum?.[indexField]\n const scale = series.direction === 'horizontal' ? series.scaleY : series.scaleX\n const index = (scale?.domain?.() ?? []).indexOf(indexValue) || 0\n const count = (scale?.domain?.() ?? []).length ?? 1\n return { index, count }\n}\n\n/**\n * @description 生成单个高亮片段的动态时长函数,使每个类目均分总时长。\n * @param totalDuration 分组高亮总时长,单位毫秒。\n * @returns timeSlice duration 回调函数。\n */\nconst getSliceDuration = (totalDuration: number) => (_datum: any, _element: any, _ctx: any, context: any) => {\n const { count } = getGroupInfo(context.vchart, _datum)\n return count === 0 ? 1000 : totalDuration / count / 2\n}\n\n/**\n * @description 生成柱图分组高亮循环动画配置。\n * @param startTime 动画开始时间,单位毫秒。\n * @param config 高亮动画配置,包含颜色和缓动。\n * @param duration 分组高亮总时长,单位秒。\n * @param interval 每轮循环间隔,单位秒。\n * @param atmosphereDuration 氛围动画占用时长,单位秒。\n * @param isHorizontal 是否为横向柱图。\n * @param spec 当前 VChart spec。\n * @returns 柱图分组高亮循环动画配置。\n */\nexport const groupHighLightBar = (\n startTime: number,\n config: EffectConfig<any>,\n duration: number,\n interval: number,\n atmosphereDuration: number,\n isHorizontal: boolean,\n spec: any,\n) => {\n const totalDuration = duration * 1000\n const color = config.color ?? '#4A90E2'\n const isGradientChart = spec?.bar?.style?.fill?.gradient === 'linear'\n const fillColor = atmosphereColorToFill(color, isGradientChart, isHorizontal)\n const strokeColor = atmosphereColorToStroke(color, isGradientChart, isHorizontal)\n\n return [\n {\n loop: true,\n startTime,\n controlOptions: { immediatelyApply: false },\n timeSlices: [\n {\n effects: { channel: { fill: { to: fillColor }, stroke: { to: strokeColor } }, easing: config.ease },\n delay: (datum: any, _element: any, _ctx: any, context: any) => {\n const { count, index } = getGroupInfo(context.vchart, datum)\n return count === 0 ? 0 : (index * totalDuration) / count\n },\n duration: getSliceDuration(totalDuration),\n },\n {\n effects: {\n channel: {\n fill: { from: fillColor, to: (...p: any[]) => p[1].attribute.fill },\n stroke: { from: strokeColor, to: (...p: any[]) => p[1].attribute.fill },\n },\n easing: config.ease,\n },\n delayAfter: (datum: any, _element: any, _ctx: any, context: any) => {\n const { count, index } = getGroupInfo(context.vchart, datum)\n return count === 0\n ? 0\n : (interval + atmosphereDuration) * 1000 + ((count - index - 1) * totalDuration) / count\n },\n duration: getSliceDuration(totalDuration),\n },\n ],\n },\n ]\n}\n"],"names":["getGroupCountFromSpec","spec","field","array","groupCount","Set","row","getGroupInfo","chartInstance","datum","series","indexField","indexValue","scale","index","count","getSliceDuration","totalDuration","_datum","_element","_ctx","context","groupHighLightBar","startTime","config","duration","interval","atmosphereDuration","isHorizontal","color","isGradientChart","fillColor","atmosphereColorToFill","strokeColor","atmosphereColorToStroke","p"],"mappings":";;AASO,MAAMA,wBAAwB,CAACC;IACpC,MAAMC,QAAQD,AAAmB,iBAAnBA,KAAK,SAAS,GAAoBE,MAAMF,KAAK,MAAM,CAAC,CAAC,EAAE,GAAGE,MAAMF,KAAK,MAAM,CAAC,CAAC,EAAE;IAC7F,MAAMG,aAAa,IAAIC,IAAKJ,AAAAA,CAAAA,KAAK,IAAI,EAAE,CAAC,EAAE,EAAE,UAAU,EAAC,EAAG,GAAG,CAAC,CAACK,MAAaA,GAAG,CAACJ,MAAM,GAAG,IAAI;IAC7F,OAAO;QAAEE;IAAW;AACtB;AAQA,MAAMG,eAAe,CAACC,eAAoBC;IACxC,MAAMC,SAASF,cAAc,QAAQ,GAAG,YAAY,EAAE,CAAC,EAAE;IACzD,MAAMG,aAAaD,AAAqB,iBAArBA,OAAO,SAAS,GAAoBA,OAAO,MAAM,CAAC,EAAE,GAAGA,OAAO,MAAM,CAAC,EAAE;IAC1F,MAAME,aAAaH,OAAO,CAACE,WAAW;IACtC,MAAME,QAAQH,AAAqB,iBAArBA,OAAO,SAAS,GAAoBA,OAAO,MAAM,GAAGA,OAAO,MAAM;IAC/E,MAAMI,QAASD,AAAAA,CAAAA,OAAO,cAAc,EAAC,EAAG,OAAO,CAACD,eAAe;IAC/D,MAAMG,QAASF,AAAAA,CAAAA,OAAO,cAAc,EAAC,EAAG,MAAM,IAAI;IAClD,OAAO;QAAEC;QAAOC;IAAM;AACxB;AAOA,MAAMC,mBAAmB,CAACC,gBAA0B,CAACC,QAAaC,UAAeC,MAAWC;QAC1F,MAAM,EAAEN,KAAK,EAAE,GAAGR,aAAac,QAAQ,MAAM,EAAEH;QAC/C,OAAOH,AAAU,MAAVA,QAAc,OAAOE,gBAAgBF,QAAQ;IACtD;AAaO,MAAMO,oBAAoB,CAC/BC,WACAC,QACAC,UACAC,UACAC,oBACAC,cACA3B;IAEA,MAAMgB,gBAAgBQ,AAAW,OAAXA;IACtB,MAAMI,QAAQL,OAAO,KAAK,IAAI;IAC9B,MAAMM,kBAAkB7B,MAAM,KAAK,OAAO,MAAM,aAAa;IAC7D,MAAM8B,YAAYC,sBAAsBH,OAAOC,iBAAiBF;IAChE,MAAMK,cAAcC,wBAAwBL,OAAOC,iBAAiBF;IAEpE,OAAO;QACL;YACE,MAAM;YACNL;YACA,gBAAgB;gBAAE,kBAAkB;YAAM;YAC1C,YAAY;gBACV;oBACE,SAAS;wBAAE,SAAS;4BAAE,MAAM;gCAAE,IAAIQ;4BAAU;4BAAG,QAAQ;gCAAE,IAAIE;4BAAY;wBAAE;wBAAG,QAAQT,OAAO,IAAI;oBAAC;oBAClG,OAAO,CAACf,OAAYU,UAAeC,MAAWC;wBAC5C,MAAM,EAAEN,KAAK,EAAED,KAAK,EAAE,GAAGP,aAAac,QAAQ,MAAM,EAAEZ;wBACtD,OAAOM,AAAU,MAAVA,QAAc,IAAKD,QAAQG,gBAAiBF;oBACrD;oBACA,UAAUC,iBAAiBC;gBAC7B;gBACA;oBACE,SAAS;wBACP,SAAS;4BACP,MAAM;gCAAE,MAAMc;gCAAW,IAAI,CAAC,GAAGI,IAAaA,CAAC,CAAC,EAAE,CAAC,SAAS,CAAC,IAAI;4BAAC;4BAClE,QAAQ;gCAAE,MAAMF;gCAAa,IAAI,CAAC,GAAGE,IAAaA,CAAC,CAAC,EAAE,CAAC,SAAS,CAAC,IAAI;4BAAC;wBACxE;wBACA,QAAQX,OAAO,IAAI;oBACrB;oBACA,YAAY,CAACf,OAAYU,UAAeC,MAAWC;wBACjD,MAAM,EAAEN,KAAK,EAAED,KAAK,EAAE,GAAGP,aAAac,QAAQ,MAAM,EAAEZ;wBACtD,OAAOM,AAAU,MAAVA,QACH,IACCW,AAAAA,CAAAA,WAAWC,kBAAiB,IAAK,OAASZ,AAAAA,CAAAA,QAAQD,QAAQ,KAAKG,gBAAiBF;oBACvF;oBACA,UAAUC,iBAAiBC;gBAC7B;aACD;QACH;KACD;AACH"}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @description 判断当前柱图类型是否为横向柱图。
|
|
3
|
+
* @param chartType 图表类型。
|
|
4
|
+
* @returns 是否为横向柱图。
|
|
5
|
+
*/
|
|
6
|
+
export declare const isHorizontalBar: (chartType: string) => boolean;
|
|
7
|
+
/**
|
|
8
|
+
* @description 生成柱图增长入场动画配置。
|
|
9
|
+
* @param chartType 图表类型。
|
|
10
|
+
* @returns 柱图增长入场动画配置。
|
|
11
|
+
*/
|
|
12
|
+
export declare const growBar: (chartType: string) => {
|
|
13
|
+
type: string;
|
|
14
|
+
oneByOne: boolean;
|
|
15
|
+
options: (_datum: any, _element: any, _opt: any, context: any) => {
|
|
16
|
+
overall: any;
|
|
17
|
+
orient?: undefined;
|
|
18
|
+
} | {
|
|
19
|
+
orient: string;
|
|
20
|
+
overall: any;
|
|
21
|
+
};
|
|
22
|
+
controlOptions: {
|
|
23
|
+
immediatelyApply: boolean;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
/**
|
|
27
|
+
* @description 生成柱图逐个淡入的动画配置。
|
|
28
|
+
* @returns 柱图淡入动画配置。
|
|
29
|
+
*/
|
|
30
|
+
export declare const fadeInBar: () => {
|
|
31
|
+
type: string;
|
|
32
|
+
oneByOne: boolean;
|
|
33
|
+
};
|
|
34
|
+
/**
|
|
35
|
+
* @description 生成柱图从画布外移入的动画配置。
|
|
36
|
+
* @param chartType 图表类型。
|
|
37
|
+
* @param spec 当前 VChart spec。
|
|
38
|
+
* @param isUpdate 是否为 update 阶段动画。
|
|
39
|
+
* @returns 柱图移入动画配置。
|
|
40
|
+
*/
|
|
41
|
+
export declare const moveInBar: (chartType: string, spec?: any, isUpdate?: boolean) => {
|
|
42
|
+
type: string;
|
|
43
|
+
options: {
|
|
44
|
+
excludeChannels: string[];
|
|
45
|
+
direction: string;
|
|
46
|
+
orient: string;
|
|
47
|
+
point: (_datum: any, element: any, opt: any) => {
|
|
48
|
+
[x: string]: any;
|
|
49
|
+
};
|
|
50
|
+
};
|
|
51
|
+
};
|
|
52
|
+
/**
|
|
53
|
+
* @description 生成柱图移出画布的动画配置。
|
|
54
|
+
* @param chartType 图表类型。
|
|
55
|
+
* @returns 柱图移出动画配置。
|
|
56
|
+
*/
|
|
57
|
+
export declare const moveOutBar: (chartType: string) => {
|
|
58
|
+
type: string;
|
|
59
|
+
options: {
|
|
60
|
+
direction: string;
|
|
61
|
+
orient: string;
|
|
62
|
+
point: (_datum: any, element: any, opt: any) => {
|
|
63
|
+
[x: string]: any;
|
|
64
|
+
};
|
|
65
|
+
};
|
|
66
|
+
};
|