维度, 分普通维度,行维度,列维度, 设置行列维度, 图表将透视。
1{
2 "chartType": "columnParallel",
3 "dimensions": [
4 { "id": "category", "alias": "类别", "location": "dimension" },
5 { "id": "date", "alias": "日期", "location": "dimension" },
6 { "id": "region", "alias": "区域", "location": "dimension" }
7 ],
8 "measures": [{ "id": "profit", "alias": "利润" }],
9 "dataset": [
10 { "date": "2019", "region": "east", "category": "Grocery", "profit": 10 },
11 { "date": "2019", "region": "east", "category": "Beverages", "profit": 30 },
12 { "date": "2019", "region": "east", "category": "Dairy", "profit": 30 },
13 { "date": "2019", "region": "east", "category": "Household", "profit": 50 },
14 { "date": "2019", "region": "east", "category": "Personal", "profit": 40 },
15 { "date": "2019", "region": "west", "category": "Grocery", "profit": 10 },
16 { "date": "2019", "region": "west", "category": "Beverages", "profit": 30 },
17 { "date": "2019", "region": "west", "category": "Dairy", "profit": 30 },
18 { "date": "2019", "region": "west", "category": "Household", "profit": 50 },
19 { "date": "2019", "region": "west", "category": "Personal", "profit": 40 },
20
21 { "date": "2020", "region": "east", "category": "Grocery", "profit": 10 },
22 { "date": "2020", "region": "east", "category": "Beverages", "profit": 30 },
23 { "date": "2020", "region": "east", "category": "Dairy", "profit": 30 },
24 { "date": "2020", "region": "east", "category": "Household", "profit": 50 },
25 { "date": "2020", "region": "east", "category": "Personal", "profit": 40 },
26 { "date": "2020", "region": "west", "category": "Grocery", "profit": 10 },
27 { "date": "2020", "region": "west", "category": "Beverages", "profit": 30 },
28 { "date": "2020", "region": "west", "category": "Dairy", "profit": 30 },
29 { "date": "2020", "region": "west", "category": "Household", "profit": 50 },
30 { "date": "2020", "region": "west", "category": "Personal", "profit": 40 }
31 ]
32}
1{
2 "chartType": "columnParallel",
3 "dimensions": [
4 { "id": "category", "alias": "类别", "location": "dimension" },
5 { "id": "date", "alias": "日期", "location": "columnDimension" },
6 { "id": "region", "alias": "区域", "location": "columnDimension" }
7 ],
8 "measures": [{ "id": "profit", "alias": "利润" }],
9 "dataset": [
10 { "date": "2019", "region": "east", "category": "Grocery", "profit": 10 },
11 { "date": "2019", "region": "east", "category": "Beverages", "profit": 30 },
12 { "date": "2019", "region": "east", "category": "Dairy", "profit": 30 },
13 { "date": "2019", "region": "east", "category": "Household", "profit": 50 },
14 { "date": "2019", "region": "east", "category": "Personal", "profit": 40 },
15 { "date": "2019", "region": "west", "category": "Grocery", "profit": 10 },
16 { "date": "2019", "region": "west", "category": "Beverages", "profit": 30 },
17 { "date": "2019", "region": "west", "category": "Dairy", "profit": 30 },
18 { "date": "2019", "region": "west", "category": "Household", "profit": 50 },
19 { "date": "2019", "region": "west", "category": "Personal", "profit": 40 },
20
21 { "date": "2020", "region": "east", "category": "Grocery", "profit": 10 },
22 { "date": "2020", "region": "east", "category": "Beverages", "profit": 30 },
23 { "date": "2020", "region": "east", "category": "Dairy", "profit": 30 },
24 { "date": "2020", "region": "east", "category": "Household", "profit": 50 },
25 { "date": "2020", "region": "east", "category": "Personal", "profit": 40 },
26 { "date": "2020", "region": "west", "category": "Grocery", "profit": 10 },
27 { "date": "2020", "region": "west", "category": "Beverages", "profit": 30 },
28 { "date": "2020", "region": "west", "category": "Dairy", "profit": 30 },
29 { "date": "2020", "region": "west", "category": "Household", "profit": 50 },
30 { "date": "2020", "region": "west", "category": "Personal", "profit": 40 }
31 ]
32}
1{
2 "chartType": "columnParallel",
3 "dimensions": [
4 { "id": "category", "alias": "类别", "location": "dimension" },
5 { "id": "date", "alias": "日期", "location": "rowDimension" },
6 { "id": "region", "alias": "区域", "location": "rowDimension" }
7 ],
8 "measures": [{ "id": "profit", "alias": "利润" }],
9 "dataset": [
10 { "date": "2019", "region": "east", "category": "Grocery", "profit": 10 },
11 { "date": "2019", "region": "east", "category": "Beverages", "profit": 30 },
12 { "date": "2019", "region": "east", "category": "Dairy", "profit": 30 },
13 { "date": "2019", "region": "east", "category": "Household", "profit": 50 },
14 { "date": "2019", "region": "east", "category": "Personal", "profit": 40 },
15 { "date": "2019", "region": "west", "category": "Grocery", "profit": 10 },
16 { "date": "2019", "region": "west", "category": "Beverages", "profit": 30 },
17 { "date": "2019", "region": "west", "category": "Dairy", "profit": 30 },
18 { "date": "2019", "region": "west", "category": "Household", "profit": 50 },
19 { "date": "2019", "region": "west", "category": "Personal", "profit": 40 },
20
21 { "date": "2020", "region": "east", "category": "Grocery", "profit": 10 },
22 { "date": "2020", "region": "east", "category": "Beverages", "profit": 30 },
23 { "date": "2020", "region": "east", "category": "Dairy", "profit": 30 },
24 { "date": "2020", "region": "east", "category": "Household", "profit": 50 },
25 { "date": "2020", "region": "east", "category": "Personal", "profit": 40 },
26 { "date": "2020", "region": "west", "category": "Grocery", "profit": 10 },
27 { "date": "2020", "region": "west", "category": "Beverages", "profit": 30 },
28 { "date": "2020", "region": "west", "category": "Dairy", "profit": 30 },
29 { "date": "2020", "region": "west", "category": "Household", "profit": 50 },
30 { "date": "2020", "region": "west", "category": "Personal", "profit": 40 }
31 ]
32}
1{
2 "chartType": "columnParallel",
3 "dimensions": [
4 { "id": "category", "alias": "类别", "location": "dimension" },
5 { "id": "date", "alias": "日期", "location": "columnDimension" },
6 { "id": "region", "alias": "区域", "location": "rowDimension" }
7 ],
8 "measures": [{ "id": "profit", "alias": "利润" }],
9 "dataset": [
10 { "date": "2019", "region": "east", "category": "Grocery", "profit": 10 },
11 { "date": "2019", "region": "east", "category": "Beverages", "profit": 30 },
12 { "date": "2019", "region": "east", "category": "Dairy", "profit": 30 },
13 { "date": "2019", "region": "east", "category": "Household", "profit": 50 },
14 { "date": "2019", "region": "east", "category": "Personal", "profit": 40 },
15 { "date": "2019", "region": "west", "category": "Grocery", "profit": 10 },
16 { "date": "2019", "region": "west", "category": "Beverages", "profit": 30 },
17 { "date": "2019", "region": "west", "category": "Dairy", "profit": 30 },
18 { "date": "2019", "region": "west", "category": "Household", "profit": 50 },
19 { "date": "2019", "region": "west", "category": "Personal", "profit": 40 },
20
21 { "date": "2020", "region": "east", "category": "Grocery", "profit": 10 },
22 { "date": "2020", "region": "east", "category": "Beverages", "profit": 30 },
23 { "date": "2020", "region": "east", "category": "Dairy", "profit": 30 },
24 { "date": "2020", "region": "east", "category": "Household", "profit": 50 },
25 { "date": "2020", "region": "east", "category": "Personal", "profit": 40 },
26 { "date": "2020", "region": "west", "category": "Grocery", "profit": 10 },
27 { "date": "2020", "region": "west", "category": "Beverages", "profit": 30 },
28 { "date": "2020", "region": "west", "category": "Dairy", "profit": 30 },
29 { "date": "2020", "region": "west", "category": "Household", "profit": 50 },
30 { "date": "2020", "region": "west", "category": "Personal", "profit": 40 }
31 ]
32}