Skip to content

Commit

Permalink
docs: update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
neuqzxy committed Nov 26, 2024
1 parent 1f62fbc commit 477d2e3
Showing 1 changed file with 18 additions and 17 deletions.
35 changes: 18 additions & 17 deletions docs/assets/guide/zh/tutorial_docs/Basic/A_Basic_DSL.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

1. 一个基于VChart的简单的柱状图
```javascript livedemo template=vchart
const mockData: any = [];
const mockData = [];
const types = ['A', 'B', 'C'];

types.forEach(type => {
Expand Down Expand Up @@ -46,7 +46,7 @@ window['vchart'] = vchart;

2. 一个基于VChart的简单的面积图
```javascript livedemo template=vchart
const mockData: any = [];
const mockData = [];
const types = ['A', 'B', 'C'];

types.forEach(type => {
Expand All @@ -60,7 +60,7 @@ const spec = {
data: [
{
id: 'id0',
values: mockData.filter((item: any) => item.type !== 'C')
values: mockData.filter((item) => item.type !== 'C')
}
],
xField: 'month',
Expand All @@ -83,7 +83,7 @@ window['vchart'] = vchart;

3. 一个基于VChart的简单的雷达图
```javascript livedemo template=vchart
const mockData: any = [];
const mockData = [];
const types = ['A', 'B', 'C'];

types.forEach(type => {
Expand Down Expand Up @@ -134,7 +134,7 @@ window['vchart'] = vchart;
```
4. 一个基于VChart的简单的玫瑰图
```javascript livedemo template=vchart
const mockData: any = [];
const mockData = [];
const types = ['A', 'B', 'C'];

types.forEach(type => {
Expand Down Expand Up @@ -172,7 +172,7 @@ window['vchart'] = vchart;
```
5. 一个基于VChart的简单的仪表盘图
```javascript livedemo template=vchart
const mockData: any = [];
const mockData = [];
const types = ['A', 'B', 'C'];

types.forEach(type => {
Expand Down Expand Up @@ -213,6 +213,11 @@ window['vchart'] = vchart;
```javascript livedemo template=vstory
// 注册所有需要的内容
VStory.registerAll();

const story = new VStory.Story(null, { dom: CONTAINER_ID, background: '#ebecf0' });
const player = new VStory.Player(story);
story.init(player);

story.addCharacterWithAppear({
type: 'Text',
id: 'title',
Expand All @@ -239,10 +244,6 @@ story.addCharacterWithAppear({
}
});

const story = new VStory.Story(null, { dom: CONTAINER_ID, background: '#ebecf0' });
const player = new VStory.Player(story);
story.init(player);

player.play(-1);
window.vstory = story;
```
Expand All @@ -251,7 +252,7 @@ window.vstory = story;
```javascript livedemo template=vstory
// 注册所有需要的内容
VStory.registerAll();
const mockData: any = [];
const mockData = [];
const types = ['A', 'B', 'C'];

types.forEach(type => {
Expand All @@ -260,6 +261,10 @@ types.forEach(type => {
}
});

const story = new VStory.Story(null, { dom: CONTAINER_ID, background: '#ebecf0' });
const player = new VStory.Player(story);
story.init(player);

story.addCharacterWithAppear({
type: 'WaveScatter',
id: 'wave-scatter',
Expand All @@ -272,7 +277,7 @@ story.addCharacterWithAppear({
},
options: {
data: {
values: mockData.filter((item: any) => item.type === 'A')
values: mockData.filter((item) => item.type === 'A')
},
categoryField: 'month',
valueField: 'value',
Expand All @@ -295,10 +300,6 @@ story.addCharacterWithAppear({
}
});

const story = new VStory.Story(null, { dom: CONTAINER_ID, background: '#ebecf0' });
const player = new VStory.Player(story);
story.init(player);

player.play(-1);
window.vstory = story;
```
Expand Down Expand Up @@ -394,7 +395,7 @@ const characters = [
},
options: {
data: {
values: mockData.filter((item: any) => item.type === 'A')
values: mockData.filter((item) => item.type === 'A')
},
categoryField: 'month',
valueField: 'value',
Expand Down

0 comments on commit 477d2e3

Please sign in to comment.