forked from antvis/G2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsold-interval-pie-keyframe.ts
52 lines (50 loc) · 1.16 KB
/
sold-interval-pie-keyframe.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
import { G2Spec } from '../../../src';
import { sold } from '../../data/sold';
export function soldIntervalPieKeyframe(): G2Spec {
return {
type: 'timingKeyframe',
direction: 'alternate',
iterationCount: 2,
children: [
{
type: 'interval',
data: sold,
coordinate: { type: 'theta', innerRadius: 0.45, outerRadius: 0.8 },
transform: [{ type: 'stackY' }],
encode: {
y: 'sold',
color: 'genre',
key: 'genre',
},
labels: [
{
text: 'sold',
},
],
animate: {
enter: { type: 'waveIn' },
},
},
{
type: 'interval',
data: sold.slice(0, 4),
coordinate: { type: 'theta', innerRadius: 0.45, outerRadius: 0.8 },
transform: [{ type: 'stackY' }],
encode: {
y: 'sold',
color: 'genre',
key: 'genre',
},
labels: [
{
text: 'sold',
},
],
animate: {
enter: { type: 'waveIn' },
},
},
],
};
}
soldIntervalPieKeyframe.intervals = [false, [500], [500], [500], [500]];