Skip to content

Commit 07e32de

Browse files
authored
Merge pull request #199 from VisActor/release/0.0.22
[Auto release] release 0.0.22
2 parents fa459ab + e307662 commit 07e32de

File tree

142 files changed

+4965
-395
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

142 files changed

+4965
-395
lines changed

common/config/rush/pnpm-config.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -89,10 +89,10 @@
8989
* PNPM documentation: https://pnpm.io/package_json#pnpmoverrides
9090
*/
9191
"globalOverrides": {
92-
// "@visactor/vrender": "0.21.2-vstory.3",
93-
// "@visactor/vrender-core": "0.21.2-vstory.3",
94-
// "@visactor/vrender-kits": "0.21.2-vstory.3",
95-
// "@visactor/vrender-components": "0.21.2-vstory.3",
92+
// "@visactor/vrender": "0.21.5-vstory.2",
93+
// "@visactor/vrender-core": "0.21.5-vstory.2",
94+
// "@visactor/vrender-kits": "0.21.5-vstory.2",
95+
// "@visactor/vrender-components": "0.21.5-vstory.2",
9696
// "@visactor/vscale": "0.18.5"
9797
// "example2": "npm:@company/example2@^1.0.0"
9898
},

common/config/rush/pnpm-lock.yaml

Lines changed: 152 additions & 152 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
[{"definitionName":"lockStepVersion","policyName":"vstoryMain","version":"0.0.21","nextBump":"patch"}]
1+
[{"definitionName":"lockStepVersion","policyName":"vstoryMain","version":"0.0.22","nextBump":"patch"}]

docs/assets/examples/en/animate/bar-bounce.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ const dsl = {
9191
]
9292
}
9393

94-
const story = new VStory.Story(dsl, { dom: CONTAINER_ID, background: '#ebecf0' });
94+
const story = new VStory.Story(dsl, { dom: CONTAINER_ID, width: 400, height: 400, scaleX: 'auto', scaleY: 'auto', background: '#ebecf0' });
9595
const player = new VStory.Player(story);
9696
story.init(player);
9797

docs/assets/examples/en/animate/bar-leap.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ const dsl = {
9191
]
9292
}
9393

94-
const story = new VStory.Story(dsl, { dom: CONTAINER_ID, background: '#ebecf0' });
94+
const story = new VStory.Story(dsl, { dom: CONTAINER_ID, width: 400, height: 400, scaleX: 'auto', scaleY: 'auto', background: '#ebecf0' });
9595
const player = new VStory.Player(story);
9696
story.init(player);
9797

docs/assets/examples/en/animate/pie-leap.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ const dsl = {
9292
]
9393
}
9494

95-
const story = new VStory.Story(dsl, { dom: CONTAINER_ID, background: '#ebecf0' });
95+
const story = new VStory.Story(dsl, { dom: CONTAINER_ID, width: 400, height: 400, scaleX: 'auto', scaleY: 'auto', background: '#ebecf0' });
9696
const player = new VStory.Player(story);
9797
story.init(player);
9898

Lines changed: 204 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,204 @@
1+
---
2+
category: examples
3+
group: arrange
4+
title: vchart-arrange
5+
keywords: vchart-arrange
6+
order: 1-0
7+
cover: https://lf9-dp-fe-cms-tos.byteorg.com/obj/bit-cloud/vstory/bar-line-chart-arrange.gif
8+
---
9+
10+
# VChart Animation Arrangement
11+
12+
The `VChart` chart component can refer to [VChart Chart Elements](/vstory/demo/character/vchart) and is a generic Character element that can configure any VChart spec. So, after configuring a VChart spec, we can use VStory's animation arrangement capabilities to control the animation effects of different components, series, axes, legends, and other components of the chart.
13+
14+
In this demo, we will demonstrate the arrangement logic between bars, lines, and axes in a combined chart.
15+
16+
## Code Demo
17+
18+
```javascript livedemo template=vstory
19+
// 注册所有需要的内容
20+
VStory.registerAll();
21+
22+
const spec = {
23+
type: 'common',
24+
animation: false,
25+
seriesField: 'color',
26+
data: [
27+
{
28+
id: 'id0',
29+
values: [
30+
{ x: '周一', type: '早餐', y: 15 },
31+
{ x: '周一', type: '午餐', y: 25 },
32+
{ x: '周二', type: '早餐', y: 12 },
33+
{ x: '周二', type: '午餐', y: 30 },
34+
{ x: '周三', type: '早餐', y: 15 },
35+
{ x: '周三', type: '午餐', y: 24 },
36+
{ x: '周四', type: '早餐', y: 10 },
37+
{ x: '周四', type: '午餐', y: 25 },
38+
{ x: '周五', type: '早餐', y: 13 },
39+
{ x: '周五', type: '午餐', y: 20 },
40+
{ x: '周六', type: '早餐', y: 10 },
41+
{ x: '周六', type: '午餐', y: 22 },
42+
{ x: '周日', type: '早餐', y: 12 },
43+
{ x: '周日', type: '午餐', y: 19 }
44+
]
45+
},
46+
{
47+
id: 'id1',
48+
values: [
49+
{ x: '周一', type: '饮料', y: 22 },
50+
{ x: '周二', type: '饮料', y: 43 },
51+
{ x: '周三', type: '饮料', y: 33 },
52+
{ x: '周四', type: '饮料', y: 22 },
53+
{ x: '周五', type: '饮料', y: 10 },
54+
{ x: '周六', type: '饮料', y: 30 },
55+
{ x: '周日', type: '饮料', y: 50 }
56+
]
57+
}
58+
],
59+
series: [
60+
{
61+
type: 'bar',
62+
id: 'bar',
63+
dataIndex: 0,
64+
label: { visible: false },
65+
seriesField: 'type',
66+
dataIndex: 0,
67+
xField: ['x', 'type'],
68+
yField: 'y'
69+
},
70+
{
71+
type: 'line',
72+
id: 'line',
73+
dataIndex: 1,
74+
label: { visible: false },
75+
seriesField: 'type',
76+
xField: 'x',
77+
yField: 'y',
78+
stack: false
79+
}
80+
],
81+
axes: [
82+
{
83+
orient: 'left',
84+
id: 'axes-left',
85+
domainLine: { visible: true },
86+
seriesId: ['line'],
87+
grid: { visible: false }
88+
},
89+
{ orient: 'right', id: 'axes-right', domainLine: { visible: true }, seriesId: ['bar'], seriesIndex: [0] },
90+
{ orient: 'bottom', label: { visible: true }, type: 'band' }
91+
],
92+
legends: {
93+
visible: true,
94+
orient: 'bottom'
95+
}
96+
};
97+
98+
const dsl = {
99+
characters: [
100+
{
101+
type: 'VChart',
102+
id: 'bar-line-series',
103+
position: {
104+
top: 50,
105+
left: 50,
106+
width: 500,
107+
height: 300
108+
},
109+
options: {
110+
spec,
111+
panel: {
112+
fill: '#ffffff',
113+
shadowColor: 'rgba(0, 0, 0, 0.05)',
114+
shadowBlur: 10,
115+
shadowOffsetX: 4,
116+
shadowOffsetY: 4,
117+
cornerRadius: 8
118+
}
119+
}
120+
}
121+
],
122+
acts: [
123+
{
124+
id: 'default-chapter',
125+
scenes: [
126+
{
127+
id: 'scene0',
128+
actions: [
129+
{
130+
characterId: 'bar-line-series',
131+
characterActions: [
132+
{
133+
startTime: 0,
134+
action: 'appear',
135+
payload: [
136+
{
137+
// 除了柱子和右轴,其他模块执行appear动画
138+
selector: ':not(bar) :not(#axes-right)',
139+
animation: {
140+
duration: 2000,
141+
easing: 'linear'
142+
}
143+
}
144+
]
145+
},
146+
{
147+
startTime: 3000,
148+
action: 'appear',
149+
payload: [
150+
{
151+
// 柱子执行appear动画
152+
selector: 'bar',
153+
animation: {
154+
duration: 800,
155+
easing: 'linear'
156+
}
157+
}
158+
]
159+
},
160+
{
161+
startTime: 3000,
162+
action: 'appear',
163+
payload: [
164+
{
165+
// 右轴执行appear动画
166+
selector: '#axes-right',
167+
animation: {
168+
duration: 800,
169+
easing: 'linear'
170+
}
171+
}
172+
]
173+
},
174+
{
175+
startTime: 5500,
176+
action: 'disappear',
177+
payload: {
178+
style: {},
179+
animation: {
180+
// effect: 'fade',
181+
duration: 1000,
182+
easing: 'linear'
183+
}
184+
}
185+
}
186+
]
187+
}
188+
]
189+
}
190+
]
191+
}
192+
]
193+
};
194+
195+
const story = new VStory.Story(dsl, { dom: CONTAINER_ID, width: 600, height: 400, scaleX: 'auto', scaleY: 'auto', background: '#ebecf0' });
196+
const player = new VStory.Player(story);
197+
story.init(player);
198+
199+
player.play(1);
200+
window.vstory = story;
201+
202+
window['story'] = story;
203+
window['vstory'] = story;
204+
```

0 commit comments

Comments
 (0)