color

colorScheme

1{
2  "chartType": "columnParallel",
3  "color": {
4    "colorScheme": ["#cdb4db", "#ffc8dd", "#ffafcc", "#bde0fe", "#a2d2ff"]
5  },
6  "dataset": [
7    { "date": "2019", "type": "A", "profit": 10, "sales": 20 },
8    { "date": "2019", "type": "B", "profit": 30, "sales": 60 },
9    { "date": "2019", "type": "C", "profit": 30, "sales": 60 },
10    { "date": "2019", "type": "D", "profit": 50, "sales": 100 },
11    { "date": "2019", "type": "E", "profit": 40, "sales": 80 },
12
13    { "date": "2020", "type": "A", "profit": 10, "sales": 20 },
14    { "date": "2020", "type": "B", "profit": 30, "sales": 60 },
15    { "date": "2020", "type": "C", "profit": 30, "sales": 60 },
16    { "date": "2020", "type": "D", "profit": 50, "sales": 100 },
17    { "date": "2020", "type": "E", "profit": 40, "sales": 80 }
18  ],
19  "dimensions": [
20    {
21      "id": "date",
22      "alias": "日期"
23    },
24    {
25      "id": "type",
26      "alias": "类型"
27    }
28  ],
29  "measures": [
30    { "id": "profit", "alias": "利润" },
31    { "id": "sales", "alias": "销售额" }
32  ]
33}

colorMapping

1{
2  "chartType": "columnParallel",
3  "color": {
4    "colorMapping": {
5      "利润": "yellow",
6      "E": "green",
7      "E-销售额": "red"
8    }
9  },
10  "dataset": [
11    { "date": "2019", "type": "A", "profit": 10, "sales": 20 },
12    { "date": "2019", "type": "B", "profit": 30, "sales": 60 },
13    { "date": "2019", "type": "C", "profit": 30, "sales": 60 },
14    { "date": "2019", "type": "D", "profit": 50, "sales": 100 },
15    { "date": "2019", "type": "E", "profit": 40, "sales": 80 },
16
17    { "date": "2020", "type": "A", "profit": 10, "sales": 20 },
18    { "date": "2020", "type": "B", "profit": 30, "sales": 60 },
19    { "date": "2020", "type": "C", "profit": 30, "sales": 60 },
20    { "date": "2020", "type": "D", "profit": 50, "sales": 100 },
21    { "date": "2020", "type": "E", "profit": 40, "sales": 80 }
22  ],
23  "dimensions": [
24    {
25      "id": "date",
26      "alias": "日期"
27    },
28    {
29      "id": "type",
30      "alias": "类型"
31    }
32  ],
33  "measures": [
34    { "id": "profit", "alias": "利润" },
35    { "id": "sales", "alias": "销售额" }
36  ]
37}