@react-magma/charts 12.0.0 → 12.0.1-next.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (72) hide show
  1. package/dist/charts.js +2450 -1
  2. package/dist/charts.js.map +1 -1
  3. package/dist/charts.modern.module.js +2428 -1
  4. package/dist/charts.modern.module.js.map +1 -1
  5. package/dist/charts.umd.js +48555 -1
  6. package/dist/charts.umd.js.map +1 -1
  7. package/dist/components/CarbonChart/CarbonChart.d.ts +42 -41
  8. package/dist/components/CarbonChart/CarbonChartArea.stories.d.ts +310 -12
  9. package/dist/components/CarbonChart/CarbonChartAreaStacked.stories.d.ts +136 -7
  10. package/dist/components/CarbonChart/CarbonChartBar.stories.d.ts +214 -12
  11. package/dist/components/CarbonChart/CarbonChartBarFloating.stories.d.ts +82 -6
  12. package/dist/components/CarbonChart/CarbonChartBarGrouped.stories.d.ts +234 -13
  13. package/dist/components/CarbonChart/CarbonChartBarStacked.stories.d.ts +266 -14
  14. package/dist/components/CarbonChart/CarbonChartBoxplot.stories.d.ts +53 -5
  15. package/dist/components/CarbonChart/CarbonChartBubble.stories.d.ts +196 -9
  16. package/dist/components/CarbonChart/CarbonChartBullet.stories.d.ts +35 -4
  17. package/dist/components/CarbonChart/CarbonChartCombo.stories.d.ts +580 -15
  18. package/dist/components/CarbonChart/CarbonChartDonut.stories.d.ts +120 -8
  19. package/dist/components/CarbonChart/CarbonChartGauge.stories.d.ts +43 -5
  20. package/dist/components/CarbonChart/CarbonChartHistogram.stories.d.ts +89 -6
  21. package/dist/components/CarbonChart/CarbonChartLine.stories.d.ts +577 -20
  22. package/dist/components/CarbonChart/CarbonChartLollipop.stories.d.ts +55 -5
  23. package/dist/components/CarbonChart/CarbonChartMeter.stories.d.ts +127 -8
  24. package/dist/components/CarbonChart/CarbonChartPie.stories.d.ts +101 -8
  25. package/dist/components/CarbonChart/CarbonChartRadar.stories.d.ts +98 -7
  26. package/dist/components/CarbonChart/CarbonChartScatter.stories.d.ts +173 -9
  27. package/dist/components/CarbonChart/CarbonChartSparkline.stories.d.ts +51 -4
  28. package/dist/components/CarbonChart/CarbonChartStep.stories.d.ts +38 -4
  29. package/dist/components/CarbonChart/index.d.ts +1 -1
  30. package/dist/components/LineChart/Chart.d.ts +27 -27
  31. package/dist/components/LineChart/ChartDataTable.d.ts +17 -17
  32. package/dist/components/LineChart/CustomAxisComponent.d.ts +3 -3
  33. package/dist/components/LineChart/CustomPointComponent.d.ts +17 -17
  34. package/dist/components/LineChart/DataTable.d.ts +5 -5
  35. package/dist/components/LineChart/GraphTooltip.d.ts +3 -3
  36. package/dist/components/LineChart/LegendButton.d.ts +6 -6
  37. package/dist/components/LineChart/LineChart.d.ts +67 -67
  38. package/dist/components/LineChart/LineChart.stories.d.ts +113 -23
  39. package/dist/components/LineChart/index.d.ts +1 -1
  40. package/dist/components/LineChart/magma-charts.d.ts +1 -1
  41. package/dist/index.d.ts +2 -2
  42. package/package.json +11 -6
  43. package/src/components/CarbonChart/CarbonChart.tsx +12 -16
  44. package/src/components/CarbonChart/CarbonChartArea.stories.tsx +674 -649
  45. package/src/components/CarbonChart/CarbonChartAreaStacked.stories.tsx +424 -414
  46. package/src/components/CarbonChart/CarbonChartBar.stories.tsx +352 -325
  47. package/src/components/CarbonChart/CarbonChartBarFloating.stories.tsx +127 -116
  48. package/src/components/CarbonChart/CarbonChartBarGrouped.stories.tsx +872 -843
  49. package/src/components/CarbonChart/CarbonChartBarStacked.stories.tsx +913 -879
  50. package/src/components/CarbonChart/CarbonChartBoxplot.stories.tsx +238 -232
  51. package/src/components/CarbonChart/CarbonChartBubble.stories.tsx +565 -547
  52. package/src/components/CarbonChart/CarbonChartBullet.stories.tsx +59 -56
  53. package/src/components/CarbonChart/CarbonChartCombo.stories.tsx +1335 -1299
  54. package/src/components/CarbonChart/CarbonChartDonut.stories.tsx +170 -153
  55. package/src/components/CarbonChart/CarbonChartGauge.stories.tsx +50 -44
  56. package/src/components/CarbonChart/CarbonChartHistogram.stories.tsx +733 -724
  57. package/src/components/CarbonChart/CarbonChartLine.stories.tsx +1656 -1605
  58. package/src/components/CarbonChart/CarbonChartLollipop.stories.tsx +81 -76
  59. package/src/components/CarbonChart/CarbonChartMeter.stories.tsx +177 -162
  60. package/src/components/CarbonChart/CarbonChartPie.stories.tsx +154 -139
  61. package/src/components/CarbonChart/CarbonChartRadar.stories.tsx +445 -433
  62. package/src/components/CarbonChart/CarbonChartScatter.stories.tsx +427 -409
  63. package/src/components/CarbonChart/CarbonChartSparkline.stories.tsx +191 -188
  64. package/src/components/CarbonChart/CarbonChartStep.stories.tsx +145 -142
  65. package/src/components/CarbonChart/carbon-charts.css +7303 -0
  66. package/src/components/LineChart/LineChart.stories.tsx +91 -104
  67. package/dist/components/CarbonChart/CarbonChart.test.d.ts +0 -1
  68. package/dist/components/CarbonChart/embeddedStyles.d.ts +0 -1
  69. package/dist/components/LineChart/ChartDataTable.test.d.ts +0 -1
  70. package/dist/components/LineChart/LineChart.test.d.ts +0 -1
  71. package/dist/components/LineChart/test/exampleChartData.d.ts +0 -40
  72. package/src/components/CarbonChart/embeddedStyles.ts +0 -24880
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
 
3
- import { Story, Meta } from '@storybook/react/types-6-0';
3
+ import { StoryFn, Meta } from '@storybook/react/types-6-0';
4
4
  import { Card } from 'react-magma-dom';
5
5
 
6
6
  import { CarbonChart, CarbonChartProps, CarbonChartType } from '.';
@@ -23,1396 +23,1432 @@ export default {
23
23
  },
24
24
  } as Meta;
25
25
 
26
- const Template: Story<CarbonChartProps> = args => (
26
+ const Template: StoryFn<CarbonChartProps> = args => (
27
27
  <Card isInverse={args.isInverse} style={{ padding: '12px' }}>
28
28
  <CarbonChart {...args} />
29
29
  </Card>
30
30
  );
31
31
 
32
- export const ComboLineAndSimpleBarCustomConfigs = Template.bind({});
33
- ComboLineAndSimpleBarCustomConfigs.args = {
34
- isInverse: false,
35
- type: CarbonChartType.combo,
36
- dataSet: [
37
- {
38
- group: 'School A',
39
- date: 'Monday',
40
- value: 10000,
41
- },
42
- {
43
- group: 'School A',
44
- date: 'Tuesday',
45
- value: 65000,
46
- },
47
- {
48
- group: 'School A',
49
- date: 'Wednesday',
50
- value: 30000,
51
- },
52
- {
53
- group: 'School A',
54
- date: 'Thursday',
55
- value: 49213,
56
- },
57
- {
58
- group: 'School A',
59
- date: 'Friday',
60
- value: 49213,
61
- },
62
- {
63
- group: 'Temperature',
64
- date: 'Monday',
65
- temp: 70,
66
- },
67
- {
68
- group: 'Temperature',
69
- date: 'Tuesday',
70
- temp: 75,
71
- },
72
- {
73
- group: 'Temperature',
74
- date: 'Wednesday',
75
- temp: 31,
76
- },
77
- {
78
- group: 'Temperature',
79
- date: 'Thursday',
80
- temp: 31,
81
- },
82
- {
83
- group: 'Temperature',
84
- date: 'Friday',
85
- temp: 43,
86
- },
87
- ],
88
- options: {
89
- title: 'Combo (Line + Simple bar) - custom configs',
90
- axes: {
91
- left: {
92
- mapsTo: 'value',
93
- scaleType: 'linear',
94
- title: 'USA Summer School Attendance',
95
- },
96
- right: {
97
- mapsTo: 'temp',
98
- scaleType: 'linear',
99
- title: 'Temperature (°F)',
100
- correspondingDatasets: ['Temperature'],
101
- },
102
- bottom: {
103
- title: 'Day of the Week',
104
- mapsTo: 'date',
105
- scaleType: 'labels',
32
+ export const ComboLineAndSimpleBarCustomConfigs = {
33
+ render: Template,
34
+
35
+ args: {
36
+ isInverse: false,
37
+ type: CarbonChartType.combo,
38
+ dataSet: [
39
+ {
40
+ group: 'School A',
41
+ date: 'Monday',
42
+ value: 10000,
43
+ },
44
+ {
45
+ group: 'School A',
46
+ date: 'Tuesday',
47
+ value: 65000,
48
+ },
49
+ {
50
+ group: 'School A',
51
+ date: 'Wednesday',
52
+ value: 30000,
53
+ },
54
+ {
55
+ group: 'School A',
56
+ date: 'Thursday',
57
+ value: 49213,
58
+ },
59
+ {
60
+ group: 'School A',
61
+ date: 'Friday',
62
+ value: 49213,
63
+ },
64
+ {
65
+ group: 'Temperature',
66
+ date: 'Monday',
67
+ temp: 70,
68
+ },
69
+ {
70
+ group: 'Temperature',
71
+ date: 'Tuesday',
72
+ temp: 75,
73
+ },
74
+ {
75
+ group: 'Temperature',
76
+ date: 'Wednesday',
77
+ temp: 31,
106
78
  },
107
- },
108
- comboChartTypes: [
109
79
  {
110
- type: 'simple-bar',
111
- correspondingDatasets: ['School A'],
80
+ group: 'Temperature',
81
+ date: 'Thursday',
82
+ temp: 31,
112
83
  },
113
84
  {
114
- type: 'line',
115
- options: {
116
- points: {
117
- radius: 5,
85
+ group: 'Temperature',
86
+ date: 'Friday',
87
+ temp: 43,
88
+ },
89
+ ],
90
+ options: {
91
+ title: 'Combo (Line + Simple bar) - custom configs',
92
+ axes: {
93
+ left: {
94
+ mapsTo: 'value',
95
+ scaleType: 'linear',
96
+ title: 'USA Summer School Attendance',
97
+ },
98
+ right: {
99
+ mapsTo: 'temp',
100
+ scaleType: 'linear',
101
+ title: 'Temperature (°F)',
102
+ correspondingDatasets: ['Temperature'],
103
+ },
104
+ bottom: {
105
+ title: 'Day of the Week',
106
+ mapsTo: 'date',
107
+ scaleType: 'labels',
108
+ },
109
+ },
110
+ comboChartTypes: [
111
+ {
112
+ type: 'simple-bar',
113
+ correspondingDatasets: ['School A'],
114
+ },
115
+ {
116
+ type: 'line',
117
+ options: {
118
+ points: {
119
+ radius: 5,
120
+ },
118
121
  },
122
+ correspondingDatasets: ['Temperature'],
119
123
  },
120
- correspondingDatasets: ['Temperature'],
124
+ ],
125
+ height: '400px',
126
+ },
127
+ },
128
+ };
129
+
130
+ export const ComboLineAndStackedBar = {
131
+ render: Template,
132
+
133
+ args: {
134
+ isInverse: false,
135
+ type: CarbonChartType.combo,
136
+ dataSet: [
137
+ {
138
+ group: 'Florida',
139
+ key: 'Monday',
140
+ value: 65000,
141
+ },
142
+ {
143
+ group: 'Florida',
144
+ key: 'Tuesday',
145
+ value: 29123,
146
+ },
147
+ {
148
+ group: 'Florida',
149
+ key: 'Wednesday',
150
+ value: 35213,
151
+ },
152
+ {
153
+ group: 'Florida',
154
+ key: 'Thursday',
155
+ value: 51213,
156
+ },
157
+ {
158
+ group: 'Florida',
159
+ key: 'Friday',
160
+ value: 16932,
161
+ },
162
+ {
163
+ group: 'California',
164
+ key: 'Monday',
165
+ value: 32432,
166
+ },
167
+ {
168
+ group: 'California',
169
+ key: 'Tuesday',
170
+ value: 21312,
171
+ },
172
+ {
173
+ group: 'California',
174
+ key: 'Wednesday',
175
+ value: 56456,
176
+ },
177
+ {
178
+ group: 'California',
179
+ key: 'Thursday',
180
+ value: 21312,
181
+ },
182
+ {
183
+ group: 'California',
184
+ key: 'Friday',
185
+ value: 34234,
186
+ },
187
+ {
188
+ group: 'Tokyo',
189
+ key: 'Monday',
190
+ value: 12312,
191
+ },
192
+ {
193
+ group: 'Tokyo',
194
+ key: 'Tuesday',
195
+ value: 23232,
196
+ },
197
+ {
198
+ group: 'Tokyo',
199
+ key: 'Wednesday',
200
+ value: 34232,
201
+ },
202
+ {
203
+ group: 'Tokyo',
204
+ key: 'Thursday',
205
+ value: 12312,
206
+ },
207
+ {
208
+ group: 'Tokyo',
209
+ key: 'Friday',
210
+ value: 34234,
211
+ },
212
+ {
213
+ group: 'Temperature',
214
+ key: 'Monday',
215
+ temp: 23,
216
+ },
217
+ {
218
+ group: 'Temperature',
219
+ key: 'Tuesday',
220
+ temp: 21,
221
+ },
222
+ {
223
+ group: 'Temperature',
224
+ key: 'Wednesday',
225
+ temp: 32,
226
+ },
227
+ {
228
+ group: 'Temperature',
229
+ key: 'Thursday',
230
+ temp: 34,
231
+ },
232
+ {
233
+ group: 'Temperature',
234
+ key: 'Friday',
235
+ temp: 23,
121
236
  },
122
237
  ],
123
- height: '400px',
238
+ options: {
239
+ title: 'Combo (Line + Stacked bar)',
240
+ axes: {
241
+ left: {
242
+ title: 'Disney Park Attendance',
243
+ mapsTo: 'value',
244
+ stacked: true,
245
+ },
246
+ bottom: {
247
+ title: '2018 Annual Sales Figures',
248
+ mapsTo: 'key',
249
+ scaleType: 'labels',
250
+ },
251
+ right: {
252
+ title: 'Temperature (°C)',
253
+ mapsTo: 'temp',
254
+ correspondingDatasets: ['Temperature'],
255
+ },
256
+ },
257
+ comboChartTypes: [
258
+ {
259
+ type: 'stacked-bar',
260
+ options: {},
261
+ correspondingDatasets: ['Florida', 'California', 'Tokyo'],
262
+ },
263
+ {
264
+ type: 'line',
265
+ options: {},
266
+ correspondingDatasets: ['Temperature'],
267
+ },
268
+ ],
269
+ height: '400px',
270
+ },
124
271
  },
125
272
  };
126
273
 
127
- export const ComboLineAndStackedBar = Template.bind({});
128
- ComboLineAndStackedBar.args = {
129
- isInverse: false,
130
- type: CarbonChartType.combo,
131
- dataSet: [
132
- {
133
- group: 'Florida',
134
- key: 'Monday',
135
- value: 65000,
136
- },
137
- {
138
- group: 'Florida',
139
- key: 'Tuesday',
140
- value: 29123,
141
- },
142
- {
143
- group: 'Florida',
144
- key: 'Wednesday',
145
- value: 35213,
146
- },
147
- {
148
- group: 'Florida',
149
- key: 'Thursday',
150
- value: 51213,
151
- },
152
- {
153
- group: 'Florida',
154
- key: 'Friday',
155
- value: 16932,
156
- },
157
- {
158
- group: 'California',
159
- key: 'Monday',
160
- value: 32432,
161
- },
162
- {
163
- group: 'California',
164
- key: 'Tuesday',
165
- value: 21312,
166
- },
167
- {
168
- group: 'California',
169
- key: 'Wednesday',
170
- value: 56456,
171
- },
172
- {
173
- group: 'California',
174
- key: 'Thursday',
175
- value: 21312,
176
- },
177
- {
178
- group: 'California',
179
- key: 'Friday',
180
- value: 34234,
181
- },
182
- {
183
- group: 'Tokyo',
184
- key: 'Monday',
185
- value: 12312,
186
- },
187
- {
188
- group: 'Tokyo',
189
- key: 'Tuesday',
190
- value: 23232,
191
- },
192
- {
193
- group: 'Tokyo',
194
- key: 'Wednesday',
195
- value: 34232,
196
- },
197
- {
198
- group: 'Tokyo',
199
- key: 'Thursday',
200
- value: 12312,
201
- },
202
- {
203
- group: 'Tokyo',
204
- key: 'Friday',
205
- value: 34234,
274
+ export const ComboLineAndGroupedBarCustomConfigs = {
275
+ render: Template,
276
+
277
+ args: {
278
+ isInverse: false,
279
+ type: CarbonChartType.combo,
280
+ dataSet: [
281
+ {
282
+ group: 'Location 1',
283
+ key: 'Monday',
284
+ value: 65000,
285
+ },
286
+ {
287
+ group: 'Location 1',
288
+ key: 'Tuesday',
289
+ value: -39123,
290
+ },
291
+ {
292
+ group: 'Location 1',
293
+ key: 'Wednesday',
294
+ value: -35213,
295
+ },
296
+ {
297
+ group: 'Location 1',
298
+ key: 'Thursday',
299
+ value: 51213,
300
+ },
301
+ {
302
+ group: 'Location 1',
303
+ key: 'Friday',
304
+ value: 16932,
305
+ },
306
+ {
307
+ group: 'Location 2',
308
+ key: 'Monday',
309
+ value: 32432,
310
+ },
311
+ {
312
+ group: 'Location 2',
313
+ key: 'Tuesday',
314
+ value: -21312,
315
+ },
316
+ {
317
+ group: 'Location 2',
318
+ key: 'Wednesday',
319
+ value: -56456,
320
+ },
321
+ {
322
+ group: 'Location 2',
323
+ key: 'Thursday',
324
+ value: -21312,
325
+ },
326
+ {
327
+ group: 'Location 2',
328
+ key: 'Friday',
329
+ value: 34234,
330
+ },
331
+ {
332
+ group: 'Location 3',
333
+ key: 'Monday',
334
+ value: -12312,
335
+ },
336
+ {
337
+ group: 'Location 3',
338
+ key: 'Tuesday',
339
+ value: 23232,
340
+ },
341
+ {
342
+ group: 'Location 3',
343
+ key: 'Wednesday',
344
+ value: 34232,
345
+ },
346
+ {
347
+ group: 'Location 3',
348
+ key: 'Thursday',
349
+ value: -12312,
350
+ },
351
+ {
352
+ group: 'Location 3',
353
+ key: 'Friday',
354
+ value: -34234,
355
+ },
356
+ {
357
+ group: 'Temperature',
358
+ key: 'Monday',
359
+ temp: 20,
360
+ },
361
+ {
362
+ group: 'Temperature',
363
+ key: 'Tuesday',
364
+ temp: 23,
365
+ },
366
+ {
367
+ group: 'Temperature',
368
+ key: 'Wednesday',
369
+ temp: 33,
370
+ },
371
+ {
372
+ group: 'Temperature',
373
+ key: 'Thursday',
374
+ temp: 34,
375
+ },
376
+ {
377
+ group: 'Temperature',
378
+ key: 'Friday',
379
+ temp: 34,
380
+ },
381
+ ],
382
+ options: {
383
+ title: 'Combo (Line + Grouped bar) - custom configs',
384
+ axes: {
385
+ left: {
386
+ title: 'Sales',
387
+ mapsTo: 'value',
388
+ },
389
+ bottom: {
390
+ scaleType: 'labels',
391
+ mapsTo: 'key',
392
+ },
393
+ right: {
394
+ title: 'Temperature (°C)',
395
+ mapsTo: 'temp',
396
+ correspondingDatasets: ['Temperature'],
397
+ },
398
+ },
399
+ comboChartTypes: [
400
+ {
401
+ type: 'grouped-bar',
402
+ correspondingDatasets: ['Location 1', 'Location 2', 'Location 3'],
403
+ },
404
+ {
405
+ type: 'line',
406
+ options: {
407
+ points: {
408
+ filled: true,
409
+ opacity: 0.5,
410
+ },
411
+ },
412
+ correspondingDatasets: ['Temperature'],
413
+ },
414
+ ],
415
+ height: '400px',
206
416
  },
207
- {
208
- group: 'Temperature',
209
- key: 'Monday',
210
- temp: 23,
417
+ },
418
+ };
419
+
420
+ export const ComboLineAndFloatingBar = {
421
+ render: Template,
422
+
423
+ args: {
424
+ isInverse: false,
425
+ type: CarbonChartType.combo,
426
+ dataSet: [
427
+ {
428
+ group: 'School A',
429
+ date: 'Monday',
430
+ value: 50000,
431
+ },
432
+ {
433
+ group: 'School A',
434
+ date: 'Tuesday',
435
+ value: 45000,
436
+ },
437
+ {
438
+ group: 'School A',
439
+ date: 'Wednesday',
440
+ value: 58000,
441
+ },
442
+ {
443
+ group: 'School A',
444
+ date: 'Thursday',
445
+ value: 31000,
446
+ },
447
+ {
448
+ group: 'School A',
449
+ date: 'Friday',
450
+ value: 33000,
451
+ },
452
+ {
453
+ group: 'Temperature',
454
+ date: 'Monday',
455
+ temp: [65, 70],
456
+ },
457
+ {
458
+ group: 'Temperature',
459
+ date: 'Tuesday',
460
+ temp: [67, 71],
461
+ },
462
+ {
463
+ group: 'Temperature',
464
+ date: 'Wednesday',
465
+ temp: [75, 83],
466
+ },
467
+ {
468
+ group: 'Temperature',
469
+ date: 'Thursday',
470
+ temp: [31, 42],
471
+ },
472
+ {
473
+ group: 'Temperature',
474
+ date: 'Friday',
475
+ temp: [43, 55],
476
+ },
477
+ ],
478
+ options: {
479
+ title: 'Combo (Line + Floating bar)',
480
+ axes: {
481
+ left: {
482
+ mapsTo: 'value',
483
+ scaleType: 'linear',
484
+ title: 'USA Summer School Attendance',
485
+ correspondingDatasets: ['School A'],
486
+ },
487
+ right: {
488
+ mapsTo: 'temp',
489
+ title: 'Temperature (°F)',
490
+ },
491
+ bottom: {
492
+ title: 'Day of the Week',
493
+ mapsTo: 'date',
494
+ scaleType: 'labels',
495
+ },
496
+ },
497
+ comboChartTypes: [
498
+ {
499
+ type: 'simple-bar',
500
+ correspondingDatasets: ['Temperature'],
501
+ },
502
+ {
503
+ type: 'line',
504
+ options: {
505
+ points: {
506
+ radius: 5,
507
+ },
508
+ },
509
+ correspondingDatasets: ['School A'],
510
+ },
511
+ ],
512
+ height: '400px',
211
513
  },
212
- {
213
- group: 'Temperature',
214
- key: 'Tuesday',
215
- temp: 21,
514
+ },
515
+ };
516
+
517
+ export const ComboHorizontalLineAndGroupedBar = {
518
+ render: Template,
519
+
520
+ args: {
521
+ isInverse: false,
522
+ type: CarbonChartType.combo,
523
+ dataSet: [
524
+ {
525
+ group: 'Location 1',
526
+ key: 'Monday',
527
+ value: 65000,
528
+ },
529
+ {
530
+ group: 'Location 1',
531
+ key: 'Tuesday',
532
+ value: -39123,
533
+ },
534
+ {
535
+ group: 'Location 1',
536
+ key: 'Wednesday',
537
+ value: -35213,
538
+ },
539
+ {
540
+ group: 'Location 2',
541
+ key: 'Monday',
542
+ value: 32432,
543
+ },
544
+ {
545
+ group: 'Location 2',
546
+ key: 'Tuesday',
547
+ value: -21312,
548
+ },
549
+ {
550
+ group: 'Location 2',
551
+ key: 'Wednesday',
552
+ value: -56456,
553
+ },
554
+ {
555
+ group: 'Location 3',
556
+ key: 'Monday',
557
+ value: -12312,
558
+ },
559
+ {
560
+ group: 'Location 3',
561
+ key: 'Tuesday',
562
+ value: 23232,
563
+ },
564
+ {
565
+ group: 'Location 3',
566
+ key: 'Wednesday',
567
+ value: 34232,
568
+ },
569
+ {
570
+ group: 'Temperature',
571
+ key: 'Monday',
572
+ temp: 20,
573
+ },
574
+ {
575
+ group: 'Temperature',
576
+ key: 'Tuesday',
577
+ temp: 23,
578
+ },
579
+ {
580
+ group: 'Temperature',
581
+ key: 'Wednesday',
582
+ temp: 33,
583
+ },
584
+ ],
585
+ options: {
586
+ title: 'Combo Horizontal (Line + Grouped bar)',
587
+ axes: {
588
+ top: {
589
+ title: 'Sales',
590
+ mapsTo: 'value',
591
+ main: true,
592
+ },
593
+ left: {
594
+ scaleType: 'labels',
595
+ mapsTo: 'key',
596
+ },
597
+ bottom: {
598
+ title: 'Temperature (°C)',
599
+ mapsTo: 'temp',
600
+ correspondingDatasets: ['Temperature'],
601
+ },
602
+ },
603
+ comboChartTypes: [
604
+ {
605
+ type: 'grouped-bar',
606
+ correspondingDatasets: ['Location 1', 'Location 2', 'Location 3'],
607
+ },
608
+ {
609
+ type: 'line',
610
+ correspondingDatasets: ['Temperature'],
611
+ },
612
+ ],
613
+ height: '400px',
216
614
  },
217
- {
218
- group: 'Temperature',
219
- key: 'Wednesday',
220
- temp: 32,
615
+ },
616
+ };
617
+
618
+ export const HorizontalComboLineAndSimpleBar = {
619
+ render: Template,
620
+
621
+ args: {
622
+ isInverse: false,
623
+ type: CarbonChartType.combo,
624
+ dataSet: [
625
+ {
626
+ group: 'School A',
627
+ date: 'Monday',
628
+ value: 10000,
629
+ },
630
+ {
631
+ group: 'School A',
632
+ date: 'Tuesday',
633
+ value: 65000,
634
+ },
635
+ {
636
+ group: 'School A',
637
+ date: 'Wednesday',
638
+ value: 30000,
639
+ },
640
+ {
641
+ group: 'School A',
642
+ date: 'Thursday',
643
+ value: 49213,
644
+ },
645
+ {
646
+ group: 'School A',
647
+ date: 'Friday',
648
+ value: 49213,
649
+ },
650
+ {
651
+ group: 'Temperature',
652
+ date: 'Monday',
653
+ temp: 70,
654
+ },
655
+ {
656
+ group: 'Temperature',
657
+ date: 'Tuesday',
658
+ temp: 75,
659
+ },
660
+ {
661
+ group: 'Temperature',
662
+ date: 'Wednesday',
663
+ temp: 31,
664
+ },
665
+ {
666
+ group: 'Temperature',
667
+ date: 'Thursday',
668
+ temp: 31,
669
+ },
670
+ {
671
+ group: 'Temperature',
672
+ date: 'Friday',
673
+ temp: 43,
674
+ },
675
+ ],
676
+ options: {
677
+ title: 'Horizontal Combo (Line + Simple bar)',
678
+ axes: {
679
+ top: {
680
+ mapsTo: 'value',
681
+ scaleType: 'linear',
682
+ title: 'USA Summer School Attendance',
683
+ },
684
+ bottom: {
685
+ mapsTo: 'temp',
686
+ scaleType: 'linear',
687
+ title: 'Temperature (°F)',
688
+ correspondingDatasets: ['Temperature'],
689
+ },
690
+ left: {
691
+ title: 'Day of the Week',
692
+ mapsTo: 'date',
693
+ scaleType: 'labels',
694
+ },
695
+ },
696
+ comboChartTypes: [
697
+ {
698
+ type: 'simple-bar',
699
+ options: {},
700
+ correspondingDatasets: ['School A'],
701
+ },
702
+ {
703
+ type: 'line',
704
+ options: {},
705
+ correspondingDatasets: ['Temperature'],
706
+ },
707
+ ],
708
+ height: '400px',
221
709
  },
222
- {
223
- group: 'Temperature',
224
- key: 'Thursday',
225
- temp: 34,
710
+ },
711
+ };
712
+
713
+ export const ComboLineAndArea = {
714
+ render: Template,
715
+
716
+ args: {
717
+ isInverse: false,
718
+ type: CarbonChartType.combo,
719
+ dataSet: [
720
+ {
721
+ group: 'Health',
722
+ key: 'January',
723
+ value: 312,
724
+ },
725
+ {
726
+ group: 'Health',
727
+ key: 'February',
728
+ value: 232,
729
+ },
730
+ {
731
+ group: 'Health',
732
+ key: 'March',
733
+ value: 432,
734
+ },
735
+ {
736
+ group: 'Health',
737
+ key: 'April',
738
+ value: 712,
739
+ },
740
+ {
741
+ group: 'Health',
742
+ key: 'May',
743
+ value: 834,
744
+ },
745
+ {
746
+ group: 'Health',
747
+ key: 'June',
748
+ value: 800,
749
+ },
750
+ {
751
+ group: 'Health',
752
+ key: 'July',
753
+ value: 612,
754
+ },
755
+ {
756
+ group: 'Health',
757
+ key: 'August',
758
+ value: 442,
759
+ },
760
+ {
761
+ group: 'Temperature',
762
+ key: 'January',
763
+ temp: -20,
764
+ },
765
+ {
766
+ group: 'Temperature',
767
+ key: 'February',
768
+ temp: -12,
769
+ },
770
+ {
771
+ group: 'Temperature',
772
+ key: 'March',
773
+ temp: 3,
774
+ },
775
+ {
776
+ group: 'Temperature',
777
+ key: 'April',
778
+ temp: 18,
779
+ },
780
+ {
781
+ group: 'Temperature',
782
+ key: 'May',
783
+ temp: 24,
784
+ },
785
+ {
786
+ group: 'Temperature',
787
+ key: 'June',
788
+ temp: 34,
789
+ },
790
+ {
791
+ group: 'Temperature',
792
+ key: 'July',
793
+ temp: 37,
794
+ },
795
+ {
796
+ group: 'Temperature',
797
+ key: 'August',
798
+ temp: 30,
799
+ },
800
+ ],
801
+ options: {
802
+ title: 'Combo (Line + Area)',
803
+ points: {
804
+ enabled: false,
805
+ },
806
+ axes: {
807
+ left: {
808
+ title: 'Score',
809
+ mapsTo: 'value',
810
+ },
811
+ bottom: {
812
+ scaleType: 'labels',
813
+ mapsTo: 'key',
814
+ },
815
+ right: {
816
+ title: 'Temperature (°C)',
817
+ mapsTo: 'temp',
818
+ correspondingDatasets: ['Temperature'],
819
+ },
820
+ },
821
+ comboChartTypes: [
822
+ {
823
+ type: 'area',
824
+ options: {},
825
+ correspondingDatasets: ['Health'],
826
+ },
827
+ {
828
+ type: 'line',
829
+ options: {
830
+ points: {
831
+ enabled: true,
832
+ },
833
+ },
834
+ correspondingDatasets: ['Temperature'],
835
+ },
836
+ ],
837
+ curve: 'curveNatural',
838
+ height: '400px',
226
839
  },
227
- {
228
- group: 'Temperature',
229
- key: 'Friday',
230
- temp: 23,
840
+ },
841
+ };
842
+
843
+ export const ComboStackedAreaAndLine = {
844
+ render: Template,
845
+
846
+ args: {
847
+ isInverse: false,
848
+ type: CarbonChartType.combo,
849
+ dataSet: [
850
+ {
851
+ group: 'Dataset 1',
852
+ date: '2023-01-01',
853
+ value: 10000,
854
+ },
855
+ {
856
+ group: 'Dataset 1',
857
+ date: '2023-01-05',
858
+ value: 65000,
859
+ },
860
+ {
861
+ group: 'Dataset 1',
862
+ date: '2023-01-08',
863
+ value: 10000,
864
+ },
865
+ {
866
+ group: 'Dataset 1',
867
+ date: '2023-01-13',
868
+ value: 49213,
869
+ },
870
+ {
871
+ group: 'Dataset 1',
872
+ date: '2023-01-17',
873
+ value: 51213,
874
+ },
875
+ {
876
+ group: 'Dataset 2',
877
+ date: '2023-01-01',
878
+ value: 20000,
879
+ },
880
+ {
881
+ group: 'Dataset 2',
882
+ date: '2023-01-05',
883
+ value: 25000,
884
+ },
885
+ {
886
+ group: 'Dataset 2',
887
+ date: '2023-01-08',
888
+ value: 60000,
889
+ },
890
+ {
891
+ group: 'Dataset 2',
892
+ date: '2023-01-13',
893
+ value: 30213,
894
+ },
895
+ {
896
+ group: 'Dataset 2',
897
+ date: '2023-01-17',
898
+ value: 55213,
899
+ },
900
+ {
901
+ group: 'Dataset 3',
902
+ date: '2023-01-01',
903
+ value: 30000,
904
+ },
905
+ {
906
+ group: 'Dataset 3',
907
+ date: '2023-01-05',
908
+ value: 20000,
909
+ },
910
+ {
911
+ group: 'Dataset 3',
912
+ date: '2023-01-08',
913
+ value: 40000,
914
+ },
915
+ {
916
+ group: 'Dataset 3',
917
+ date: '2023-01-13',
918
+ value: 60213,
919
+ },
920
+ {
921
+ group: 'Dataset 3',
922
+ date: '2023-01-17',
923
+ value: 25213,
924
+ },
925
+ {
926
+ group: 'Temperature',
927
+ date: '2023-01-01',
928
+ temp: 77,
929
+ },
930
+ {
931
+ group: 'Temperature',
932
+ date: '2023-01-05',
933
+ temp: 65,
934
+ },
935
+ {
936
+ group: 'Temperature',
937
+ date: '2023-01-08',
938
+ temp: 80,
939
+ },
940
+ {
941
+ group: 'Temperature',
942
+ date: '2023-01-13',
943
+ temp: 43,
944
+ },
945
+ {
946
+ group: 'Temperature',
947
+ date: '2023-01-17',
948
+ temp: 53,
949
+ },
950
+ ],
951
+ options: {
952
+ title: 'Combo (Stacked Area + Line)',
953
+ axes: {
954
+ left: {
955
+ title: 'left',
956
+ stacked: true,
957
+ mapsTo: 'value',
958
+ titleOrientation: 'right',
959
+ },
960
+ bottom: {
961
+ scaleType: 'time',
962
+ mapsTo: 'date',
963
+ },
964
+ right: {
965
+ title: 'right',
966
+ scaleType: 'linear',
967
+ mapsTo: 'temp',
968
+ correspondingDatasets: ['Temperature'],
969
+ titleOrientation: 'left',
970
+ },
971
+ },
972
+ curve: 'curveMonotoneX',
973
+ comboChartTypes: [
974
+ {
975
+ type: 'stacked-area',
976
+ options: {
977
+ points: {
978
+ enabled: false,
979
+ },
980
+ },
981
+ correspondingDatasets: ['Dataset 1', 'Dataset 2', 'Dataset 3'],
982
+ },
983
+ {
984
+ type: 'line',
985
+ correspondingDatasets: ['Temperature'],
986
+ },
987
+ ],
988
+ height: '400px',
231
989
  },
232
- ],
233
- options: {
234
- title: 'Combo (Line + Stacked bar)',
235
- axes: {
236
- left: {
237
- title: 'Disney Park Attendance',
238
- mapsTo: 'value',
239
- stacked: true,
240
- },
241
- bottom: {
242
- title: '2018 Annual Sales Figures',
243
- mapsTo: 'key',
244
- scaleType: 'labels',
245
- },
246
- right: {
247
- title: 'Temperature (°C)',
248
- mapsTo: 'temp',
249
- correspondingDatasets: ['Temperature'],
990
+ },
991
+ };
992
+
993
+ export const ComboLineAndScatterAndBar = {
994
+ render: Template,
995
+
996
+ args: {
997
+ isInverse: false,
998
+ type: CarbonChartType.combo,
999
+ dataSet: [
1000
+ {
1001
+ group: 'Paris',
1002
+ key: 'Monday',
1003
+ temp: 25,
1004
+ },
1005
+ {
1006
+ group: 'Paris',
1007
+ key: 'Tuesday',
1008
+ temp: 33,
1009
+ },
1010
+ {
1011
+ group: 'Paris',
1012
+ key: 'Wednesday',
1013
+ temp: 27,
1014
+ },
1015
+ {
1016
+ group: 'Paris',
1017
+ key: 'Thursday',
1018
+ temp: 25,
1019
+ },
1020
+ {
1021
+ group: 'Paris',
1022
+ key: 'Friday',
1023
+ temp: 32,
1024
+ },
1025
+ {
1026
+ group: 'Marseille',
1027
+ key: 'Monday',
1028
+ temp: 16,
1029
+ },
1030
+ {
1031
+ group: 'Marseille',
1032
+ key: 'Tuesday',
1033
+ temp: 22,
1034
+ },
1035
+ {
1036
+ group: 'Marseille',
1037
+ key: 'Wednesday',
1038
+ temp: 20,
1039
+ },
1040
+ {
1041
+ group: 'Marseille',
1042
+ key: 'Thursday',
1043
+ temp: 22,
1044
+ },
1045
+ {
1046
+ group: 'Marseille',
1047
+ key: 'Friday',
1048
+ temp: 25,
1049
+ },
1050
+ {
1051
+ group: 'Avg Temperature',
1052
+ key: 'Monday',
1053
+ temp: 20.5,
1054
+ },
1055
+ {
1056
+ group: 'Avg Temperature',
1057
+ key: 'Tuesday',
1058
+ temp: 27.5,
1059
+ },
1060
+ {
1061
+ group: 'Avg Temperature',
1062
+ key: 'Wednesday',
1063
+ temp: 23.5,
1064
+ },
1065
+ {
1066
+ group: 'Avg Temperature',
1067
+ key: 'Thursday',
1068
+ temp: 23.5,
1069
+ },
1070
+ {
1071
+ group: 'Avg Temperature',
1072
+ key: 'Friday',
1073
+ temp: 28.5,
1074
+ },
1075
+ {
1076
+ group: 'Attendance',
1077
+ key: 'Monday',
1078
+ value: 2650,
1079
+ },
1080
+ {
1081
+ group: 'Attendance',
1082
+ key: 'Tuesday',
1083
+ value: 2553,
1084
+ },
1085
+ {
1086
+ group: 'Attendance',
1087
+ key: 'Wednesday',
1088
+ value: 3433,
250
1089
  },
251
- },
252
- comboChartTypes: [
253
1090
  {
254
- type: 'stacked-bar',
255
- options: {},
256
- correspondingDatasets: ['Florida', 'California', 'Tokyo'],
1091
+ group: 'Attendance',
1092
+ key: 'Thursday',
1093
+ value: 3754,
257
1094
  },
258
1095
  {
259
- type: 'line',
260
- options: {},
261
- correspondingDatasets: ['Temperature'],
1096
+ group: 'Attendance',
1097
+ key: 'Friday',
1098
+ value: 3744,
262
1099
  },
263
1100
  ],
264
- height: '400px',
1101
+ options: {
1102
+ title: 'Combo (Line + Scatter + Bar)',
1103
+ axes: {
1104
+ left: {
1105
+ mapsTo: 'value',
1106
+ title: 'Attendance',
1107
+ },
1108
+ bottom: {
1109
+ scaleType: 'labels',
1110
+ mapsTo: 'key',
1111
+ },
1112
+ right: {
1113
+ title: 'Temperature (°C)',
1114
+ mapsTo: 'temp',
1115
+ scaleType: 'linear',
1116
+ correspondingDatasets: ['Avg Temperature', 'Paris', 'Marseille'],
1117
+ },
1118
+ },
1119
+ curve: 'curveMonotoneX',
1120
+ comboChartTypes: [
1121
+ {
1122
+ type: 'simple-bar',
1123
+ correspondingDatasets: ['Attendance'],
1124
+ },
1125
+ {
1126
+ type: 'scatter',
1127
+ correspondingDatasets: ['Paris', 'Marseille'],
1128
+ },
1129
+ {
1130
+ type: 'line',
1131
+ correspondingDatasets: ['Avg Temperature'],
1132
+ },
1133
+ ],
1134
+ height: '400px',
1135
+ },
265
1136
  },
266
1137
  };
267
1138
 
268
- export const ComboLineAndGroupedBarCustomConfigs = Template.bind({});
269
- ComboLineAndGroupedBarCustomConfigs.args = {
270
- isInverse: false,
271
- type: CarbonChartType.combo,
272
- dataSet: [
273
- {
274
- group: 'Location 1',
275
- key: 'Monday',
276
- value: 65000,
277
- },
278
- {
279
- group: 'Location 1',
280
- key: 'Tuesday',
281
- value: -39123,
282
- },
283
- {
284
- group: 'Location 1',
285
- key: 'Wednesday',
286
- value: -35213,
287
- },
288
- {
289
- group: 'Location 1',
290
- key: 'Thursday',
291
- value: 51213,
292
- },
293
- {
294
- group: 'Location 1',
295
- key: 'Friday',
296
- value: 16932,
297
- },
298
- {
299
- group: 'Location 2',
300
- key: 'Monday',
301
- value: 32432,
302
- },
303
- {
304
- group: 'Location 2',
305
- key: 'Tuesday',
306
- value: -21312,
307
- },
308
- {
309
- group: 'Location 2',
310
- key: 'Wednesday',
311
- value: -56456,
312
- },
313
- {
314
- group: 'Location 2',
315
- key: 'Thursday',
316
- value: -21312,
317
- },
318
- {
319
- group: 'Location 2',
320
- key: 'Friday',
321
- value: 34234,
322
- },
323
- {
324
- group: 'Location 3',
325
- key: 'Monday',
326
- value: -12312,
327
- },
328
- {
329
- group: 'Location 3',
330
- key: 'Tuesday',
331
- value: 23232,
332
- },
333
- {
334
- group: 'Location 3',
335
- key: 'Wednesday',
336
- value: 34232,
337
- },
338
- {
339
- group: 'Location 3',
340
- key: 'Thursday',
341
- value: -12312,
342
- },
343
- {
344
- group: 'Location 3',
345
- key: 'Friday',
346
- value: -34234,
347
- },
348
- {
349
- group: 'Temperature',
350
- key: 'Monday',
351
- temp: 20,
352
- },
353
- {
354
- group: 'Temperature',
355
- key: 'Tuesday',
356
- temp: 23,
357
- },
358
- {
359
- group: 'Temperature',
360
- key: 'Wednesday',
361
- temp: 33,
362
- },
363
- {
364
- group: 'Temperature',
365
- key: 'Thursday',
366
- temp: 34,
367
- },
368
- {
369
- group: 'Temperature',
370
- key: 'Friday',
371
- temp: 34,
372
- },
373
- ],
374
- options: {
375
- title: 'Combo (Line + Grouped bar) - custom configs',
376
- axes: {
377
- left: {
378
- title: 'Sales',
379
- mapsTo: 'value',
380
- },
381
- bottom: {
382
- scaleType: 'labels',
383
- mapsTo: 'key',
384
- },
385
- right: {
386
- title: 'Temperature (°C)',
387
- mapsTo: 'temp',
388
- correspondingDatasets: ['Temperature'],
389
- },
390
- },
391
- comboChartTypes: [
1139
+ export const ComboLineAndAreaTimeSeries = {
1140
+ render: Template,
1141
+
1142
+ args: {
1143
+ isInverse: false,
1144
+ type: CarbonChartType.combo,
1145
+ dataSet: [
392
1146
  {
393
- type: 'grouped-bar',
394
- correspondingDatasets: ['Location 1', 'Location 2', 'Location 3'],
1147
+ group: 'Health',
1148
+ key: '2022-12-30',
1149
+ value: 312,
395
1150
  },
396
1151
  {
397
- type: 'line',
398
- options: {
399
- points: {
400
- filled: true,
401
- opacity: 0.5,
402
- },
403
- },
404
- correspondingDatasets: ['Temperature'],
1152
+ group: 'Health',
1153
+ key: '2023-01-06',
1154
+ value: 232,
405
1155
  },
406
- ],
407
- height: '400px',
408
- },
409
- };
410
-
411
- export const ComboLineAndFloatingBar = Template.bind({});
412
- ComboLineAndFloatingBar.args = {
413
- isInverse: false,
414
- type: CarbonChartType.combo,
415
- dataSet: [
416
- {
417
- group: 'School A',
418
- date: 'Monday',
419
- value: 50000,
420
- },
421
- {
422
- group: 'School A',
423
- date: 'Tuesday',
424
- value: 45000,
425
- },
426
- {
427
- group: 'School A',
428
- date: 'Wednesday',
429
- value: 58000,
430
- },
431
- {
432
- group: 'School A',
433
- date: 'Thursday',
434
- value: 31000,
435
- },
436
- {
437
- group: 'School A',
438
- date: 'Friday',
439
- value: 33000,
440
- },
441
- {
442
- group: 'Temperature',
443
- date: 'Monday',
444
- temp: [65, 70],
445
- },
446
- {
447
- group: 'Temperature',
448
- date: 'Tuesday',
449
- temp: [67, 71],
450
- },
451
- {
452
- group: 'Temperature',
453
- date: 'Wednesday',
454
- temp: [75, 83],
455
- },
456
- {
457
- group: 'Temperature',
458
- date: 'Thursday',
459
- temp: [31, 42],
460
- },
461
- {
462
- group: 'Temperature',
463
- date: 'Friday',
464
- temp: [43, 55],
465
- },
466
- ],
467
- options: {
468
- title: 'Combo (Line + Floating bar)',
469
- axes: {
470
- left: {
471
- mapsTo: 'value',
472
- scaleType: 'linear',
473
- title: 'USA Summer School Attendance',
474
- correspondingDatasets: ['School A'],
475
- },
476
- right: {
477
- mapsTo: 'temp',
478
- title: 'Temperature (°F)',
479
- },
480
- bottom: {
481
- title: 'Day of the Week',
482
- mapsTo: 'date',
483
- scaleType: 'labels',
1156
+ {
1157
+ group: 'Health',
1158
+ key: '2023-01-08',
1159
+ value: 432,
484
1160
  },
485
- },
486
- comboChartTypes: [
487
1161
  {
488
- type: 'simple-bar',
489
- correspondingDatasets: ['Temperature'],
1162
+ group: 'Health',
1163
+ key: '2023-01-15',
1164
+ value: 712,
490
1165
  },
491
1166
  {
492
- type: 'line',
493
- options: {
494
- points: {
495
- radius: 5,
496
- },
497
- },
498
- correspondingDatasets: ['School A'],
1167
+ group: 'Health',
1168
+ key: '2023-01-19',
1169
+ value: 834,
499
1170
  },
500
- ],
501
- height: '400px',
502
- },
503
- };
504
-
505
- export const ComboHorizontalLineAndGroupedBar = Template.bind({});
506
- ComboHorizontalLineAndGroupedBar.args = {
507
- isInverse: false,
508
- type: CarbonChartType.combo,
509
- dataSet: [
510
- {
511
- group: 'Location 1',
512
- key: 'Monday',
513
- value: 65000,
514
- },
515
- {
516
- group: 'Location 1',
517
- key: 'Tuesday',
518
- value: -39123,
519
- },
520
- {
521
- group: 'Location 1',
522
- key: 'Wednesday',
523
- value: -35213,
524
- },
525
- {
526
- group: 'Location 2',
527
- key: 'Monday',
528
- value: 32432,
529
- },
530
- {
531
- group: 'Location 2',
532
- key: 'Tuesday',
533
- value: -21312,
534
- },
535
- {
536
- group: 'Location 2',
537
- key: 'Wednesday',
538
- value: -56456,
539
- },
540
- {
541
- group: 'Location 3',
542
- key: 'Monday',
543
- value: -12312,
544
- },
545
- {
546
- group: 'Location 3',
547
- key: 'Tuesday',
548
- value: 23232,
549
- },
550
- {
551
- group: 'Location 3',
552
- key: 'Wednesday',
553
- value: 34232,
554
- },
555
- {
556
- group: 'Temperature',
557
- key: 'Monday',
558
- temp: 20,
559
- },
560
- {
561
- group: 'Temperature',
562
- key: 'Tuesday',
563
- temp: 23,
564
- },
565
- {
566
- group: 'Temperature',
567
- key: 'Wednesday',
568
- temp: 33,
569
- },
570
- ],
571
- options: {
572
- title: 'Combo Horizontal (Line + Grouped bar)',
573
- axes: {
574
- top: {
575
- title: 'Sales',
576
- mapsTo: 'value',
577
- main: true,
578
- },
579
- left: {
580
- scaleType: 'labels',
581
- mapsTo: 'key',
582
- },
583
- bottom: {
584
- title: 'Temperature (°C)',
585
- mapsTo: 'temp',
586
- correspondingDatasets: ['Temperature'],
1171
+ {
1172
+ group: 'Health',
1173
+ key: '2023-02-01',
1174
+ value: 800,
587
1175
  },
588
- },
589
- comboChartTypes: [
590
1176
  {
591
- type: 'grouped-bar',
592
- correspondingDatasets: ['Location 1', 'Location 2', 'Location 3'],
1177
+ group: 'Health',
1178
+ key: '2023-02-05',
1179
+ value: 612,
593
1180
  },
594
1181
  {
595
- type: 'line',
596
- correspondingDatasets: ['Temperature'],
1182
+ group: 'Health',
1183
+ key: '2023-02-13',
1184
+ value: 442,
597
1185
  },
598
- ],
599
- height: '400px',
600
- },
601
- };
602
-
603
- export const HorizontalComboLineAndSimpleBar = Template.bind({});
604
- HorizontalComboLineAndSimpleBar.args = {
605
- isInverse: false,
606
- type: CarbonChartType.combo,
607
- dataSet: [
608
- {
609
- group: 'School A',
610
- date: 'Monday',
611
- value: 10000,
612
- },
613
- {
614
- group: 'School A',
615
- date: 'Tuesday',
616
- value: 65000,
617
- },
618
- {
619
- group: 'School A',
620
- date: 'Wednesday',
621
- value: 30000,
622
- },
623
- {
624
- group: 'School A',
625
- date: 'Thursday',
626
- value: 49213,
627
- },
628
- {
629
- group: 'School A',
630
- date: 'Friday',
631
- value: 49213,
632
- },
633
- {
634
- group: 'Temperature',
635
- date: 'Monday',
636
- temp: 70,
637
- },
638
- {
639
- group: 'Temperature',
640
- date: 'Tuesday',
641
- temp: 75,
642
- },
643
- {
644
- group: 'Temperature',
645
- date: 'Wednesday',
646
- temp: 31,
647
- },
648
- {
649
- group: 'Temperature',
650
- date: 'Thursday',
651
- temp: 31,
652
- },
653
- {
654
- group: 'Temperature',
655
- date: 'Friday',
656
- temp: 43,
657
- },
658
- ],
659
- options: {
660
- title: 'Horizontal Combo (Line + Simple bar)',
661
- axes: {
662
- top: {
663
- mapsTo: 'value',
664
- scaleType: 'linear',
665
- title: 'USA Summer School Attendance',
666
- },
667
- bottom: {
668
- mapsTo: 'temp',
669
- scaleType: 'linear',
670
- title: 'Temperature (°F)',
671
- correspondingDatasets: ['Temperature'],
672
- },
673
- left: {
674
- title: 'Day of the Week',
675
- mapsTo: 'date',
676
- scaleType: 'labels',
1186
+ {
1187
+ group: 'Temperature',
1188
+ key: '2023-01-01',
1189
+ temp: -20,
677
1190
  },
678
- },
679
- comboChartTypes: [
680
1191
  {
681
- type: 'simple-bar',
682
- options: {},
683
- correspondingDatasets: ['School A'],
1192
+ group: 'Temperature',
1193
+ key: '2023-01-05',
1194
+ temp: -12,
684
1195
  },
685
1196
  {
686
- type: 'line',
687
- options: {},
688
- correspondingDatasets: ['Temperature'],
1197
+ group: 'Temperature',
1198
+ key: '2023-01-08',
1199
+ temp: 3,
689
1200
  },
690
- ],
691
- height: '400px',
692
- },
693
- };
694
-
695
- export const ComboLineAndArea = Template.bind({});
696
- ComboLineAndArea.args = {
697
- isInverse: false,
698
- type: CarbonChartType.combo,
699
- dataSet: [
700
- {
701
- group: 'Health',
702
- key: 'January',
703
- value: 312,
704
- },
705
- {
706
- group: 'Health',
707
- key: 'February',
708
- value: 232,
709
- },
710
- {
711
- group: 'Health',
712
- key: 'March',
713
- value: 432,
714
- },
715
- {
716
- group: 'Health',
717
- key: 'April',
718
- value: 712,
719
- },
720
- {
721
- group: 'Health',
722
- key: 'May',
723
- value: 834,
724
- },
725
- {
726
- group: 'Health',
727
- key: 'June',
728
- value: 800,
729
- },
730
- {
731
- group: 'Health',
732
- key: 'July',
733
- value: 612,
734
- },
735
- {
736
- group: 'Health',
737
- key: 'August',
738
- value: 442,
739
- },
740
- {
741
- group: 'Temperature',
742
- key: 'January',
743
- temp: -20,
744
- },
745
- {
746
- group: 'Temperature',
747
- key: 'February',
748
- temp: -12,
749
- },
750
- {
751
- group: 'Temperature',
752
- key: 'March',
753
- temp: 3,
754
- },
755
- {
756
- group: 'Temperature',
757
- key: 'April',
758
- temp: 18,
759
- },
760
- {
761
- group: 'Temperature',
762
- key: 'May',
763
- temp: 24,
764
- },
765
- {
766
- group: 'Temperature',
767
- key: 'June',
768
- temp: 34,
769
- },
770
- {
771
- group: 'Temperature',
772
- key: 'July',
773
- temp: 37,
774
- },
775
- {
776
- group: 'Temperature',
777
- key: 'August',
778
- temp: 30,
779
- },
780
- ],
781
- options: {
782
- title: 'Combo (Line + Area)',
783
- points: {
784
- enabled: false,
785
- },
786
- axes: {
787
- left: {
788
- title: 'Score',
789
- mapsTo: 'value',
1201
+ {
1202
+ group: 'Temperature',
1203
+ key: '2023-01-13',
1204
+ temp: 18,
790
1205
  },
791
- bottom: {
792
- scaleType: 'labels',
793
- mapsTo: 'key',
1206
+ {
1207
+ group: 'Temperature',
1208
+ key: '2023-01-19',
1209
+ temp: 24,
794
1210
  },
795
- right: {
796
- title: 'Temperature (°C)',
797
- mapsTo: 'temp',
798
- correspondingDatasets: ['Temperature'],
1211
+ {
1212
+ group: 'Temperature',
1213
+ key: '2023-02-02',
1214
+ temp: 34,
799
1215
  },
800
- },
801
- comboChartTypes: [
802
1216
  {
803
- type: 'area',
804
- options: {},
805
- correspondingDatasets: ['Health'],
1217
+ group: 'Temperature',
1218
+ key: '2023-02-07',
1219
+ temp: 37,
806
1220
  },
807
1221
  {
808
- type: 'line',
809
- options: {
810
- points: {
811
- enabled: true,
1222
+ group: 'Temperature',
1223
+ key: '2023-02-09',
1224
+ temp: 30,
1225
+ },
1226
+ ],
1227
+ options: {
1228
+ title: 'Combo (Line + Area) Time series',
1229
+ points: {
1230
+ enabled: false,
1231
+ },
1232
+ axes: {
1233
+ left: {
1234
+ title: 'Score',
1235
+ mapsTo: 'value',
1236
+ },
1237
+ bottom: {
1238
+ scaleType: 'time',
1239
+ mapsTo: 'key',
1240
+ },
1241
+ right: {
1242
+ title: 'Temperature (°C)',
1243
+ mapsTo: 'temp',
1244
+ correspondingDatasets: ['Temperature'],
1245
+ },
1246
+ },
1247
+ comboChartTypes: [
1248
+ {
1249
+ type: 'area',
1250
+ options: {},
1251
+ correspondingDatasets: ['Health'],
1252
+ },
1253
+ {
1254
+ type: 'line',
1255
+ options: {
1256
+ points: {
1257
+ enabled: true,
1258
+ },
812
1259
  },
1260
+ correspondingDatasets: ['Temperature'],
813
1261
  },
814
- correspondingDatasets: ['Temperature'],
1262
+ ],
1263
+ curve: 'curveNatural',
1264
+ timeScale: {
1265
+ addSpaceOnEdges: 0,
815
1266
  },
816
- ],
817
- curve: 'curveNatural',
818
- height: '400px',
1267
+ height: '400px',
1268
+ },
819
1269
  },
820
1270
  };
821
1271
 
822
- export const ComboStackedAreaAndLine = Template.bind({});
823
- ComboStackedAreaAndLine.args = {
824
- isInverse: false,
825
- type: CarbonChartType.combo,
826
- dataSet: [
827
- {
828
- group: 'Dataset 1',
829
- date: '2023-01-01',
830
- value: 10000,
831
- },
832
- {
833
- group: 'Dataset 1',
834
- date: '2023-01-05',
835
- value: 65000,
836
- },
837
- {
838
- group: 'Dataset 1',
839
- date: '2023-01-08',
840
- value: 10000,
841
- },
842
- {
843
- group: 'Dataset 1',
844
- date: '2023-01-13',
845
- value: 49213,
846
- },
847
- {
848
- group: 'Dataset 1',
849
- date: '2023-01-17',
850
- value: 51213,
851
- },
852
- {
853
- group: 'Dataset 2',
854
- date: '2023-01-01',
855
- value: 20000,
856
- },
857
- {
858
- group: 'Dataset 2',
859
- date: '2023-01-05',
860
- value: 25000,
861
- },
862
- {
863
- group: 'Dataset 2',
864
- date: '2023-01-08',
865
- value: 60000,
866
- },
867
- {
868
- group: 'Dataset 2',
869
- date: '2023-01-13',
870
- value: 30213,
871
- },
872
- {
873
- group: 'Dataset 2',
874
- date: '2023-01-17',
875
- value: 55213,
876
- },
877
- {
878
- group: 'Dataset 3',
879
- date: '2023-01-01',
880
- value: 30000,
881
- },
882
- {
883
- group: 'Dataset 3',
884
- date: '2023-01-05',
885
- value: 20000,
886
- },
887
- {
888
- group: 'Dataset 3',
889
- date: '2023-01-08',
890
- value: 40000,
891
- },
892
- {
893
- group: 'Dataset 3',
894
- date: '2023-01-13',
895
- value: 60213,
896
- },
897
- {
898
- group: 'Dataset 3',
899
- date: '2023-01-17',
900
- value: 25213,
901
- },
902
- {
903
- group: 'Temperature',
904
- date: '2023-01-01',
905
- temp: 77,
906
- },
907
- {
908
- group: 'Temperature',
909
- date: '2023-01-05',
910
- temp: 65,
911
- },
912
- {
913
- group: 'Temperature',
914
- date: '2023-01-08',
915
- temp: 80,
916
- },
917
- {
918
- group: 'Temperature',
919
- date: '2023-01-13',
920
- temp: 43,
921
- },
922
- {
923
- group: 'Temperature',
924
- date: '2023-01-17',
925
- temp: 53,
926
- },
927
- ],
928
- options: {
929
- title: 'Combo (Stacked Area + Line)',
930
- axes: {
931
- left: {
932
- title: 'left',
933
- stacked: true,
934
- mapsTo: 'value',
935
- titleOrientation: 'right',
936
- },
937
- bottom: {
938
- scaleType: 'time',
939
- mapsTo: 'date',
940
- },
941
- right: {
942
- title: 'right',
943
- scaleType: 'linear',
944
- mapsTo: 'temp',
945
- correspondingDatasets: ['Temperature'],
946
- titleOrientation: 'left',
1272
+ export const ComboChartEmpty = {
1273
+ render: Template,
1274
+
1275
+ args: {
1276
+ isInverse: false,
1277
+ type: CarbonChartType.combo,
1278
+ dataSet: [],
1279
+ options: {
1280
+ title: 'Combo Chart (empty)',
1281
+ axes: {
1282
+ left: {
1283
+ mapsTo: 'value',
1284
+ title: 'Attendance',
1285
+ },
1286
+ bottom: {
1287
+ scaleType: 'labels',
1288
+ mapsTo: 'key',
1289
+ },
1290
+ right: {
1291
+ title: 'Temperature (°C)',
1292
+ mapsTo: 'temp',
1293
+ scaleType: 'linear',
1294
+ correspondingDatasets: ['Temperature'],
1295
+ },
947
1296
  },
1297
+ comboChartTypes: [
1298
+ {
1299
+ type: 'simple-bar',
1300
+ correspondingDatasets: ['Attendance'],
1301
+ },
1302
+ {
1303
+ type: 'line',
1304
+ correspondingDatasets: ['Temperature'],
1305
+ },
1306
+ ],
1307
+ height: '400px',
948
1308
  },
949
- curve: 'curveMonotoneX',
950
- comboChartTypes: [
1309
+ },
1310
+ };
1311
+
1312
+ export const ComboChartLoading = {
1313
+ render: Template,
1314
+
1315
+ args: {
1316
+ isInverse: false,
1317
+ type: CarbonChartType.combo,
1318
+ dataSet: [
951
1319
  {
952
- type: 'stacked-area',
953
- options: {
954
- points: {
955
- enabled: false,
956
- },
957
- },
958
- correspondingDatasets: ['Dataset 1', 'Dataset 2', 'Dataset 3'],
1320
+ group: 'Paris',
1321
+ key: 'Monday',
1322
+ temp: 25,
959
1323
  },
960
1324
  {
961
- type: 'line',
962
- correspondingDatasets: ['Temperature'],
1325
+ group: 'Paris',
1326
+ key: 'Tuesday',
1327
+ temp: 33,
963
1328
  },
964
- ],
965
- height: '400px',
966
- },
967
- };
968
-
969
- export const ComboLineAndScatterAndBar = Template.bind({});
970
- ComboLineAndScatterAndBar.args = {
971
- isInverse: false,
972
- type: CarbonChartType.combo,
973
- dataSet: [
974
- {
975
- group: 'Paris',
976
- key: 'Monday',
977
- temp: 25,
978
- },
979
- {
980
- group: 'Paris',
981
- key: 'Tuesday',
982
- temp: 33,
983
- },
984
- {
985
- group: 'Paris',
986
- key: 'Wednesday',
987
- temp: 27,
988
- },
989
- {
990
- group: 'Paris',
991
- key: 'Thursday',
992
- temp: 25,
993
- },
994
- {
995
- group: 'Paris',
996
- key: 'Friday',
997
- temp: 32,
998
- },
999
- {
1000
- group: 'Marseille',
1001
- key: 'Monday',
1002
- temp: 16,
1003
- },
1004
- {
1005
- group: 'Marseille',
1006
- key: 'Tuesday',
1007
- temp: 22,
1008
- },
1009
- {
1010
- group: 'Marseille',
1011
- key: 'Wednesday',
1012
- temp: 20,
1013
- },
1014
- {
1015
- group: 'Marseille',
1016
- key: 'Thursday',
1017
- temp: 22,
1018
- },
1019
- {
1020
- group: 'Marseille',
1021
- key: 'Friday',
1022
- temp: 25,
1023
- },
1024
- {
1025
- group: 'Avg Temperature',
1026
- key: 'Monday',
1027
- temp: 20.5,
1028
- },
1029
- {
1030
- group: 'Avg Temperature',
1031
- key: 'Tuesday',
1032
- temp: 27.5,
1033
- },
1034
- {
1035
- group: 'Avg Temperature',
1036
- key: 'Wednesday',
1037
- temp: 23.5,
1038
- },
1039
- {
1040
- group: 'Avg Temperature',
1041
- key: 'Thursday',
1042
- temp: 23.5,
1043
- },
1044
- {
1045
- group: 'Avg Temperature',
1046
- key: 'Friday',
1047
- temp: 28.5,
1048
- },
1049
- {
1050
- group: 'Attendance',
1051
- key: 'Monday',
1052
- value: 2650,
1053
- },
1054
- {
1055
- group: 'Attendance',
1056
- key: 'Tuesday',
1057
- value: 2553,
1058
- },
1059
- {
1060
- group: 'Attendance',
1061
- key: 'Wednesday',
1062
- value: 3433,
1063
- },
1064
- {
1065
- group: 'Attendance',
1066
- key: 'Thursday',
1067
- value: 3754,
1068
- },
1069
- {
1070
- group: 'Attendance',
1071
- key: 'Friday',
1072
- value: 3744,
1073
- },
1074
- ],
1075
- options: {
1076
- title: 'Combo (Line + Scatter + Bar)',
1077
- axes: {
1078
- left: {
1079
- mapsTo: 'value',
1080
- title: 'Attendance',
1081
- },
1082
- bottom: {
1083
- scaleType: 'labels',
1084
- mapsTo: 'key',
1085
- },
1086
- right: {
1087
- title: 'Temperature (°C)',
1088
- mapsTo: 'temp',
1089
- scaleType: 'linear',
1090
- correspondingDatasets: ['Avg Temperature', 'Paris', 'Marseille'],
1329
+ {
1330
+ group: 'Paris',
1331
+ key: 'Wednesday',
1332
+ temp: 27,
1091
1333
  },
1092
- },
1093
- curve: 'curveMonotoneX',
1094
- comboChartTypes: [
1095
1334
  {
1096
- type: 'simple-bar',
1097
- correspondingDatasets: ['Attendance'],
1335
+ group: 'Paris',
1336
+ key: 'Thursday',
1337
+ temp: 25,
1098
1338
  },
1099
1339
  {
1100
- type: 'scatter',
1101
- correspondingDatasets: ['Paris', 'Marseille'],
1340
+ group: 'Paris',
1341
+ key: 'Friday',
1342
+ temp: 32,
1102
1343
  },
1103
1344
  {
1104
- type: 'line',
1105
- correspondingDatasets: ['Avg Temperature'],
1345
+ group: 'Marseille',
1346
+ key: 'Monday',
1347
+ temp: 16,
1106
1348
  },
1107
- ],
1108
- height: '400px',
1109
- },
1110
- };
1111
-
1112
- export const ComboLineAndAreaTimeSeries = Template.bind({});
1113
- ComboLineAndAreaTimeSeries.args = {
1114
- isInverse: false,
1115
- type: CarbonChartType.combo,
1116
- dataSet: [
1117
- {
1118
- group: 'Health',
1119
- key: '2022-12-30',
1120
- value: 312,
1121
- },
1122
- {
1123
- group: 'Health',
1124
- key: '2023-01-06',
1125
- value: 232,
1126
- },
1127
- {
1128
- group: 'Health',
1129
- key: '2023-01-08',
1130
- value: 432,
1131
- },
1132
- {
1133
- group: 'Health',
1134
- key: '2023-01-15',
1135
- value: 712,
1136
- },
1137
- {
1138
- group: 'Health',
1139
- key: '2023-01-19',
1140
- value: 834,
1141
- },
1142
- {
1143
- group: 'Health',
1144
- key: '2023-02-01',
1145
- value: 800,
1146
- },
1147
- {
1148
- group: 'Health',
1149
- key: '2023-02-05',
1150
- value: 612,
1151
- },
1152
- {
1153
- group: 'Health',
1154
- key: '2023-02-13',
1155
- value: 442,
1156
- },
1157
- {
1158
- group: 'Temperature',
1159
- key: '2023-01-01',
1160
- temp: -20,
1161
- },
1162
- {
1163
- group: 'Temperature',
1164
- key: '2023-01-05',
1165
- temp: -12,
1166
- },
1167
- {
1168
- group: 'Temperature',
1169
- key: '2023-01-08',
1170
- temp: 3,
1171
- },
1172
- {
1173
- group: 'Temperature',
1174
- key: '2023-01-13',
1175
- temp: 18,
1176
- },
1177
- {
1178
- group: 'Temperature',
1179
- key: '2023-01-19',
1180
- temp: 24,
1181
- },
1182
- {
1183
- group: 'Temperature',
1184
- key: '2023-02-02',
1185
- temp: 34,
1186
- },
1187
- {
1188
- group: 'Temperature',
1189
- key: '2023-02-07',
1190
- temp: 37,
1191
- },
1192
- {
1193
- group: 'Temperature',
1194
- key: '2023-02-09',
1195
- temp: 30,
1196
- },
1197
- ],
1198
- options: {
1199
- title: 'Combo (Line + Area) Time series',
1200
- points: {
1201
- enabled: false,
1202
- },
1203
- axes: {
1204
- left: {
1205
- title: 'Score',
1206
- mapsTo: 'value',
1349
+ {
1350
+ group: 'Marseille',
1351
+ key: 'Tuesday',
1352
+ temp: 22,
1207
1353
  },
1208
- bottom: {
1209
- scaleType: 'time',
1210
- mapsTo: 'key',
1354
+ {
1355
+ group: 'Marseille',
1356
+ key: 'Wednesday',
1357
+ temp: 20,
1211
1358
  },
1212
- right: {
1213
- title: 'Temperature (°C)',
1214
- mapsTo: 'temp',
1215
- correspondingDatasets: ['Temperature'],
1359
+ {
1360
+ group: 'Marseille',
1361
+ key: 'Thursday',
1362
+ temp: 22,
1216
1363
  },
1217
- },
1218
- comboChartTypes: [
1219
1364
  {
1220
- type: 'area',
1221
- options: {},
1222
- correspondingDatasets: ['Health'],
1365
+ group: 'Marseille',
1366
+ key: 'Friday',
1367
+ temp: 25,
1223
1368
  },
1224
1369
  {
1225
- type: 'line',
1226
- options: {
1227
- points: {
1228
- enabled: true,
1229
- },
1230
- },
1231
- correspondingDatasets: ['Temperature'],
1370
+ group: 'Avg Temperature',
1371
+ key: 'Monday',
1372
+ temp: 20.5,
1232
1373
  },
1233
- ],
1234
- curve: 'curveNatural',
1235
- timeScale: {
1236
- addSpaceOnEdges: 0,
1237
- },
1238
- height: '400px',
1239
- },
1240
- };
1241
-
1242
- export const ComboChartEmpty = Template.bind({});
1243
- ComboChartEmpty.args = {
1244
- isInverse: false,
1245
- type: CarbonChartType.combo,
1246
- dataSet: [],
1247
- options: {
1248
- title: 'Combo Chart (empty)',
1249
- axes: {
1250
- left: {
1251
- mapsTo: 'value',
1252
- title: 'Attendance',
1253
- },
1254
- bottom: {
1255
- scaleType: 'labels',
1256
- mapsTo: 'key',
1257
- },
1258
- right: {
1259
- title: 'Temperature (°C)',
1260
- mapsTo: 'temp',
1261
- scaleType: 'linear',
1262
- correspondingDatasets: ['Temperature'],
1374
+ {
1375
+ group: 'Avg Temperature',
1376
+ key: 'Tuesday',
1377
+ temp: 27.5,
1263
1378
  },
1264
- },
1265
- comboChartTypes: [
1266
1379
  {
1267
- type: 'simple-bar',
1268
- correspondingDatasets: ['Attendance'],
1380
+ group: 'Avg Temperature',
1381
+ key: 'Wednesday',
1382
+ temp: 23.5,
1269
1383
  },
1270
1384
  {
1271
- type: 'line',
1272
- correspondingDatasets: ['Temperature'],
1385
+ group: 'Avg Temperature',
1386
+ key: 'Thursday',
1387
+ temp: 23.5,
1273
1388
  },
1274
- ],
1275
- height: '400px',
1276
- },
1277
- };
1278
-
1279
- export const ComboChartLoading = Template.bind({});
1280
- ComboChartLoading.args = {
1281
- isInverse: false,
1282
- type: CarbonChartType.combo,
1283
- dataSet: [
1284
- {
1285
- group: 'Paris',
1286
- key: 'Monday',
1287
- temp: 25,
1288
- },
1289
- {
1290
- group: 'Paris',
1291
- key: 'Tuesday',
1292
- temp: 33,
1293
- },
1294
- {
1295
- group: 'Paris',
1296
- key: 'Wednesday',
1297
- temp: 27,
1298
- },
1299
- {
1300
- group: 'Paris',
1301
- key: 'Thursday',
1302
- temp: 25,
1303
- },
1304
- {
1305
- group: 'Paris',
1306
- key: 'Friday',
1307
- temp: 32,
1308
- },
1309
- {
1310
- group: 'Marseille',
1311
- key: 'Monday',
1312
- temp: 16,
1313
- },
1314
- {
1315
- group: 'Marseille',
1316
- key: 'Tuesday',
1317
- temp: 22,
1318
- },
1319
- {
1320
- group: 'Marseille',
1321
- key: 'Wednesday',
1322
- temp: 20,
1323
- },
1324
- {
1325
- group: 'Marseille',
1326
- key: 'Thursday',
1327
- temp: 22,
1328
- },
1329
- {
1330
- group: 'Marseille',
1331
- key: 'Friday',
1332
- temp: 25,
1333
- },
1334
- {
1335
- group: 'Avg Temperature',
1336
- key: 'Monday',
1337
- temp: 20.5,
1338
- },
1339
- {
1340
- group: 'Avg Temperature',
1341
- key: 'Tuesday',
1342
- temp: 27.5,
1343
- },
1344
- {
1345
- group: 'Avg Temperature',
1346
- key: 'Wednesday',
1347
- temp: 23.5,
1348
- },
1349
- {
1350
- group: 'Avg Temperature',
1351
- key: 'Thursday',
1352
- temp: 23.5,
1353
- },
1354
- {
1355
- group: 'Avg Temperature',
1356
- key: 'Friday',
1357
- temp: 28.5,
1358
- },
1359
- {
1360
- group: 'Attendance',
1361
- key: 'Monday',
1362
- value: 2650,
1363
- },
1364
- {
1365
- group: 'Attendance',
1366
- key: 'Tuesday',
1367
- value: 2553,
1368
- },
1369
- {
1370
- group: 'Attendance',
1371
- key: 'Wednesday',
1372
- value: 3433,
1373
- },
1374
- {
1375
- group: 'Attendance',
1376
- key: 'Thursday',
1377
- value: 3754,
1378
- },
1379
- {
1380
- group: 'Attendance',
1381
- key: 'Friday',
1382
- value: 3744,
1383
- },
1384
- ],
1385
- options: {
1386
- title: 'Combo Chart (loading)',
1387
- axes: {
1388
- left: {
1389
- mapsTo: 'value',
1390
- title: 'Attendance',
1391
- },
1392
- bottom: {
1393
- scaleType: 'labels',
1394
- mapsTo: 'key',
1395
- },
1396
- right: {
1397
- title: 'Temperature (°C)',
1398
- mapsTo: 'temp',
1399
- scaleType: 'linear',
1400
- correspondingDatasets: ['Temperature'],
1389
+ {
1390
+ group: 'Avg Temperature',
1391
+ key: 'Friday',
1392
+ temp: 28.5,
1393
+ },
1394
+ {
1395
+ group: 'Attendance',
1396
+ key: 'Monday',
1397
+ value: 2650,
1398
+ },
1399
+ {
1400
+ group: 'Attendance',
1401
+ key: 'Tuesday',
1402
+ value: 2553,
1403
+ },
1404
+ {
1405
+ group: 'Attendance',
1406
+ key: 'Wednesday',
1407
+ value: 3433,
1401
1408
  },
1402
- },
1403
- data: {
1404
- loading: true,
1405
- },
1406
- comboChartTypes: [
1407
1409
  {
1408
- type: 'simple-bar',
1409
- correspondingDatasets: ['Attendance'],
1410
+ group: 'Attendance',
1411
+ key: 'Thursday',
1412
+ value: 3754,
1410
1413
  },
1411
1414
  {
1412
- type: 'line',
1413
- correspondingDatasets: ['Temperature'],
1415
+ group: 'Attendance',
1416
+ key: 'Friday',
1417
+ value: 3744,
1414
1418
  },
1415
1419
  ],
1416
- height: '400px',
1420
+ options: {
1421
+ title: 'Combo Chart (loading)',
1422
+ axes: {
1423
+ left: {
1424
+ mapsTo: 'value',
1425
+ title: 'Attendance',
1426
+ },
1427
+ bottom: {
1428
+ scaleType: 'labels',
1429
+ mapsTo: 'key',
1430
+ },
1431
+ right: {
1432
+ title: 'Temperature (°C)',
1433
+ mapsTo: 'temp',
1434
+ scaleType: 'linear',
1435
+ correspondingDatasets: ['Temperature'],
1436
+ },
1437
+ },
1438
+ data: {
1439
+ loading: true,
1440
+ },
1441
+ comboChartTypes: [
1442
+ {
1443
+ type: 'simple-bar',
1444
+ correspondingDatasets: ['Attendance'],
1445
+ },
1446
+ {
1447
+ type: 'line',
1448
+ correspondingDatasets: ['Temperature'],
1449
+ },
1450
+ ],
1451
+ height: '400px',
1452
+ },
1417
1453
  },
1418
1454
  };