playbook_ui 13.12.0.pre.alpha.play1051highchartstest1567 → 13.12.0.pre.alpha.play1051testhighcharts1579
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/pb_kits/playbook/index.js +3 -3
- data/app/pb_kits/playbook/pb_bar_graph/_bar_graph.tsx +2 -2
- data/app/pb_kits/playbook/pb_circle_chart/_circle_chart.tsx +199 -199
- data/app/pb_kits/playbook/pb_dashboard/pbChartsDarkTheme.ts +207 -459
- data/app/pb_kits/playbook/pb_dashboard/pbChartsLightTheme.ts +209 -207
- data/app/pb_kits/playbook/pb_gauge/_gauge.tsx +214 -214
- data/app/pb_kits/playbook/pb_line_graph/_line_graph.tsx +3 -3
- data/app/pb_kits/playbook/pb_treemap_chart/_treemap_chart.tsx +3 -2
- data/app/pb_kits/playbook/playbook-doc.js +2 -2
- data/app/pb_kits/playbook/playbook-rails-react-bindings.js +2 -2
- data/dist/playbook-rails.js +7 -7
- data/lib/playbook/version.rb +1 -1
- metadata +2 -2
@@ -3,257 +3,259 @@ import typography from '../tokens/exports/_typography.scss'
|
|
3
3
|
|
4
4
|
import { ThemeProps } from './themeTypes'
|
5
5
|
|
6
|
-
import Highcharts from 'highcharts'
|
6
|
+
//import Highcharts from 'highcharts'
|
7
7
|
|
8
8
|
const pbButtonHoverColor = '#004ebb'
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
colors: [
|
14
|
-
colors.data_1,
|
15
|
-
colors.data_2,
|
16
|
-
colors.data_3,
|
17
|
-
colors.data_4,
|
18
|
-
colors.data_5,
|
19
|
-
colors.data_6,
|
20
|
-
colors.data_7,
|
21
|
-
],
|
22
|
-
chart: {
|
23
|
-
borderWidth: 0,
|
24
|
-
borderRadius: 0,
|
25
|
-
plotBackgroundColor: null,
|
26
|
-
plotShadow: false,
|
27
|
-
plotBorderWidth: 0,
|
28
|
-
},
|
29
|
-
title: {
|
30
|
-
style: {
|
31
|
-
color: colors.text_lt_default,
|
32
|
-
fontFamily: typography.font_family_base,
|
33
|
-
fontWeight: typography.regular,
|
34
|
-
fontSize: typography.heading_3,
|
9
|
+
function highchartsTheme(highcharts: any): ThemeProps {
|
10
|
+
return {
|
11
|
+
lang: {
|
12
|
+
thousandsSep: ',',
|
35
13
|
},
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
fontFamily: typography.font_family_base,
|
52
|
-
color: colors.text_lt_lighter,
|
53
|
-
fontWeight: typography.bold,
|
54
|
-
fontSize: typography.text_smaller,
|
55
|
-
},
|
14
|
+
colors: [
|
15
|
+
colors.data_1,
|
16
|
+
colors.data_2,
|
17
|
+
colors.data_3,
|
18
|
+
colors.data_4,
|
19
|
+
colors.data_5,
|
20
|
+
colors.data_6,
|
21
|
+
colors.data_7,
|
22
|
+
],
|
23
|
+
chart: {
|
24
|
+
borderWidth: 0,
|
25
|
+
borderRadius: 0,
|
26
|
+
plotBackgroundColor: null,
|
27
|
+
plotShadow: false,
|
28
|
+
plotBorderWidth: 0,
|
56
29
|
},
|
57
30
|
title: {
|
58
31
|
style: {
|
59
32
|
color: colors.text_lt_default,
|
60
33
|
fontFamily: typography.font_family_base,
|
61
34
|
fontWeight: typography.regular,
|
62
|
-
fontSize: typography.
|
35
|
+
fontSize: typography.heading_3,
|
63
36
|
},
|
64
37
|
},
|
65
|
-
|
66
|
-
yAxis: {
|
67
|
-
alternateGridColor: null,
|
68
|
-
minorTickInterval: null,
|
69
|
-
gridLineColor: colors.border_light,
|
70
|
-
minorGridLineColor: colors.border_light,
|
71
|
-
lineWidth: 0,
|
72
|
-
tickWidth: 0,
|
73
|
-
labels: {
|
38
|
+
subtitle: {
|
74
39
|
style: {
|
75
40
|
fontFamily: typography.font_family_base,
|
76
|
-
color: colors.
|
77
|
-
fontWeight: typography.
|
78
|
-
fontSize: typography.
|
41
|
+
color: colors.text_lt_light,
|
42
|
+
fontWeight: typography.regular,
|
43
|
+
fontSize: typography.text_base,
|
79
44
|
},
|
80
45
|
},
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
46
|
+
xAxis: {
|
47
|
+
gridLineWidth: 0,
|
48
|
+
lineColor: colors.border_light,
|
49
|
+
tickColor: colors.border_light,
|
50
|
+
labels: {
|
51
|
+
style: {
|
52
|
+
fontFamily: typography.font_family_base,
|
53
|
+
color: colors.text_lt_lighter,
|
54
|
+
fontWeight: typography.bold,
|
55
|
+
fontSize: typography.text_smaller,
|
56
|
+
},
|
87
57
|
},
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
itemStyle: {
|
95
|
-
fontFamily: typography.font_family_base,
|
96
|
-
color: colors.text_lt_light,
|
97
|
-
fontWeight: typography.regular,
|
98
|
-
fontSize: typography.text_smaller,
|
99
|
-
},
|
100
|
-
itemHoverStyle: {
|
101
|
-
color: colors.text_lt_default,
|
102
|
-
},
|
103
|
-
itemHiddenStyle: {
|
104
|
-
color: colors.text_lt_lighter,
|
105
|
-
},
|
106
|
-
},
|
107
|
-
labels: {
|
108
|
-
style: {
|
109
|
-
color: colors.primary,
|
110
|
-
},
|
111
|
-
},
|
112
|
-
tooltip: {
|
113
|
-
backgroundColor: {
|
114
|
-
linearGradient: { x1: 0, y1: 0, x2: 0, y2: 1 },
|
115
|
-
stops: [
|
116
|
-
[0, colors.bg_dark],
|
117
|
-
[1, colors.bg_dark],
|
118
|
-
],
|
119
|
-
},
|
120
|
-
shadow: false,
|
121
|
-
borderWidth: 0,
|
122
|
-
borderRadius: 10,
|
123
|
-
style: {
|
124
|
-
fontFamily: typography.font_family_base,
|
125
|
-
color: colors.text_dk_default,
|
126
|
-
fontWeight: typography.regular,
|
127
|
-
fontSize: typography.text_smaller,
|
128
|
-
},
|
129
|
-
},
|
130
|
-
// specific to gauge
|
131
|
-
// unfilled gauge color
|
132
|
-
pane: {
|
133
|
-
background: {
|
134
|
-
borderColor: colors.border_light,
|
135
|
-
},
|
136
|
-
},
|
137
|
-
|
138
|
-
plotOptions: {
|
139
|
-
series: {
|
140
|
-
type: 'area',
|
141
|
-
nullColor: colors.text_lt_lighter,
|
142
|
-
fillColor: {
|
143
|
-
linearGradient: {
|
144
|
-
x1: 0,
|
145
|
-
y1: 0,
|
146
|
-
x2: 0,
|
147
|
-
y2: 1,
|
58
|
+
title: {
|
59
|
+
style: {
|
60
|
+
color: colors.text_lt_default,
|
61
|
+
fontFamily: typography.font_family_base,
|
62
|
+
fontWeight: typography.regular,
|
63
|
+
fontSize: typography.heading_4,
|
148
64
|
},
|
149
|
-
stops: [
|
150
|
-
[0, Highcharts.getOptions().colors[0]],
|
151
|
-
[1, 'white'],
|
152
|
-
],
|
153
65
|
},
|
154
|
-
threshold: null,
|
155
66
|
},
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
colors.data_6,
|
165
|
-
colors.data_7,
|
166
|
-
],
|
167
|
-
dataLabels: {
|
67
|
+
yAxis: {
|
68
|
+
alternateGridColor: null,
|
69
|
+
minorTickInterval: null,
|
70
|
+
gridLineColor: colors.border_light,
|
71
|
+
minorGridLineColor: colors.border_light,
|
72
|
+
lineWidth: 0,
|
73
|
+
tickWidth: 0,
|
74
|
+
labels: {
|
168
75
|
style: {
|
169
76
|
fontFamily: typography.font_family_base,
|
77
|
+
color: colors.text_lt_lighter,
|
78
|
+
fontWeight: typography.bold,
|
79
|
+
fontSize: typography.text_smaller,
|
80
|
+
},
|
81
|
+
},
|
82
|
+
title: {
|
83
|
+
style: {
|
84
|
+
fontFamily: typography.font_family_base,
|
85
|
+
color: colors.text_lt_lighter,
|
86
|
+
fontWeight: typography.bold,
|
170
87
|
fontSize: typography.text_smaller,
|
171
|
-
color: colors.text_lt_light,
|
172
|
-
fontWeight: typography.regular,
|
173
88
|
},
|
174
89
|
},
|
175
90
|
},
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
91
|
+
legend: {
|
92
|
+
layout: 'horizontal',
|
93
|
+
align: 'center',
|
94
|
+
verticalAlign: 'bottom',
|
95
|
+
itemStyle: {
|
96
|
+
fontFamily: typography.font_family_base,
|
97
|
+
color: colors.text_lt_light,
|
98
|
+
fontWeight: typography.regular,
|
99
|
+
fontSize: typography.text_smaller,
|
181
100
|
},
|
182
|
-
|
183
|
-
|
101
|
+
itemHoverStyle: {
|
102
|
+
color: colors.text_lt_default,
|
184
103
|
},
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
104
|
+
itemHiddenStyle: {
|
105
|
+
color: colors.text_lt_lighter,
|
106
|
+
},
|
107
|
+
},
|
108
|
+
labels: {
|
109
|
+
style: {
|
110
|
+
color: colors.primary,
|
111
|
+
},
|
112
|
+
},
|
113
|
+
tooltip: {
|
114
|
+
backgroundColor: {
|
115
|
+
linearGradient: { x1: 0, y1: 0, x2: 0, y2: 1 },
|
116
|
+
stops: [
|
117
|
+
[0, colors.bg_dark],
|
118
|
+
[1, colors.bg_dark],
|
119
|
+
],
|
120
|
+
},
|
121
|
+
shadow: false,
|
122
|
+
borderWidth: 0,
|
123
|
+
borderRadius: 10,
|
124
|
+
style: {
|
125
|
+
fontFamily: typography.font_family_base,
|
126
|
+
color: colors.text_dk_default,
|
127
|
+
fontWeight: typography.regular,
|
128
|
+
fontSize: typography.text_smaller,
|
129
|
+
},
|
130
|
+
},
|
131
|
+
// specific to gauge
|
132
|
+
// unfilled gauge color
|
133
|
+
pane: {
|
134
|
+
background: {
|
135
|
+
borderColor: colors.border_light,
|
193
136
|
},
|
194
137
|
},
|
195
138
|
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
colorByPoint: true,
|
212
|
-
dataLabels: {
|
213
|
-
enabled: true,
|
214
|
-
style: {
|
215
|
-
fontFamily: typography.font_family_base,
|
216
|
-
fontWeight: typography.bold,
|
217
|
-
fontSize: typography.heading_4,
|
139
|
+
plotOptions: {
|
140
|
+
series: {
|
141
|
+
type: 'area',
|
142
|
+
nullColor: colors.text_lt_lighter,
|
143
|
+
fillColor: {
|
144
|
+
linearGradient: {
|
145
|
+
x1: 0,
|
146
|
+
y1: 0,
|
147
|
+
x2: 0,
|
148
|
+
y2: 1,
|
149
|
+
},
|
150
|
+
stops: [
|
151
|
+
[0, highcharts.getOptions().colors[0]],
|
152
|
+
[1, 'white'],
|
153
|
+
],
|
218
154
|
},
|
155
|
+
threshold: null,
|
219
156
|
},
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
157
|
+
// PIE STYLES
|
158
|
+
pie: {
|
159
|
+
colors: [
|
160
|
+
colors.data_1,
|
161
|
+
colors.data_2,
|
162
|
+
colors.data_3,
|
163
|
+
colors.data_4,
|
164
|
+
colors.data_5,
|
165
|
+
colors.data_6,
|
166
|
+
colors.data_7,
|
167
|
+
],
|
168
|
+
dataLabels: {
|
169
|
+
style: {
|
170
|
+
fontFamily: typography.font_family_base,
|
171
|
+
fontSize: typography.text_smaller,
|
172
|
+
color: colors.text_lt_light,
|
173
|
+
fontWeight: typography.regular,
|
225
174
|
},
|
226
175
|
},
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
176
|
+
},
|
177
|
+
|
178
|
+
// LINE CHART STYLES
|
179
|
+
line: {
|
180
|
+
dataLabels: {
|
181
|
+
color: '#CCC',
|
182
|
+
},
|
183
|
+
marker: {
|
184
|
+
lineColor: '#333',
|
185
|
+
},
|
186
|
+
area: {
|
187
|
+
shadow: false,
|
233
188
|
states: {
|
234
189
|
hover: {
|
235
|
-
|
236
|
-
fill: pbButtonHoverColor,
|
237
|
-
},
|
190
|
+
lineWidth: 1,
|
238
191
|
},
|
239
192
|
},
|
193
|
+
threshold: null,
|
194
|
+
},
|
195
|
+
},
|
196
|
+
|
197
|
+
//TREEMAP CHART STYLES
|
198
|
+
treemap: {
|
199
|
+
layoutAlgorithm: "squarified",
|
200
|
+
allowTraversingTree: false,
|
201
|
+
animationLimit: 1000,
|
202
|
+
colors: [
|
203
|
+
colors.data_1,
|
204
|
+
colors.data_2,
|
205
|
+
colors.data_3,
|
206
|
+
colors.data_4,
|
207
|
+
colors.data_5,
|
208
|
+
colors.data_6,
|
209
|
+
colors.data_7,
|
210
|
+
colors.data_8,
|
211
|
+
],
|
212
|
+
colorByPoint: true,
|
213
|
+
dataLabels: {
|
214
|
+
enabled: true,
|
240
215
|
style: {
|
241
|
-
|
242
|
-
color: colors.white,
|
243
|
-
fontSize: `${typography.text_small}`,
|
216
|
+
fontFamily: typography.font_family_base,
|
244
217
|
fontWeight: typography.bold,
|
245
|
-
|
218
|
+
fontSize: typography.heading_4,
|
219
|
+
},
|
220
|
+
},
|
221
|
+
levels: [
|
222
|
+
{
|
223
|
+
level: 1,
|
224
|
+
dataLabels: {
|
225
|
+
enabled: false,
|
226
|
+
},
|
227
|
+
},
|
228
|
+
],
|
229
|
+
traverseUpButton: {
|
230
|
+
position: { y: -50 },
|
231
|
+
text: '< Back',
|
232
|
+
theme: {
|
233
|
+
r: 4,
|
234
|
+
states: {
|
235
|
+
hover: {
|
236
|
+
style: {
|
237
|
+
fill: pbButtonHoverColor,
|
238
|
+
},
|
239
|
+
},
|
240
|
+
},
|
241
|
+
style: {
|
242
|
+
fill: colors.royal,
|
243
|
+
color: colors.white,
|
244
|
+
fontSize: `${typography.text_small}`,
|
245
|
+
fontWeight: typography.bold,
|
246
|
+
fontFamily: `${typography.font_family_base}`,
|
247
|
+
},
|
248
|
+
stroke: colors.royal,
|
249
|
+
height: 24,
|
250
|
+
width: 90,
|
246
251
|
},
|
247
|
-
stroke: colors.royal,
|
248
|
-
height: 24,
|
249
|
-
width: 90,
|
250
252
|
},
|
251
253
|
},
|
252
254
|
},
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
}
|
255
|
+
credits: {
|
256
|
+
enabled: false
|
257
|
+
},
|
258
|
+
}
|
257
259
|
}
|
258
260
|
|
259
261
|
export { highchartsTheme }
|