-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstandardTheme.py
142 lines (139 loc) · 4.34 KB
/
standardTheme.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
def standardTheme():
# Typography
font = "Arial"
labelFont = "Arial"
sourceFont = "Arial"
fontColor = '#4d4d4d'
# Axes
axisColor = "#DEDDDD"
gridColor = "#DEDDDD"
markColor = "#1696d2"
background = 'white'
titleFontSize = 20
titleFontWeight=300
subTitleFontSize = 15
axisTitleFontSize = 12
axisTitleFontWeight=400
textFontSize = 12
labelFontSize = 10
# Colors
main_palette = ["#a6cee3",
"#1f78b4",
"#b2df8a",
"#33a02c",
"#fb9a99",
"#e31a1c",
"#fdbf6f",
"#ff7f00",
]
sequential_palette = ["#cfe8f3",
"#a2d4ec",
"#73bfe2",
"#46abdb",
"#1696d2",
"#12719e",
]
return {
"padding": {"left": 5, "top": 50, "right": 5, "bottom": 5},
"width":500,
"height":500,
"config": {
"title": {
"fontSize": titleFontSize,
"lineHeight": 100,
"fontWeight": titleFontWeight,
"font": font,
"anchor": "start", # equivalent of left-aligned.
"color": fontColor,
"offset": 30,
},
"guide-title":{
"color": "Monospace",
"fontSize": subTitleFontSize,
"font": labelFont
},
"axisX": {
"domain": True,
"domainColor": axisColor,
"domainWidth": 1,
"grid": False,
"domainDashOffset": 10,
"labelFont": labelFont,
"labelFontSize": labelFontSize,
"labelAngle": 0,
"tickColor": axisColor,
"titleFont": font,
"titleFontSize": axisTitleFontSize,
"titleFontWeight": axisTitleFontWeight,
"titlePadding": 10,
},
"axisY": {
"domain": False,
"grid": True,
"gridColor": gridColor,
"gridWidth": 1,
"gridDash":[5,2],
"domainDashOffset": 10,
"labelFont": labelFont,
"labelFontSize": labelFontSize,
"labelAngle": 0,
"titleFont": font,
"titleFontSize": axisTitleFontSize,
"titleFontWeight": axisTitleFontWeight,
"titlePadding": 10,
},
"range": {
"category": main_palette,
"diverging": sequential_palette,
},
"legend": {
"labelFont": labelFont,
"labelFontSize": textFontSize,
"symbolType": "circle",
"symbolSize": 50,
"titleFont": font,
"titleFontSize": axisTitleFontSize,
"title": "", # set it to no-title by default
# "orient": "top-left", # so it's right next to the y-axis
# "offset": 0, # literally right next to the y-axis.
},
"view": {
'strokeWidth':0, #border around charts. to show, set the border to >0
},
### MARKS CONFIGURATIONS ###
"area": {
"fill": markColor,
},
"line": {
"color": markColor,
"stroke": markColor,
"strokeWidth": 1,
},
"trail": {
"color": markColor,
"stroke": markColor
},
"path": {
"stroke": markColor,
},
"point": {
"filled": True,
},
"text": {
"font": sourceFont,
"color": markColor,
"fontSize": textFontSize,
"align": "right",
"fontWeight": 400,
"size": 11,
},
"bar": {
"fill": markColor,
"strokeWidth": 0,
},
"header":{
"titleFontSize": axisTitleFontSize,
"titleFontWeight": axisTitleFontWeight
}
}
}