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.
@@ -6,510 +6,258 @@ import { ThemeProps } from './themeTypes'
6
6
  //import Highcharts from 'highcharts'
7
7
 
8
8
  const pbButtonHoverColor = '#004ebb'
9
- // const highchartsDarkTheme: ThemeProps = {
10
- // lang: {
11
- // thousandsSep: ',',
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_dk_default,
32
- // fontFamily: typography.font_family_base,
33
- // fontWeight: typography.regular,
34
- // fontSize: typography.heading_3,
35
- // },
36
- // },
37
- // subtitle: {
38
- // style: {
39
- // fontFamily: typography.font_family_base,
40
- // color: colors.text_dk_light,
41
- // fontWeight: typography.regular,
42
- // fontSize: typography.text_base,
43
- // },
44
- // },
45
- // xAxis: {
46
- // gridLineWidth: 0,
47
- // lineColor: colors.border_dark,
48
- // tickColor: colors.border_dark,
49
- // labels: {
50
- // style: {
51
- // fontFamily: typography.font_family_base,
52
- // color: colors.text_dk_lighter,
53
- // fontWeight: typography.bold,
54
- // fontSize: typography.text_smaller,
55
- // },
56
- // },
57
- // title: {
58
- // style: {
59
- // color: colors.text_dk_default,
60
- // fontFamily: typography.font_family_base,
61
- // fontWeight: typography.regular,
62
- // fontSize: typography.heading_4,
63
- // },
64
- // },
65
- // },
66
- // yAxis: {
67
- // alternateGridColor: null,
68
- // minorTickInterval: null,
69
- // gridLineColor: colors.border_dark,
70
- // minorGridLineColor: colors.border_dark,
71
- // lineWidth: 0,
72
- // tickWidth: 0,
73
- // labels: {
74
- // style: {
75
- // fontFamily: typography.font_family_base,
76
- // color: colors.text_dk_lighter,
77
- // fontWeight: typography.bold,
78
- // fontSize: typography.text_smaller,
79
- // },
80
- // },
81
- // title: {
82
- // style: {
83
- // fontFamily: typography.font_family_base,
84
- // color: colors.text_dk_lighter,
85
- // fontWeight: typography.bold,
86
- // fontSize: typography.text_smaller,
87
- // },
88
- // },
89
- // },
90
- // legend: {
91
- // layout: 'horizontal',
92
- // align: 'center',
93
- // verticalAlign: 'bottom',
94
- // itemStyle: {
95
- // fontFamily: typography.font_family_base,
96
- // color: colors.text_dk_light,
97
- // fontWeight: typography.regular,
98
- // fontSize: typography.text_smaller,
99
- // },
100
- // itemHoverStyle: {
101
- // color: colors.text_dk_default,
102
- // },
103
- // itemHiddenStyle: {
104
- // color: colors.text_dk_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.card_light],
117
- // [1, colors.card_light],
118
- // ],
119
- // },
120
- // shadow: false,
121
- // borderWidth: 0,
122
- // borderRadius: 10,
123
- // style: {
124
- // fontFamily: typography.font_family_base,
125
- // color: colors.text_lt_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_dark,
135
- // },
136
- // },
137
-
138
- // plotOptions: {
139
- // series: {
140
- // borderColor: colors.bg_dark_card,
141
- // borderWidth: 2,
142
- // type: 'area',
143
- // nullColor: colors.text_dk_lighter,
144
- // fillColor: {
145
- // linearGradient: {
146
- // x1: 0,
147
- // y1: 0,
148
- // x2: 0,
149
- // y2: 1,
150
- // },
151
- // stops: [
152
- // [0, Highcharts.getOptions().colors[0]],
153
- // [1, 'white'],
154
- // ],
155
- // },
156
- // threshold: null,
157
- // },
158
- // // PIE STYLES
159
- // pie: {
160
- // colors: [
161
- // colors.data_1,
162
- // colors.data_2,
163
- // colors.data_3,
164
- // colors.data_4,
165
- // colors.data_5,
166
- // colors.data_6,
167
- // colors.data_7,
168
- // ],
169
- // dataLabels: {
170
- // style: {
171
- // fontFamily: typography.font_family_base,
172
- // fontSize: typography.text_smaller,
173
- // color: colors.text_dk_light,
174
- // fontWeight: typography.regular,
175
- // },
176
- // },
177
- // },
178
-
179
- // // LINE CHART STYLES
180
- // line: {
181
- // dataLabels: {
182
- // color: colors.text_dk_light,
183
- // },
184
- // marker: {
185
- // lineColor: colors.border_dark,
186
- // },
187
- // area: {
188
- // shadow: false,
189
- // states: {
190
- // hover: {
191
- // lineWidth: 1,
192
- // },
193
- // },
194
- // threshold: null,
195
- // },
196
- // },
197
-
198
- // //TREEMAP CHART STYLES
199
- // treemap: {
200
- // layoutAlgorithm: "squarified",
201
- // allowTraversingTree: false,
202
- // animationLimit: 1000,
203
- // colors: [
204
- // colors.data_1,
205
- // colors.data_2,
206
- // colors.data_3,
207
- // colors.data_4,
208
- // colors.data_5,
209
- // colors.data_6,
210
- // colors.data_7,
211
- // colors.data_8,
212
- // ],
213
- // colorByPoint: true,
214
- // dataLabels: {
215
- // enabled: true,
216
- // style: {
217
- // fontFamily: typography.font_family_base,
218
- // fontWeight: typography.bold,
219
- // fontSize: typography.heading_4,
220
- // },
221
- // },
222
- // levels: [
223
- // {
224
- // level: 1,
225
- // dataLabels: {
226
- // enabled: false,
227
- // },
228
- // },
229
- // ],
230
- // traverseUpButton: {
231
- // position: { y: -50 },
232
- // text: '< Back',
233
- // theme: {
234
- // r: 4,
235
- // states: {
236
- // hover: {
237
- // style: {
238
- // fill: pbButtonHoverColor,
239
- // },
240
- // },
241
- // },
242
- // style: {
243
- // fill: colors.royal,
244
- // color: colors.white,
245
- // fontSize: `${typography.text_small}`,
246
- // fontWeight: typography.bold,
247
- // fontFamily: `${typography.font_family_base}`,
248
- // },
249
- // stroke: colors.royal,
250
- // height: 24,
251
- // width: 90,
252
- // },
253
- // },
254
- // },
255
- // },
256
- // credits: {
257
- // enabled: false
258
- // },
259
- // }
260
-
261
9
  function highchartsDarkTheme(highcharts: any): ThemeProps {
262
10
  return {
263
- lang: {
264
- thousandsSep: ',',
265
- },
266
- colors: [
267
- colors.data_1,
268
- colors.data_2,
269
- colors.data_3,
270
- colors.data_4,
271
- colors.data_5,
272
- colors.data_6,
273
- colors.data_7,
274
- ],
275
- chart: {
276
- borderWidth: 0,
277
- borderRadius: 0,
278
- plotBackgroundColor: null,
279
- plotShadow: false,
280
- plotBorderWidth: 0,
281
- },
282
- title: {
283
- style: {
284
- color: colors.text_dk_default,
285
- fontFamily: typography.font_family_base,
286
- fontWeight: typography.regular,
287
- fontSize: typography.heading_3,
11
+ lang: {
12
+ thousandsSep: ',',
288
13
  },
289
- },
290
- subtitle: {
291
- style: {
292
- fontFamily: typography.font_family_base,
293
- color: colors.text_dk_light,
294
- fontWeight: typography.regular,
295
- fontSize: typography.text_base,
296
- },
297
- },
298
- xAxis: {
299
- gridLineWidth: 0,
300
- lineColor: colors.border_dark,
301
- tickColor: colors.border_dark,
302
- labels: {
303
- style: {
304
- fontFamily: typography.font_family_base,
305
- color: colors.text_dk_lighter,
306
- fontWeight: typography.bold,
307
- fontSize: typography.text_smaller,
308
- },
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,
309
29
  },
310
30
  title: {
311
31
  style: {
312
32
  color: colors.text_dk_default,
313
33
  fontFamily: typography.font_family_base,
314
34
  fontWeight: typography.regular,
315
- fontSize: typography.heading_4,
35
+ fontSize: typography.heading_3,
316
36
  },
317
37
  },
318
- },
319
- yAxis: {
320
- alternateGridColor: null,
321
- minorTickInterval: null,
322
- gridLineColor: colors.border_dark,
323
- minorGridLineColor: colors.border_dark,
324
- lineWidth: 0,
325
- tickWidth: 0,
326
- labels: {
38
+ subtitle: {
327
39
  style: {
328
40
  fontFamily: typography.font_family_base,
329
- color: colors.text_dk_lighter,
330
- fontWeight: typography.bold,
331
- fontSize: typography.text_smaller,
41
+ color: colors.text_dk_light,
42
+ fontWeight: typography.regular,
43
+ fontSize: typography.text_base,
332
44
  },
333
45
  },
334
- title: {
335
- style: {
336
- fontFamily: typography.font_family_base,
337
- color: colors.text_dk_lighter,
338
- fontWeight: typography.bold,
339
- fontSize: typography.text_smaller,
46
+ xAxis: {
47
+ gridLineWidth: 0,
48
+ lineColor: colors.border_dark,
49
+ tickColor: colors.border_dark,
50
+ labels: {
51
+ style: {
52
+ fontFamily: typography.font_family_base,
53
+ color: colors.text_dk_lighter,
54
+ fontWeight: typography.bold,
55
+ fontSize: typography.text_smaller,
56
+ },
340
57
  },
341
- },
342
- },
343
- legend: {
344
- layout: 'horizontal',
345
- align: 'center',
346
- verticalAlign: 'bottom',
347
- itemStyle: {
348
- fontFamily: typography.font_family_base,
349
- color: colors.text_dk_light,
350
- fontWeight: typography.regular,
351
- fontSize: typography.text_smaller,
352
- },
353
- itemHoverStyle: {
354
- color: colors.text_dk_default,
355
- },
356
- itemHiddenStyle: {
357
- color: colors.text_dk_lighter,
358
- },
359
- },
360
- labels: {
361
- style: {
362
- color: colors.primary,
363
- },
364
- },
365
- tooltip: {
366
- backgroundColor: {
367
- linearGradient: { x1: 0, y1: 0, x2: 0, y2: 1 },
368
- stops: [
369
- [0, colors.card_light],
370
- [1, colors.card_light],
371
- ],
372
- },
373
- shadow: false,
374
- borderWidth: 0,
375
- borderRadius: 10,
376
- style: {
377
- fontFamily: typography.font_family_base,
378
- color: colors.text_lt_default,
379
- fontWeight: typography.regular,
380
- fontSize: typography.text_smaller,
381
- },
382
- },
383
- // specific to gauge
384
- // unfilled gauge color
385
- pane: {
386
- background: {
387
- borderColor: colors.border_dark,
388
- },
389
- },
390
-
391
- plotOptions: {
392
- series: {
393
- borderColor: colors.bg_dark_card,
394
- borderWidth: 2,
395
- type: 'area',
396
- nullColor: colors.text_dk_lighter,
397
- fillColor: {
398
- linearGradient: {
399
- x1: 0,
400
- y1: 0,
401
- x2: 0,
402
- y2: 1,
58
+ title: {
59
+ style: {
60
+ color: colors.text_dk_default,
61
+ fontFamily: typography.font_family_base,
62
+ fontWeight: typography.regular,
63
+ fontSize: typography.heading_4,
403
64
  },
404
- stops: [
405
- [0, highcharts.getOptions().colors[0]],
406
- [1, 'white'],
407
- ],
408
65
  },
409
- threshold: null,
410
66
  },
411
- // PIE STYLES
412
- pie: {
413
- colors: [
414
- colors.data_1,
415
- colors.data_2,
416
- colors.data_3,
417
- colors.data_4,
418
- colors.data_5,
419
- colors.data_6,
420
- colors.data_7,
421
- ],
422
- dataLabels: {
67
+ yAxis: {
68
+ alternateGridColor: null,
69
+ minorTickInterval: null,
70
+ gridLineColor: colors.border_dark,
71
+ minorGridLineColor: colors.border_dark,
72
+ lineWidth: 0,
73
+ tickWidth: 0,
74
+ labels: {
423
75
  style: {
424
76
  fontFamily: typography.font_family_base,
77
+ color: colors.text_dk_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_dk_lighter,
86
+ fontWeight: typography.bold,
425
87
  fontSize: typography.text_smaller,
426
- color: colors.text_dk_light,
427
- fontWeight: typography.regular,
428
88
  },
429
89
  },
430
90
  },
431
-
432
- // LINE CHART STYLES
433
- line: {
434
- dataLabels: {
91
+ legend: {
92
+ layout: 'horizontal',
93
+ align: 'center',
94
+ verticalAlign: 'bottom',
95
+ itemStyle: {
96
+ fontFamily: typography.font_family_base,
435
97
  color: colors.text_dk_light,
98
+ fontWeight: typography.regular,
99
+ fontSize: typography.text_smaller,
436
100
  },
437
- marker: {
438
- lineColor: colors.border_dark,
101
+ itemHoverStyle: {
102
+ color: colors.text_dk_default,
439
103
  },
440
- area: {
441
- shadow: false,
442
- states: {
443
- hover: {
444
- lineWidth: 1,
445
- },
446
- },
447
- threshold: null,
104
+ itemHiddenStyle: {
105
+ color: colors.text_dk_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.card_light],
118
+ [1, colors.card_light],
119
+ ],
120
+ },
121
+ shadow: false,
122
+ borderWidth: 0,
123
+ borderRadius: 10,
124
+ style: {
125
+ fontFamily: typography.font_family_base,
126
+ color: colors.text_lt_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_dark,
448
136
  },
449
137
  },
450
138
 
451
- //TREEMAP CHART STYLES
452
- treemap: {
453
- layoutAlgorithm: "squarified",
454
- allowTraversingTree: false,
455
- animationLimit: 1000,
456
- colors: [
457
- colors.data_1,
458
- colors.data_2,
459
- colors.data_3,
460
- colors.data_4,
461
- colors.data_5,
462
- colors.data_6,
463
- colors.data_7,
464
- colors.data_8,
465
- ],
466
- colorByPoint: true,
467
- dataLabels: {
468
- enabled: true,
469
- style: {
470
- fontFamily: typography.font_family_base,
471
- fontWeight: typography.bold,
472
- fontSize: typography.heading_4,
139
+ plotOptions: {
140
+ series: {
141
+ borderColor: colors.bg_dark_card,
142
+ borderWidth: 2,
143
+ type: 'area',
144
+ nullColor: colors.text_dk_lighter,
145
+ fillColor: {
146
+ linearGradient: {
147
+ x1: 0,
148
+ y1: 0,
149
+ x2: 0,
150
+ y2: 1,
151
+ },
152
+ stops: [
153
+ [0, highcharts.getOptions().colors[0]],
154
+ [1, 'white'],
155
+ ],
473
156
  },
157
+ threshold: null,
474
158
  },
475
- levels: [
476
- {
477
- level: 1,
478
- dataLabels: {
479
- enabled: false,
159
+ // PIE STYLES
160
+ pie: {
161
+ colors: [
162
+ colors.data_1,
163
+ colors.data_2,
164
+ colors.data_3,
165
+ colors.data_4,
166
+ colors.data_5,
167
+ colors.data_6,
168
+ colors.data_7,
169
+ ],
170
+ dataLabels: {
171
+ style: {
172
+ fontFamily: typography.font_family_base,
173
+ fontSize: typography.text_smaller,
174
+ color: colors.text_dk_light,
175
+ fontWeight: typography.regular,
480
176
  },
481
177
  },
482
- ],
483
- traverseUpButton: {
484
- position: { y: -50 },
485
- text: '< Back',
486
- theme: {
487
- r: 4,
178
+ },
179
+
180
+ // LINE CHART STYLES
181
+ line: {
182
+ dataLabels: {
183
+ color: colors.text_dk_light,
184
+ },
185
+ marker: {
186
+ lineColor: colors.border_dark,
187
+ },
188
+ area: {
189
+ shadow: false,
488
190
  states: {
489
191
  hover: {
490
- style: {
491
- fill: pbButtonHoverColor,
492
- },
192
+ lineWidth: 1,
493
193
  },
494
194
  },
195
+ threshold: null,
196
+ },
197
+ },
198
+
199
+ //TREEMAP CHART STYLES
200
+ treemap: {
201
+ layoutAlgorithm: "squarified",
202
+ allowTraversingTree: false,
203
+ animationLimit: 1000,
204
+ colors: [
205
+ colors.data_1,
206
+ colors.data_2,
207
+ colors.data_3,
208
+ colors.data_4,
209
+ colors.data_5,
210
+ colors.data_6,
211
+ colors.data_7,
212
+ colors.data_8,
213
+ ],
214
+ colorByPoint: true,
215
+ dataLabels: {
216
+ enabled: true,
495
217
  style: {
496
- fill: colors.royal,
497
- color: colors.white,
498
- fontSize: `${typography.text_small}`,
218
+ fontFamily: typography.font_family_base,
499
219
  fontWeight: typography.bold,
500
- fontFamily: `${typography.font_family_base}`,
220
+ fontSize: typography.heading_4,
221
+ },
222
+ },
223
+ levels: [
224
+ {
225
+ level: 1,
226
+ dataLabels: {
227
+ enabled: false,
228
+ },
229
+ },
230
+ ],
231
+ traverseUpButton: {
232
+ position: { y: -50 },
233
+ text: '< Back',
234
+ theme: {
235
+ r: 4,
236
+ states: {
237
+ hover: {
238
+ style: {
239
+ fill: pbButtonHoverColor,
240
+ },
241
+ },
242
+ },
243
+ style: {
244
+ fill: colors.royal,
245
+ color: colors.white,
246
+ fontSize: `${typography.text_small}`,
247
+ fontWeight: typography.bold,
248
+ fontFamily: `${typography.font_family_base}`,
249
+ },
250
+ stroke: colors.royal,
251
+ height: 24,
252
+ width: 90,
501
253
  },
502
- stroke: colors.royal,
503
- height: 24,
504
- width: 90,
505
254
  },
506
255
  },
507
256
  },
508
- },
509
- credits: {
510
- enabled: false
511
- },
512
- }
257
+ credits: {
258
+ enabled: false
259
+ },
260
+ }
513
261
  }
514
262
 
515
263
  export { highchartsDarkTheme }