mirror of
https://gitee.com/dromara/go-view.git
synced 2026-05-12 00:00:01 +08:00
feat: 新增数据mock,数据字段映射
This commit is contained in:
@@ -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 },
|
||||
|
||||
Reference in New Issue
Block a user