1{
2 "chartType": "pie",
3 "dimensions": [
4 { "id": "category", "alias": "类别" },
5 { "id": "date", "alias": "日期", "encoding": "column" },
6 { "id": "region", "alias": "区域", "encoding": "row" }
7 ],
8 "measures": [
9 { "id": "sales", "alias": "销售额", "parentId": "group-sales" },
10 { "id": "profit", "alias": "利润" }
11 ],
12 "dataset": [
13 { "date": "2019", "region": "east", "category": "Grocery", "profit": 10, "sales": 100 },
14 { "date": "2019", "region": "east", "category": "Beverages", "profit": 30, "sales": 3200 },
15 { "date": "2019", "region": "east", "category": "Dairy", "profit": 30, "sales": 300 },
16 { "date": "2019", "region": "east", "category": "Household", "profit": 50, "sales": 2400 },
17 { "date": "2019", "region": "east", "category": "Personal", "profit": 40, "sales": 500 },
18 { "date": "2019", "region": "west", "category": "Grocery", "profit": 10, "sales": 100 },
19 { "date": "2019", "region": "west", "category": "Beverages", "profit": 30, "sales": 3200 },
20 { "date": "2019", "region": "west", "category": "Dairy", "profit": 30, "sales": 300 },
21 { "date": "2019", "region": "west", "category": "Household", "profit": 50, "sales": 2400 },
22 { "date": "2019", "region": "west", "category": "Personal", "profit": 40, "sales": 500 },
23
24 { "date": "2020", "region": "east", "category": "Grocery", "profit": 10, "sales": 100 },
25 { "date": "2020", "region": "east", "category": "Beverages", "profit": 30, "sales": 3200 },
26 { "date": "2020", "region": "east", "category": "Dairy", "profit": 30, "sales": 300 },
27 { "date": "2020", "region": "east", "category": "Household", "profit": 50, "sales": 2400 },
28 { "date": "2020", "region": "east", "category": "Personal", "profit": 40, "sales": 500 },
29 { "date": "2020", "region": "west", "category": "Grocery", "profit": 10, "sales": 100 },
30 { "date": "2020", "region": "west", "category": "Beverages", "profit": 30, "sales": 3200 },
31 { "date": "2020", "region": "west", "category": "Dairy", "profit": 30, "sales": 300 },
32 { "date": "2020", "region": "west", "category": "Household", "profit": 50, "sales": 2400 },
33 { "date": "2020", "region": "west", "category": "Personal", "profit": 40, "sales": 500 }
34 ]
35}