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

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 (51) hide show
  1. package/dist/charts.js +1 -1
  2. package/dist/charts.js.map +1 -1
  3. package/dist/charts.modern.module.js +1 -1
  4. package/dist/charts.modern.module.js.map +1 -1
  5. package/dist/charts.umd.js +1 -1
  6. package/dist/charts.umd.js.map +1 -1
  7. package/dist/components/CarbonChart/CarbonChartArea.stories.d.ts +308 -10
  8. package/dist/components/CarbonChart/CarbonChartAreaStacked.stories.d.ts +134 -5
  9. package/dist/components/CarbonChart/CarbonChartBar.stories.d.ts +212 -10
  10. package/dist/components/CarbonChart/CarbonChartBarFloating.stories.d.ts +80 -4
  11. package/dist/components/CarbonChart/CarbonChartBarGrouped.stories.d.ts +232 -11
  12. package/dist/components/CarbonChart/CarbonChartBarStacked.stories.d.ts +264 -12
  13. package/dist/components/CarbonChart/CarbonChartBoxplot.stories.d.ts +51 -3
  14. package/dist/components/CarbonChart/CarbonChartBubble.stories.d.ts +194 -7
  15. package/dist/components/CarbonChart/CarbonChartBullet.stories.d.ts +33 -2
  16. package/dist/components/CarbonChart/CarbonChartCombo.stories.d.ts +578 -13
  17. package/dist/components/CarbonChart/CarbonChartDonut.stories.d.ts +118 -6
  18. package/dist/components/CarbonChart/CarbonChartGauge.stories.d.ts +41 -3
  19. package/dist/components/CarbonChart/CarbonChartHistogram.stories.d.ts +87 -4
  20. package/dist/components/CarbonChart/CarbonChartLine.stories.d.ts +575 -18
  21. package/dist/components/CarbonChart/CarbonChartLollipop.stories.d.ts +53 -3
  22. package/dist/components/CarbonChart/CarbonChartMeter.stories.d.ts +125 -6
  23. package/dist/components/CarbonChart/CarbonChartPie.stories.d.ts +99 -6
  24. package/dist/components/CarbonChart/CarbonChartRadar.stories.d.ts +96 -5
  25. package/dist/components/CarbonChart/CarbonChartScatter.stories.d.ts +171 -7
  26. package/dist/components/CarbonChart/CarbonChartSparkline.stories.d.ts +49 -2
  27. package/dist/components/CarbonChart/CarbonChartStep.stories.d.ts +36 -2
  28. package/dist/components/LineChart/LineChart.stories.d.ts +132 -21
  29. package/package.json +3 -3
  30. package/src/components/CarbonChart/CarbonChartArea.stories.tsx +674 -649
  31. package/src/components/CarbonChart/CarbonChartAreaStacked.stories.tsx +424 -414
  32. package/src/components/CarbonChart/CarbonChartBar.stories.tsx +352 -325
  33. package/src/components/CarbonChart/CarbonChartBarFloating.stories.tsx +127 -116
  34. package/src/components/CarbonChart/CarbonChartBarGrouped.stories.tsx +872 -843
  35. package/src/components/CarbonChart/CarbonChartBarStacked.stories.tsx +913 -879
  36. package/src/components/CarbonChart/CarbonChartBoxplot.stories.tsx +238 -232
  37. package/src/components/CarbonChart/CarbonChartBubble.stories.tsx +565 -547
  38. package/src/components/CarbonChart/CarbonChartBullet.stories.tsx +59 -56
  39. package/src/components/CarbonChart/CarbonChartCombo.stories.tsx +1335 -1299
  40. package/src/components/CarbonChart/CarbonChartDonut.stories.tsx +170 -153
  41. package/src/components/CarbonChart/CarbonChartGauge.stories.tsx +50 -44
  42. package/src/components/CarbonChart/CarbonChartHistogram.stories.tsx +733 -724
  43. package/src/components/CarbonChart/CarbonChartLine.stories.tsx +1656 -1605
  44. package/src/components/CarbonChart/CarbonChartLollipop.stories.tsx +81 -76
  45. package/src/components/CarbonChart/CarbonChartMeter.stories.tsx +177 -162
  46. package/src/components/CarbonChart/CarbonChartPie.stories.tsx +154 -139
  47. package/src/components/CarbonChart/CarbonChartRadar.stories.tsx +445 -433
  48. package/src/components/CarbonChart/CarbonChartScatter.stories.tsx +427 -409
  49. package/src/components/CarbonChart/CarbonChartSparkline.stories.tsx +191 -188
  50. package/src/components/CarbonChart/CarbonChartStep.stories.tsx +145 -142
  51. package/src/components/LineChart/LineChart.stories.tsx +91 -104
@@ -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,445 +23,463 @@ 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 ScatterLinearXAndY = Template.bind({});
33
- ScatterLinearXAndY.args = {
34
- isInverse: false,
35
- type: CarbonChartType.scatter,
36
- dataSet: [
37
- {
38
- group: 'Dataset 1',
39
- employees: 5000,
40
- sales: 32100,
41
- },
42
- {
43
- group: 'Dataset 1',
44
- employees: 3000,
45
- sales: 25100,
46
- },
47
- {
48
- group: 'Dataset 1',
49
- employees: 8000,
50
- sales: 12100,
51
- },
52
- {
53
- group: 'Dataset 1',
54
- employees: 4000,
55
- sales: 53100,
56
- },
57
- {
58
- group: 'Dataset 2',
59
- employees: 5000,
60
- sales: 32100,
61
- },
62
- {
63
- group: 'Dataset 2',
64
- employees: 2000,
65
- sales: 34100,
66
- },
67
- {
68
- group: 'Dataset 2',
69
- employees: 4000,
70
- sales: 23100,
71
- },
72
- {
73
- group: 'Dataset 2',
74
- employees: 7000,
75
- sales: 14100,
76
- },
77
- {
78
- group: 'Dataset 2',
79
- employees: 6000,
80
- sales: 53100,
81
- },
82
- ],
83
- options: {
84
- title: 'Scatter (linear x & y)',
85
- axes: {
86
- bottom: {
87
- title: 'No. of employees',
88
- mapsTo: 'employees',
89
- scaleType: 'linear',
90
- },
91
- left: {
92
- title: 'Annual sales',
93
- mapsTo: 'sales',
94
- scaleType: 'linear',
32
+ export const ScatterLinearXAndY = {
33
+ render: Template,
34
+
35
+ args: {
36
+ isInverse: false,
37
+ type: CarbonChartType.scatter,
38
+ dataSet: [
39
+ {
40
+ group: 'Dataset 1',
41
+ employees: 5000,
42
+ sales: 32100,
43
+ },
44
+ {
45
+ group: 'Dataset 1',
46
+ employees: 3000,
47
+ sales: 25100,
48
+ },
49
+ {
50
+ group: 'Dataset 1',
51
+ employees: 8000,
52
+ sales: 12100,
53
+ },
54
+ {
55
+ group: 'Dataset 1',
56
+ employees: 4000,
57
+ sales: 53100,
58
+ },
59
+ {
60
+ group: 'Dataset 2',
61
+ employees: 5000,
62
+ sales: 32100,
63
+ },
64
+ {
65
+ group: 'Dataset 2',
66
+ employees: 2000,
67
+ sales: 34100,
68
+ },
69
+ {
70
+ group: 'Dataset 2',
71
+ employees: 4000,
72
+ sales: 23100,
95
73
  },
74
+ {
75
+ group: 'Dataset 2',
76
+ employees: 7000,
77
+ sales: 14100,
78
+ },
79
+ {
80
+ group: 'Dataset 2',
81
+ employees: 6000,
82
+ sales: 53100,
83
+ },
84
+ ],
85
+ options: {
86
+ title: 'Scatter (linear x & y)',
87
+ axes: {
88
+ bottom: {
89
+ title: 'No. of employees',
90
+ mapsTo: 'employees',
91
+ scaleType: 'linear',
92
+ },
93
+ left: {
94
+ title: 'Annual sales',
95
+ mapsTo: 'sales',
96
+ scaleType: 'linear',
97
+ },
98
+ },
99
+ height: '400px',
96
100
  },
97
- height: '400px',
98
101
  },
99
102
  };
100
103
 
101
- export const ScatterTimeSeries = Template.bind({});
102
- ScatterTimeSeries.args = {
103
- isInverse: false,
104
- type: CarbonChartType.scatter,
105
- dataSet: [
106
- {
107
- group: 'Dataset 1',
108
- date: '2023-01-01',
109
- value: 50000,
110
- },
111
- {
112
- group: 'Dataset 1',
113
- date: '2023-01-05',
114
- value: 65000,
115
- },
116
- {
117
- group: 'Dataset 1',
118
- date: '2023-01-08',
119
- value: null,
120
- },
121
- {
122
- group: 'Dataset 1',
123
- date: '2023-01-13',
124
- value: 49213,
125
- },
126
- {
127
- group: 'Dataset 1',
128
- date: '2023-01-17',
129
- value: 51213,
130
- },
131
- {
132
- group: 'Dataset 2',
133
- date: '2023-01-02',
134
- value: 0,
135
- },
136
- {
137
- group: 'Dataset 2',
138
- date: '2023-01-06',
139
- value: 57312,
140
- },
141
- {
142
- group: 'Dataset 2',
143
- date: '2023-01-08',
144
- value: 27432,
145
- },
146
- {
147
- group: 'Dataset 2',
148
- date: '2023-01-15',
149
- value: 70323,
150
- },
151
- {
152
- group: 'Dataset 2',
153
- date: '2023-01-19',
154
- value: 21300,
155
- },
156
- {
157
- group: 'Dataset 3',
158
- date: '2023-01-01',
159
- value: 40000,
160
- },
161
- {
162
- group: 'Dataset 3',
163
- date: '2023-01-05',
164
- value: null,
165
- },
166
- {
167
- group: 'Dataset 3',
168
- date: '2023-01-08',
169
- value: 18000,
170
- },
171
- {
172
- group: 'Dataset 3',
173
- date: '2023-01-13',
174
- value: 39213,
175
- },
176
- {
177
- group: 'Dataset 3',
178
- date: '2023-01-17',
179
- value: 61213,
180
- },
181
- {
182
- group: 'Dataset 4',
183
- date: '2023-01-02',
184
- value: 20000,
185
- },
186
- {
187
- group: 'Dataset 4',
188
- date: '2023-01-06',
189
- value: 37312,
190
- },
191
- {
192
- group: 'Dataset 4',
193
- date: '2023-01-08',
194
- value: 51432,
195
- },
196
- {
197
- group: 'Dataset 4',
198
- date: '2023-01-15',
199
- value: 25332,
200
- },
201
- {
202
- group: 'Dataset 4',
203
- date: '2023-01-19',
204
- value: null,
205
- },
206
- ],
207
- options: {
208
- title: 'Scatter (time series)',
209
- axes: {
210
- bottom: {
211
- title: '2019 Annual Sales Figures',
212
- scaleType: 'time',
213
- mapsTo: 'date',
214
- },
215
- left: {
216
- mapsTo: 'value',
104
+ export const ScatterTimeSeries = {
105
+ render: Template,
106
+
107
+ args: {
108
+ isInverse: false,
109
+ type: CarbonChartType.scatter,
110
+ dataSet: [
111
+ {
112
+ group: 'Dataset 1',
113
+ date: '2023-01-01',
114
+ value: 50000,
115
+ },
116
+ {
117
+ group: 'Dataset 1',
118
+ date: '2023-01-05',
119
+ value: 65000,
120
+ },
121
+ {
122
+ group: 'Dataset 1',
123
+ date: '2023-01-08',
124
+ value: null,
125
+ },
126
+ {
127
+ group: 'Dataset 1',
128
+ date: '2023-01-13',
129
+ value: 49213,
130
+ },
131
+ {
132
+ group: 'Dataset 1',
133
+ date: '2023-01-17',
134
+ value: 51213,
135
+ },
136
+ {
137
+ group: 'Dataset 2',
138
+ date: '2023-01-02',
139
+ value: 0,
140
+ },
141
+ {
142
+ group: 'Dataset 2',
143
+ date: '2023-01-06',
144
+ value: 57312,
145
+ },
146
+ {
147
+ group: 'Dataset 2',
148
+ date: '2023-01-08',
149
+ value: 27432,
150
+ },
151
+ {
152
+ group: 'Dataset 2',
153
+ date: '2023-01-15',
154
+ value: 70323,
217
155
  },
156
+ {
157
+ group: 'Dataset 2',
158
+ date: '2023-01-19',
159
+ value: 21300,
160
+ },
161
+ {
162
+ group: 'Dataset 3',
163
+ date: '2023-01-01',
164
+ value: 40000,
165
+ },
166
+ {
167
+ group: 'Dataset 3',
168
+ date: '2023-01-05',
169
+ value: null,
170
+ },
171
+ {
172
+ group: 'Dataset 3',
173
+ date: '2023-01-08',
174
+ value: 18000,
175
+ },
176
+ {
177
+ group: 'Dataset 3',
178
+ date: '2023-01-13',
179
+ value: 39213,
180
+ },
181
+ {
182
+ group: 'Dataset 3',
183
+ date: '2023-01-17',
184
+ value: 61213,
185
+ },
186
+ {
187
+ group: 'Dataset 4',
188
+ date: '2023-01-02',
189
+ value: 20000,
190
+ },
191
+ {
192
+ group: 'Dataset 4',
193
+ date: '2023-01-06',
194
+ value: 37312,
195
+ },
196
+ {
197
+ group: 'Dataset 4',
198
+ date: '2023-01-08',
199
+ value: 51432,
200
+ },
201
+ {
202
+ group: 'Dataset 4',
203
+ date: '2023-01-15',
204
+ value: 25332,
205
+ },
206
+ {
207
+ group: 'Dataset 4',
208
+ date: '2023-01-19',
209
+ value: null,
210
+ },
211
+ ],
212
+ options: {
213
+ title: 'Scatter (time series)',
214
+ axes: {
215
+ bottom: {
216
+ title: '2019 Annual Sales Figures',
217
+ scaleType: 'time',
218
+ mapsTo: 'date',
219
+ },
220
+ left: {
221
+ mapsTo: 'value',
222
+ },
223
+ },
224
+ height: '400px',
218
225
  },
219
- height: '400px',
220
226
  },
221
227
  };
222
228
 
223
- export const ScatterDiscrete = Template.bind({});
224
- ScatterDiscrete.args = {
225
- isInverse: false,
226
- type: CarbonChartType.scatter,
227
- dataSet: [
228
- {
229
- group: 'Dataset 1',
230
- key: 'Qty',
231
- value: 34200,
232
- },
233
- {
234
- group: 'Dataset 1',
235
- key: 'More',
236
- value: 23500,
237
- },
238
- {
239
- group: 'Dataset 1',
240
- key: 'Sold',
241
- value: 53100,
242
- },
243
- {
244
- group: 'Dataset 1',
245
- key: 'Restocking',
246
- value: 42300,
247
- },
248
- {
249
- group: 'Dataset 1',
250
- key: 'Misc',
251
- value: 12300,
252
- },
253
- {
254
- group: 'Dataset 2',
255
- key: 'Qty',
256
- value: 34200,
257
- },
258
- {
259
- group: 'Dataset 2',
260
- key: 'More',
261
- value: 53200,
262
- },
263
- {
264
- group: 'Dataset 2',
265
- key: 'Sold',
266
- value: 42300,
267
- },
268
- {
269
- group: 'Dataset 2',
270
- key: 'Restocking',
271
- value: 21400,
272
- },
273
- {
274
- group: 'Dataset 2',
275
- key: 'Misc',
276
- value: 0,
277
- },
278
- {
279
- group: 'Dataset 3',
280
- key: 'Qty',
281
- value: 41200,
282
- },
283
- {
284
- group: 'Dataset 3',
285
- key: 'More',
286
- value: 18400,
287
- },
288
- {
289
- group: 'Dataset 3',
290
- key: 'Sold',
291
- value: 34210,
292
- },
293
- {
294
- group: 'Dataset 3',
295
- key: 'Restocking',
296
- value: 1400,
297
- },
298
- {
299
- group: 'Dataset 3',
300
- key: 'Misc',
301
- value: 42100,
302
- },
303
- {
304
- group: 'Dataset 4',
305
- key: 'Qty',
306
- value: 22000,
307
- },
308
- {
309
- group: 'Dataset 4',
310
- key: 'More',
311
- value: 1200,
312
- },
313
- {
314
- group: 'Dataset 4',
315
- key: 'Sold',
316
- value: 9000,
317
- },
318
- {
319
- group: 'Dataset 4',
320
- key: 'Restocking',
321
- value: 24000,
322
- },
323
- {
324
- group: 'Dataset 4',
325
- key: 'Misc',
326
- value: 3000,
327
- },
328
- ],
329
- options: {
330
- title: 'Scatter (discrete)',
331
- axes: {
332
- bottom: {
333
- title: '2019 Annual Sales Figures',
334
- scaleType: 'labels',
335
- mapsTo: 'key',
336
- },
337
- left: {
338
- mapsTo: 'value',
229
+ export const ScatterDiscrete = {
230
+ render: Template,
231
+
232
+ args: {
233
+ isInverse: false,
234
+ type: CarbonChartType.scatter,
235
+ dataSet: [
236
+ {
237
+ group: 'Dataset 1',
238
+ key: 'Qty',
239
+ value: 34200,
240
+ },
241
+ {
242
+ group: 'Dataset 1',
243
+ key: 'More',
244
+ value: 23500,
245
+ },
246
+ {
247
+ group: 'Dataset 1',
248
+ key: 'Sold',
249
+ value: 53100,
250
+ },
251
+ {
252
+ group: 'Dataset 1',
253
+ key: 'Restocking',
254
+ value: 42300,
255
+ },
256
+ {
257
+ group: 'Dataset 1',
258
+ key: 'Misc',
259
+ value: 12300,
260
+ },
261
+ {
262
+ group: 'Dataset 2',
263
+ key: 'Qty',
264
+ value: 34200,
265
+ },
266
+ {
267
+ group: 'Dataset 2',
268
+ key: 'More',
269
+ value: 53200,
270
+ },
271
+ {
272
+ group: 'Dataset 2',
273
+ key: 'Sold',
274
+ value: 42300,
275
+ },
276
+ {
277
+ group: 'Dataset 2',
278
+ key: 'Restocking',
279
+ value: 21400,
280
+ },
281
+ {
282
+ group: 'Dataset 2',
283
+ key: 'Misc',
284
+ value: 0,
285
+ },
286
+ {
287
+ group: 'Dataset 3',
288
+ key: 'Qty',
289
+ value: 41200,
290
+ },
291
+ {
292
+ group: 'Dataset 3',
293
+ key: 'More',
294
+ value: 18400,
295
+ },
296
+ {
297
+ group: 'Dataset 3',
298
+ key: 'Sold',
299
+ value: 34210,
300
+ },
301
+ {
302
+ group: 'Dataset 3',
303
+ key: 'Restocking',
304
+ value: 1400,
305
+ },
306
+ {
307
+ group: 'Dataset 3',
308
+ key: 'Misc',
309
+ value: 42100,
339
310
  },
311
+ {
312
+ group: 'Dataset 4',
313
+ key: 'Qty',
314
+ value: 22000,
315
+ },
316
+ {
317
+ group: 'Dataset 4',
318
+ key: 'More',
319
+ value: 1200,
320
+ },
321
+ {
322
+ group: 'Dataset 4',
323
+ key: 'Sold',
324
+ value: 9000,
325
+ },
326
+ {
327
+ group: 'Dataset 4',
328
+ key: 'Restocking',
329
+ value: 24000,
330
+ },
331
+ {
332
+ group: 'Dataset 4',
333
+ key: 'Misc',
334
+ value: 3000,
335
+ },
336
+ ],
337
+ options: {
338
+ title: 'Scatter (discrete)',
339
+ axes: {
340
+ bottom: {
341
+ title: '2019 Annual Sales Figures',
342
+ scaleType: 'labels',
343
+ mapsTo: 'key',
344
+ },
345
+ left: {
346
+ mapsTo: 'value',
347
+ },
348
+ },
349
+ height: '400px',
340
350
  },
341
- height: '400px',
342
351
  },
343
352
  };
344
353
 
345
- export const ScatterDualAxes = Template.bind({});
346
- ScatterDualAxes.args = {
347
- isInverse: false,
348
- type: CarbonChartType.scatter,
349
- dataSet: [
350
- {
351
- group: 'Orders',
352
- date: 'January',
353
- orderCount: 121,
354
- },
355
- {
356
- group: 'Orders',
357
- date: 'February',
358
- orderCount: 321,
359
- },
360
- {
361
- group: 'Orders',
362
- date: 'March',
363
- orderCount: 370,
364
- },
365
- {
366
- group: 'Orders',
367
- date: 'April',
368
- orderCount: 329,
369
- },
370
- {
371
- group: 'Orders',
372
- date: 'May',
373
- orderCount: 121,
374
- },
375
- {
376
- group: 'Products',
377
- date: 'January',
378
- productCount: 26100,
379
- },
380
- {
381
- group: 'Products',
382
- date: 'February',
383
- productCount: 25100,
384
- },
385
- {
386
- group: 'Products',
387
- date: 'March',
388
- productCount: 28100,
389
- },
390
- {
391
- group: 'Products',
392
- date: 'April',
393
- productCount: 15900,
394
- },
395
- {
396
- group: 'Products',
397
- date: 'May',
398
- productCount: 34100,
399
- },
400
- ],
401
- options: {
402
- title: 'Scatter (dual axes)',
403
- axes: {
404
- bottom: {
405
- mapsTo: 'date',
406
- scaleType: 'labels',
407
- },
408
- left: {
409
- title: 'order count',
410
- mapsTo: 'orderCount',
411
- scaleType: 'linear',
412
- },
413
- right: {
414
- title: 'product count',
415
- mapsTo: 'productCount',
416
- scaleType: 'linear',
417
- correspondingDatasets: ['Products'],
354
+ export const ScatterDualAxes = {
355
+ render: Template,
356
+
357
+ args: {
358
+ isInverse: false,
359
+ type: CarbonChartType.scatter,
360
+ dataSet: [
361
+ {
362
+ group: 'Orders',
363
+ date: 'January',
364
+ orderCount: 121,
365
+ },
366
+ {
367
+ group: 'Orders',
368
+ date: 'February',
369
+ orderCount: 321,
370
+ },
371
+ {
372
+ group: 'Orders',
373
+ date: 'March',
374
+ orderCount: 370,
375
+ },
376
+ {
377
+ group: 'Orders',
378
+ date: 'April',
379
+ orderCount: 329,
380
+ },
381
+ {
382
+ group: 'Orders',
383
+ date: 'May',
384
+ orderCount: 121,
385
+ },
386
+ {
387
+ group: 'Products',
388
+ date: 'January',
389
+ productCount: 26100,
390
+ },
391
+ {
392
+ group: 'Products',
393
+ date: 'February',
394
+ productCount: 25100,
395
+ },
396
+ {
397
+ group: 'Products',
398
+ date: 'March',
399
+ productCount: 28100,
418
400
  },
401
+ {
402
+ group: 'Products',
403
+ date: 'April',
404
+ productCount: 15900,
405
+ },
406
+ {
407
+ group: 'Products',
408
+ date: 'May',
409
+ productCount: 34100,
410
+ },
411
+ ],
412
+ options: {
413
+ title: 'Scatter (dual axes)',
414
+ axes: {
415
+ bottom: {
416
+ mapsTo: 'date',
417
+ scaleType: 'labels',
418
+ },
419
+ left: {
420
+ title: 'order count',
421
+ mapsTo: 'orderCount',
422
+ scaleType: 'linear',
423
+ },
424
+ right: {
425
+ title: 'product count',
426
+ mapsTo: 'productCount',
427
+ scaleType: 'linear',
428
+ correspondingDatasets: ['Products'],
429
+ },
430
+ },
431
+ height: '400px',
419
432
  },
420
- height: '400px',
421
433
  },
422
434
  };
423
435
 
424
- export const ScatterEmptyState = Template.bind({});
425
- ScatterEmptyState.args = {
426
- isInverse: false,
427
- type: CarbonChartType.scatter,
428
- dataSet: [],
429
- options: {
430
- title: 'Scatter (empty state)',
431
- axes: {
432
- bottom: {
433
- title: '2019 Annual Sales Figures',
434
- scaleType: 'time',
435
- mapsTo: 'date',
436
- },
437
- left: {
438
- mapsTo: 'value',
436
+ export const ScatterEmptyState = {
437
+ render: Template,
438
+
439
+ args: {
440
+ isInverse: false,
441
+ type: CarbonChartType.scatter,
442
+ dataSet: [],
443
+ options: {
444
+ title: 'Scatter (empty state)',
445
+ axes: {
446
+ bottom: {
447
+ title: '2019 Annual Sales Figures',
448
+ scaleType: 'time',
449
+ mapsTo: 'date',
450
+ },
451
+ left: {
452
+ mapsTo: 'value',
453
+ },
439
454
  },
455
+ height: '400px',
440
456
  },
441
- height: '400px',
442
457
  },
443
458
  };
444
459
 
445
- export const ScatterSkeleton = Template.bind({});
446
- ScatterSkeleton.args = {
447
- isInverse: false,
448
- type: CarbonChartType.scatter,
449
- dataSet: [],
450
- options: {
451
- title: 'Scatter (skeleton)',
452
- axes: {
453
- bottom: {
454
- title: '2019 Annual Sales Figures',
455
- scaleType: 'time',
456
- mapsTo: 'date',
457
- },
458
- left: {
459
- mapsTo: 'value',
460
+ export const ScatterSkeleton = {
461
+ render: Template,
462
+
463
+ args: {
464
+ isInverse: false,
465
+ type: CarbonChartType.scatter,
466
+ dataSet: [],
467
+ options: {
468
+ title: 'Scatter (skeleton)',
469
+ axes: {
470
+ bottom: {
471
+ title: '2019 Annual Sales Figures',
472
+ scaleType: 'time',
473
+ mapsTo: 'date',
474
+ },
475
+ left: {
476
+ mapsTo: 'value',
477
+ },
460
478
  },
479
+ data: {
480
+ loading: true,
481
+ },
482
+ height: '400px',
461
483
  },
462
- data: {
463
- loading: true,
464
- },
465
- height: '400px',
466
484
  },
467
485
  };