@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.
- package/dist/charts.js +1 -1
- package/dist/charts.js.map +1 -1
- package/dist/charts.modern.module.js +1 -1
- package/dist/charts.modern.module.js.map +1 -1
- package/dist/charts.umd.js +1 -1
- package/dist/charts.umd.js.map +1 -1
- package/dist/components/CarbonChart/CarbonChartArea.stories.d.ts +308 -10
- package/dist/components/CarbonChart/CarbonChartAreaStacked.stories.d.ts +134 -5
- package/dist/components/CarbonChart/CarbonChartBar.stories.d.ts +212 -10
- package/dist/components/CarbonChart/CarbonChartBarFloating.stories.d.ts +80 -4
- package/dist/components/CarbonChart/CarbonChartBarGrouped.stories.d.ts +232 -11
- package/dist/components/CarbonChart/CarbonChartBarStacked.stories.d.ts +264 -12
- package/dist/components/CarbonChart/CarbonChartBoxplot.stories.d.ts +51 -3
- package/dist/components/CarbonChart/CarbonChartBubble.stories.d.ts +194 -7
- package/dist/components/CarbonChart/CarbonChartBullet.stories.d.ts +33 -2
- package/dist/components/CarbonChart/CarbonChartCombo.stories.d.ts +578 -13
- package/dist/components/CarbonChart/CarbonChartDonut.stories.d.ts +118 -6
- package/dist/components/CarbonChart/CarbonChartGauge.stories.d.ts +41 -3
- package/dist/components/CarbonChart/CarbonChartHistogram.stories.d.ts +87 -4
- package/dist/components/CarbonChart/CarbonChartLine.stories.d.ts +575 -18
- package/dist/components/CarbonChart/CarbonChartLollipop.stories.d.ts +53 -3
- package/dist/components/CarbonChart/CarbonChartMeter.stories.d.ts +125 -6
- package/dist/components/CarbonChart/CarbonChartPie.stories.d.ts +99 -6
- package/dist/components/CarbonChart/CarbonChartRadar.stories.d.ts +96 -5
- package/dist/components/CarbonChart/CarbonChartScatter.stories.d.ts +171 -7
- package/dist/components/CarbonChart/CarbonChartSparkline.stories.d.ts +49 -2
- package/dist/components/CarbonChart/CarbonChartStep.stories.d.ts +36 -2
- package/dist/components/LineChart/LineChart.stories.d.ts +132 -21
- package/package.json +3 -3
- package/src/components/CarbonChart/CarbonChartArea.stories.tsx +674 -649
- package/src/components/CarbonChart/CarbonChartAreaStacked.stories.tsx +424 -414
- package/src/components/CarbonChart/CarbonChartBar.stories.tsx +352 -325
- package/src/components/CarbonChart/CarbonChartBarFloating.stories.tsx +127 -116
- package/src/components/CarbonChart/CarbonChartBarGrouped.stories.tsx +872 -843
- package/src/components/CarbonChart/CarbonChartBarStacked.stories.tsx +913 -879
- package/src/components/CarbonChart/CarbonChartBoxplot.stories.tsx +238 -232
- package/src/components/CarbonChart/CarbonChartBubble.stories.tsx +565 -547
- package/src/components/CarbonChart/CarbonChartBullet.stories.tsx +59 -56
- package/src/components/CarbonChart/CarbonChartCombo.stories.tsx +1335 -1299
- package/src/components/CarbonChart/CarbonChartDonut.stories.tsx +170 -153
- package/src/components/CarbonChart/CarbonChartGauge.stories.tsx +50 -44
- package/src/components/CarbonChart/CarbonChartHistogram.stories.tsx +733 -724
- package/src/components/CarbonChart/CarbonChartLine.stories.tsx +1656 -1605
- package/src/components/CarbonChart/CarbonChartLollipop.stories.tsx +81 -76
- package/src/components/CarbonChart/CarbonChartMeter.stories.tsx +177 -162
- package/src/components/CarbonChart/CarbonChartPie.stories.tsx +154 -139
- package/src/components/CarbonChart/CarbonChartRadar.stories.tsx +445 -433
- package/src/components/CarbonChart/CarbonChartScatter.stories.tsx +427 -409
- package/src/components/CarbonChart/CarbonChartSparkline.stories.tsx +191 -188
- package/src/components/CarbonChart/CarbonChartStep.stories.tsx +145 -142
- package/src/components/LineChart/LineChart.stories.tsx +91 -104
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
|
|
3
|
-
import {
|
|
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:
|
|
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 =
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
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 =
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
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 =
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
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 =
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
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 =
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
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 =
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
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
|
};
|