feat: 新增数据mock,数据字段映射

This commit is contained in:
奔跑的面条
2024-12-22 12:51:02 +08:00
parent 152786c652
commit 3ae9aac2d9
11 changed files with 153 additions and 108 deletions
@@ -14,7 +14,7 @@ export const option: IBarOption & { dataset?: any } = {
dataset: data,
stack: true,
xField: ['year', 'type'],
yField: 'value',
yField: ['value'],
seriesField: 'type',
// 业务配置(后续会被转换为图表spec)
category: VChartBarCommonConfig.category,
@@ -10,6 +10,7 @@
{ "type": "Autocracies", "year": "2000", "value": 89 },
{ "type": "Autocracies", "year": "2010", "value": 80 },
{ "type": "Autocracies", "year": "2018", "value": 80 },
{ "type": "Democracies", "year": "1930", "value": 22 },
{ "type": "Democracies", "year": "1940", "value": 13 },
{ "type": "Democracies", "year": "1950", "value": 25 },