Skip to content

Commit f550188

Browse files
leondt1xueren.dt
andauthored
feat: support dark theme (#166)
* feat: support dark theme * feat: all charts support dark mode --------- Co-authored-by: xueren.dt <xueren.dt@antgroup.com>
1 parent f29f531 commit f550188

23 files changed

Lines changed: 118 additions & 54 deletions

__tests__/charts/area.json

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,15 @@
1111
"items": {
1212
"type": "object",
1313
"properties": {
14-
"time": { "type": "string" },
15-
"value": { "type": "number" },
16-
"group": { "type": "string" }
14+
"time": {
15+
"type": "string"
16+
},
17+
"value": {
18+
"type": "number"
19+
},
20+
"group": {
21+
"type": "string"
22+
}
1723
},
1824
"required": ["time", "value"]
1925
},
@@ -50,7 +56,7 @@
5056
"theme": {
5157
"default": "default",
5258
"description": "Set the theme for the chart, optional, default is 'default'.",
53-
"enum": ["default", "academy"],
59+
"enum": ["default", "academy", "dark"],
5460
"type": "string"
5561
},
5662
"width": {

__tests__/charts/bar.json

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,15 @@
1111
"items": {
1212
"type": "object",
1313
"properties": {
14-
"category": { "type": "string" },
15-
"value": { "type": "number" },
16-
"group": { "type": "string" }
14+
"category": {
15+
"type": "string"
16+
},
17+
"value": {
18+
"type": "number"
19+
},
20+
"group": {
21+
"type": "string"
22+
}
1723
},
1824
"required": ["category", "value"]
1925
},
@@ -55,7 +61,7 @@
5561
"theme": {
5662
"default": "default",
5763
"description": "Set the theme for the chart, optional, default is 'default'.",
58-
"enum": ["default", "academy"],
64+
"enum": ["default", "academy", "dark"],
5965
"type": "string"
6066
},
6167
"width": {

__tests__/charts/boxplot.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
},
5353
"theme": {
5454
"type": "string",
55-
"enum": ["default", "academy"],
55+
"enum": ["default", "academy", "dark"],
5656
"default": "default",
5757
"description": "Set the theme for the chart, optional, default is 'default'."
5858
},

__tests__/charts/column.json

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,15 @@
1111
"items": {
1212
"type": "object",
1313
"properties": {
14-
"category": { "type": "string" },
15-
"value": { "type": "number" },
16-
"group": { "type": "string" }
14+
"category": {
15+
"type": "string"
16+
},
17+
"value": {
18+
"type": "number"
19+
},
20+
"group": {
21+
"type": "string"
22+
}
1723
},
1824
"required": ["category", "value"]
1925
},
@@ -55,7 +61,7 @@
5561
"theme": {
5662
"default": "default",
5763
"description": "Set the theme for the chart, optional, default is 'default'.",
58-
"enum": ["default", "academy"],
64+
"enum": ["default", "academy", "dark"],
5965
"type": "string"
6066
},
6167
"width": {

__tests__/charts/dual-axes.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"theme": {
99
"default": "default",
1010
"description": "Set the theme for the chart, optional, default is 'default'.",
11-
"enum": ["default", "academy"],
11+
"enum": ["default", "academy", "dark"],
1212
"type": "string"
1313
},
1414
"style": {

__tests__/charts/fishbone-diagram.json

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,16 @@
88
"data": {
99
"type": "object",
1010
"properties": {
11-
"name": { "type": "string" },
11+
"name": {
12+
"type": "string"
13+
},
1214
"children": {
1315
"type": "array",
1416
"items": {
1517
"properties": {
16-
"name": { "type": "string" },
18+
"name": {
19+
"type": "string"
20+
},
1721
"children": {
1822
"type": "array",
1923
"items": {
@@ -44,7 +48,7 @@
4448
"theme": {
4549
"default": "default",
4650
"description": "Set the theme for the chart, optional, default is 'default'.",
47-
"enum": ["default", "academy"],
51+
"enum": ["default", "academy", "dark"],
4852
"type": "string"
4953
},
5054
"width": {

__tests__/charts/flow-diagram.json

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,9 @@
1313
"minItems": 1,
1414
"items": {
1515
"properties": {
16-
"name": { "type": "string" }
16+
"name": {
17+
"type": "string"
18+
}
1719
},
1820
"required": ["name"],
1921
"type": "object"
@@ -23,9 +25,16 @@
2325
"type": "array",
2426
"items": {
2527
"properties": {
26-
"name": { "type": "string", "default": "" },
27-
"source": { "type": "string" },
28-
"target": { "type": "string" }
28+
"name": {
29+
"type": "string",
30+
"default": ""
31+
},
32+
"source": {
33+
"type": "string"
34+
},
35+
"target": {
36+
"type": "string"
37+
}
2938
},
3039
"required": ["source", "target"],
3140
"type": "object"
@@ -38,7 +47,7 @@
3847
"theme": {
3948
"default": "default",
4049
"description": "Set the theme for the chart, optional, default is 'default'.",
41-
"enum": ["default", "academy"],
50+
"enum": ["default", "academy", "dark"],
4251
"type": "string"
4352
},
4453
"style": {

__tests__/charts/funnel.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
"theme": {
3030
"default": "default",
3131
"description": "Set the theme for the chart, optional, default is 'default'.",
32-
"enum": ["default", "academy"],
32+
"enum": ["default", "academy", "dark"],
3333
"type": "string"
3434
},
3535
"style": {

__tests__/charts/histogram.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
"theme": {
3232
"default": "default",
3333
"description": "Set the theme for the chart, optional, default is 'default'.",
34-
"enum": ["default", "academy"],
34+
"enum": ["default", "academy", "dark"],
3535
"type": "string"
3636
},
3737
"style": {

__tests__/charts/line.json

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,12 @@
1111
"items": {
1212
"type": "object",
1313
"properties": {
14-
"time": { "type": "string" },
15-
"value": { "type": "number" }
14+
"time": {
15+
"type": "string"
16+
},
17+
"value": {
18+
"type": "number"
19+
}
1620
},
1721
"required": ["time", "value"]
1822
},
@@ -26,7 +30,7 @@
2630
"theme": {
2731
"default": "default",
2832
"description": "Set the theme for the chart, optional, default is 'default'.",
29-
"enum": ["default", "academy"],
33+
"enum": ["default", "academy", "dark"],
3034
"type": "string"
3135
},
3236
"style": {

0 commit comments

Comments
 (0)