@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.
- package/dist/charts.js +2450 -1
- package/dist/charts.js.map +1 -1
- package/dist/charts.modern.module.js +2428 -1
- package/dist/charts.modern.module.js.map +1 -1
- package/dist/charts.umd.js +48555 -1
- package/dist/charts.umd.js.map +1 -1
- package/dist/components/CarbonChart/CarbonChart.d.ts +42 -41
- package/dist/components/CarbonChart/CarbonChartArea.stories.d.ts +310 -12
- package/dist/components/CarbonChart/CarbonChartAreaStacked.stories.d.ts +136 -7
- package/dist/components/CarbonChart/CarbonChartBar.stories.d.ts +214 -12
- package/dist/components/CarbonChart/CarbonChartBarFloating.stories.d.ts +82 -6
- package/dist/components/CarbonChart/CarbonChartBarGrouped.stories.d.ts +234 -13
- package/dist/components/CarbonChart/CarbonChartBarStacked.stories.d.ts +266 -14
- package/dist/components/CarbonChart/CarbonChartBoxplot.stories.d.ts +53 -5
- package/dist/components/CarbonChart/CarbonChartBubble.stories.d.ts +196 -9
- package/dist/components/CarbonChart/CarbonChartBullet.stories.d.ts +35 -4
- package/dist/components/CarbonChart/CarbonChartCombo.stories.d.ts +580 -15
- package/dist/components/CarbonChart/CarbonChartDonut.stories.d.ts +120 -8
- package/dist/components/CarbonChart/CarbonChartGauge.stories.d.ts +43 -5
- package/dist/components/CarbonChart/CarbonChartHistogram.stories.d.ts +89 -6
- package/dist/components/CarbonChart/CarbonChartLine.stories.d.ts +577 -20
- package/dist/components/CarbonChart/CarbonChartLollipop.stories.d.ts +55 -5
- package/dist/components/CarbonChart/CarbonChartMeter.stories.d.ts +127 -8
- package/dist/components/CarbonChart/CarbonChartPie.stories.d.ts +101 -8
- package/dist/components/CarbonChart/CarbonChartRadar.stories.d.ts +98 -7
- package/dist/components/CarbonChart/CarbonChartScatter.stories.d.ts +173 -9
- package/dist/components/CarbonChart/CarbonChartSparkline.stories.d.ts +51 -4
- package/dist/components/CarbonChart/CarbonChartStep.stories.d.ts +38 -4
- package/dist/components/CarbonChart/index.d.ts +1 -1
- package/dist/components/LineChart/Chart.d.ts +27 -27
- package/dist/components/LineChart/ChartDataTable.d.ts +17 -17
- package/dist/components/LineChart/CustomAxisComponent.d.ts +3 -3
- package/dist/components/LineChart/CustomPointComponent.d.ts +17 -17
- package/dist/components/LineChart/DataTable.d.ts +5 -5
- package/dist/components/LineChart/GraphTooltip.d.ts +3 -3
- package/dist/components/LineChart/LegendButton.d.ts +6 -6
- package/dist/components/LineChart/LineChart.d.ts +67 -67
- package/dist/components/LineChart/LineChart.stories.d.ts +113 -23
- package/dist/components/LineChart/index.d.ts +1 -1
- package/dist/components/LineChart/magma-charts.d.ts +1 -1
- package/dist/index.d.ts +2 -2
- package/package.json +11 -6
- package/src/components/CarbonChart/CarbonChart.tsx +12 -16
- 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/CarbonChart/carbon-charts.css +7303 -0
- package/src/components/LineChart/LineChart.stories.tsx +91 -104
- package/dist/components/CarbonChart/CarbonChart.test.d.ts +0 -1
- package/dist/components/CarbonChart/embeddedStyles.d.ts +0 -1
- package/dist/components/LineChart/ChartDataTable.test.d.ts +0 -1
- package/dist/components/LineChart/LineChart.test.d.ts +0 -1
- package/dist/components/LineChart/test/exampleChartData.d.ts +0 -40
- package/src/components/CarbonChart/embeddedStyles.ts +0 -24880
|
@@ -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,378 +23,405 @@ 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 VerticalSimpleBarDiscrete =
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
group: 'More',
|
|
43
|
-
value: 29123,
|
|
44
|
-
},
|
|
45
|
-
{
|
|
46
|
-
group: 'Sold',
|
|
47
|
-
value: 35213,
|
|
48
|
-
},
|
|
49
|
-
{
|
|
50
|
-
group: 'Restocking',
|
|
51
|
-
value: 51213,
|
|
52
|
-
},
|
|
53
|
-
{
|
|
54
|
-
group: 'Misc',
|
|
55
|
-
value: 16932,
|
|
56
|
-
},
|
|
57
|
-
],
|
|
58
|
-
options: {
|
|
59
|
-
title: 'Vertical simple bar (discrete)',
|
|
60
|
-
axes: {
|
|
61
|
-
left: {
|
|
62
|
-
mapsTo: 'value',
|
|
32
|
+
export const VerticalSimpleBarDiscrete = {
|
|
33
|
+
render: Template,
|
|
34
|
+
|
|
35
|
+
args: {
|
|
36
|
+
isInverse: false,
|
|
37
|
+
type: CarbonChartType.bar,
|
|
38
|
+
dataSet: [
|
|
39
|
+
{
|
|
40
|
+
group: 'Qty',
|
|
41
|
+
value: 65000,
|
|
63
42
|
},
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
43
|
+
{
|
|
44
|
+
group: 'More',
|
|
45
|
+
value: 29123,
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
group: 'Sold',
|
|
49
|
+
value: 35213,
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
group: 'Restocking',
|
|
53
|
+
value: 51213,
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
group: 'Misc',
|
|
57
|
+
value: 16932,
|
|
58
|
+
},
|
|
59
|
+
],
|
|
60
|
+
options: {
|
|
61
|
+
title: 'Vertical simple bar (discrete)',
|
|
62
|
+
axes: {
|
|
63
|
+
left: {
|
|
64
|
+
mapsTo: 'value',
|
|
65
|
+
},
|
|
66
|
+
bottom: {
|
|
67
|
+
mapsTo: 'group',
|
|
68
|
+
scaleType: 'labels',
|
|
69
|
+
},
|
|
70
|
+
},
|
|
71
|
+
height: '400px',
|
|
72
|
+
tooltip: {
|
|
73
|
+
valueFormatter: (value /*, label */) =>
|
|
74
|
+
typeof value === 'number'
|
|
75
|
+
? value.toLocaleString(undefined, {
|
|
76
|
+
minimumFractionDigits: 20,
|
|
77
|
+
maximumFractionDigits: 20,
|
|
78
|
+
})
|
|
79
|
+
: String(value),
|
|
80
|
+
enabled: false,
|
|
67
81
|
},
|
|
68
|
-
},
|
|
69
|
-
height: '400px',
|
|
70
|
-
tooltip: {
|
|
71
|
-
valueFormatter: (value /*, label */) =>
|
|
72
|
-
typeof value === 'number'
|
|
73
|
-
? value.toLocaleString(undefined, {
|
|
74
|
-
minimumFractionDigits: 20,
|
|
75
|
-
maximumFractionDigits: 20,
|
|
76
|
-
})
|
|
77
|
-
: String(value),
|
|
78
|
-
enabled: false,
|
|
79
82
|
},
|
|
80
83
|
},
|
|
81
84
|
};
|
|
82
85
|
|
|
83
|
-
export const VerticalSimpleBarTimeSeries =
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
group: 'More',
|
|
95
|
-
date: new Date(2019, 0, 2),
|
|
96
|
-
value: 65000,
|
|
97
|
-
},
|
|
98
|
-
{
|
|
99
|
-
group: 'Sold',
|
|
100
|
-
date: new Date(2019, 0, 3),
|
|
101
|
-
value: 30000,
|
|
102
|
-
},
|
|
103
|
-
{
|
|
104
|
-
group: 'Restocking',
|
|
105
|
-
date: new Date(2019, 0, 6),
|
|
106
|
-
value: 49213,
|
|
107
|
-
},
|
|
108
|
-
{
|
|
109
|
-
group: 'Misc',
|
|
110
|
-
date: new Date(2019, 0, 7),
|
|
111
|
-
value: 51213,
|
|
112
|
-
},
|
|
113
|
-
],
|
|
114
|
-
options: {
|
|
115
|
-
title: 'Vertical simple bar (time series)',
|
|
116
|
-
axes: {
|
|
117
|
-
left: {
|
|
118
|
-
mapsTo: 'value',
|
|
86
|
+
export const VerticalSimpleBarTimeSeries = {
|
|
87
|
+
render: Template,
|
|
88
|
+
|
|
89
|
+
args: {
|
|
90
|
+
isInverse: false,
|
|
91
|
+
type: CarbonChartType.bar,
|
|
92
|
+
dataSet: [
|
|
93
|
+
{
|
|
94
|
+
group: 'Qty',
|
|
95
|
+
date: new Date(2019, 0, 1),
|
|
96
|
+
value: 10000,
|
|
119
97
|
},
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
98
|
+
{
|
|
99
|
+
group: 'More',
|
|
100
|
+
date: new Date(2019, 0, 2),
|
|
101
|
+
value: 65000,
|
|
123
102
|
},
|
|
103
|
+
{
|
|
104
|
+
group: 'Sold',
|
|
105
|
+
date: new Date(2019, 0, 3),
|
|
106
|
+
value: 30000,
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
group: 'Restocking',
|
|
110
|
+
date: new Date(2019, 0, 6),
|
|
111
|
+
value: 49213,
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
group: 'Misc',
|
|
115
|
+
date: new Date(2019, 0, 7),
|
|
116
|
+
value: 51213,
|
|
117
|
+
},
|
|
118
|
+
],
|
|
119
|
+
options: {
|
|
120
|
+
title: 'Vertical simple bar (time series)',
|
|
121
|
+
axes: {
|
|
122
|
+
left: {
|
|
123
|
+
mapsTo: 'value',
|
|
124
|
+
},
|
|
125
|
+
bottom: {
|
|
126
|
+
mapsTo: 'date',
|
|
127
|
+
scaleType: 'time',
|
|
128
|
+
},
|
|
129
|
+
},
|
|
130
|
+
height: '400px',
|
|
124
131
|
},
|
|
125
|
-
height: '400px',
|
|
126
132
|
},
|
|
127
133
|
};
|
|
128
134
|
|
|
129
|
-
export const VerticalSimpleBarTimeSeriesDenseDataTurkish =
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
group: 'data',
|
|
141
|
-
date: new Date(2019, 1, 1),
|
|
142
|
-
value: 20001,
|
|
143
|
-
},
|
|
144
|
-
{
|
|
145
|
-
group: 'data',
|
|
146
|
-
date: new Date(2019, 1, 1),
|
|
147
|
-
value: 10002,
|
|
148
|
-
},
|
|
149
|
-
{
|
|
150
|
-
group: 'data',
|
|
151
|
-
date: new Date(2019, 1, 1),
|
|
152
|
-
value: 10062,
|
|
153
|
-
},
|
|
154
|
-
{
|
|
155
|
-
group: 'data',
|
|
156
|
-
date: new Date(2019, 1, 1),
|
|
157
|
-
value: 30003,
|
|
158
|
-
},
|
|
159
|
-
{
|
|
160
|
-
group: 'data',
|
|
161
|
-
date: new Date(2019, 1, 1),
|
|
162
|
-
value: 20004,
|
|
163
|
-
},
|
|
164
|
-
{
|
|
165
|
-
group: 'data',
|
|
166
|
-
date: new Date(2019, 1, 1),
|
|
167
|
-
value: 10005,
|
|
168
|
-
},
|
|
169
|
-
{
|
|
170
|
-
group: 'data',
|
|
171
|
-
date: new Date(2019, 1, 1),
|
|
172
|
-
value: 50006,
|
|
173
|
-
},
|
|
174
|
-
{
|
|
175
|
-
group: 'data',
|
|
176
|
-
date: new Date(2019, 1, 1),
|
|
177
|
-
value: 20006,
|
|
178
|
-
},
|
|
179
|
-
{
|
|
180
|
-
group: 'data',
|
|
181
|
-
date: new Date(2019, 1, 1),
|
|
182
|
-
value: 40007,
|
|
183
|
-
},
|
|
184
|
-
{
|
|
185
|
-
group: 'data',
|
|
186
|
-
date: new Date(2019, 1, 1),
|
|
187
|
-
value: 30008,
|
|
188
|
-
},
|
|
189
|
-
{
|
|
190
|
-
group: 'data',
|
|
191
|
-
date: new Date(2019, 1, 1),
|
|
192
|
-
value: 10000,
|
|
193
|
-
},
|
|
194
|
-
{
|
|
195
|
-
group: 'data',
|
|
196
|
-
date: new Date(2019, 1, 1),
|
|
197
|
-
value: 10000,
|
|
198
|
-
},
|
|
199
|
-
{
|
|
200
|
-
group: 'data',
|
|
201
|
-
date: new Date(2019, 1, 1),
|
|
202
|
-
value: 20000,
|
|
203
|
-
},
|
|
204
|
-
{
|
|
205
|
-
group: 'data',
|
|
206
|
-
date: new Date(2019, 1, 1),
|
|
207
|
-
value: 10000,
|
|
208
|
-
},
|
|
209
|
-
{
|
|
210
|
-
group: 'data',
|
|
211
|
-
date: new Date(2019, 1, 1),
|
|
212
|
-
value: 30000,
|
|
213
|
-
},
|
|
214
|
-
{
|
|
215
|
-
group: 'data',
|
|
216
|
-
date: new Date(2019, 1, 1),
|
|
217
|
-
value: 10000,
|
|
218
|
-
},
|
|
219
|
-
],
|
|
220
|
-
options: {
|
|
221
|
-
title: 'Vertical simple bar (time series - dense data, Turkish)',
|
|
222
|
-
axes: {
|
|
223
|
-
left: {
|
|
224
|
-
mapsTo: 'value',
|
|
225
|
-
ticks: {},
|
|
226
|
-
},
|
|
227
|
-
bottom: {
|
|
228
|
-
mapsTo: 'date',
|
|
229
|
-
scaleType: 'time',
|
|
230
|
-
ticks: {},
|
|
135
|
+
export const VerticalSimpleBarTimeSeriesDenseDataTurkish = {
|
|
136
|
+
render: Template,
|
|
137
|
+
|
|
138
|
+
args: {
|
|
139
|
+
isInverse: false,
|
|
140
|
+
type: CarbonChartType.bar,
|
|
141
|
+
dataSet: [
|
|
142
|
+
{
|
|
143
|
+
group: 'data',
|
|
144
|
+
date: new Date(2019, 1, 1),
|
|
145
|
+
value: 10000,
|
|
231
146
|
},
|
|
147
|
+
{
|
|
148
|
+
group: 'data',
|
|
149
|
+
date: new Date(2019, 1, 1),
|
|
150
|
+
value: 20001,
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
group: 'data',
|
|
154
|
+
date: new Date(2019, 1, 1),
|
|
155
|
+
value: 10002,
|
|
156
|
+
},
|
|
157
|
+
{
|
|
158
|
+
group: 'data',
|
|
159
|
+
date: new Date(2019, 1, 1),
|
|
160
|
+
value: 10062,
|
|
161
|
+
},
|
|
162
|
+
{
|
|
163
|
+
group: 'data',
|
|
164
|
+
date: new Date(2019, 1, 1),
|
|
165
|
+
value: 30003,
|
|
166
|
+
},
|
|
167
|
+
{
|
|
168
|
+
group: 'data',
|
|
169
|
+
date: new Date(2019, 1, 1),
|
|
170
|
+
value: 20004,
|
|
171
|
+
},
|
|
172
|
+
{
|
|
173
|
+
group: 'data',
|
|
174
|
+
date: new Date(2019, 1, 1),
|
|
175
|
+
value: 10005,
|
|
176
|
+
},
|
|
177
|
+
{
|
|
178
|
+
group: 'data',
|
|
179
|
+
date: new Date(2019, 1, 1),
|
|
180
|
+
value: 50006,
|
|
181
|
+
},
|
|
182
|
+
{
|
|
183
|
+
group: 'data',
|
|
184
|
+
date: new Date(2019, 1, 1),
|
|
185
|
+
value: 20006,
|
|
186
|
+
},
|
|
187
|
+
{
|
|
188
|
+
group: 'data',
|
|
189
|
+
date: new Date(2019, 1, 1),
|
|
190
|
+
value: 40007,
|
|
191
|
+
},
|
|
192
|
+
{
|
|
193
|
+
group: 'data',
|
|
194
|
+
date: new Date(2019, 1, 1),
|
|
195
|
+
value: 30008,
|
|
196
|
+
},
|
|
197
|
+
{
|
|
198
|
+
group: 'data',
|
|
199
|
+
date: new Date(2019, 1, 1),
|
|
200
|
+
value: 10000,
|
|
201
|
+
},
|
|
202
|
+
{
|
|
203
|
+
group: 'data',
|
|
204
|
+
date: new Date(2019, 1, 1),
|
|
205
|
+
value: 10000,
|
|
206
|
+
},
|
|
207
|
+
{
|
|
208
|
+
group: 'data',
|
|
209
|
+
date: new Date(2019, 1, 1),
|
|
210
|
+
value: 20000,
|
|
211
|
+
},
|
|
212
|
+
{
|
|
213
|
+
group: 'data',
|
|
214
|
+
date: new Date(2019, 1, 1),
|
|
215
|
+
value: 10000,
|
|
216
|
+
},
|
|
217
|
+
{
|
|
218
|
+
group: 'data',
|
|
219
|
+
date: new Date(2019, 1, 1),
|
|
220
|
+
value: 30000,
|
|
221
|
+
},
|
|
222
|
+
{
|
|
223
|
+
group: 'data',
|
|
224
|
+
date: new Date(2019, 1, 1),
|
|
225
|
+
value: 10000,
|
|
226
|
+
},
|
|
227
|
+
],
|
|
228
|
+
options: {
|
|
229
|
+
title: 'Vertical simple bar (time series - dense data, Turkish)',
|
|
230
|
+
axes: {
|
|
231
|
+
left: {
|
|
232
|
+
mapsTo: 'value',
|
|
233
|
+
ticks: {},
|
|
234
|
+
},
|
|
235
|
+
bottom: {
|
|
236
|
+
mapsTo: 'date',
|
|
237
|
+
scaleType: 'time',
|
|
238
|
+
ticks: {},
|
|
239
|
+
},
|
|
240
|
+
},
|
|
241
|
+
tooltip: {},
|
|
242
|
+
bars: {
|
|
243
|
+
maxWidth: 200,
|
|
244
|
+
},
|
|
245
|
+
height: '400px',
|
|
232
246
|
},
|
|
233
|
-
tooltip: {},
|
|
234
|
-
bars: {
|
|
235
|
-
maxWidth: 200,
|
|
236
|
-
},
|
|
237
|
-
height: '400px',
|
|
238
247
|
},
|
|
239
248
|
};
|
|
240
249
|
|
|
241
|
-
export const VerticalSimpleBarEmptyState =
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
250
|
+
export const VerticalSimpleBarEmptyState = {
|
|
251
|
+
render: Template,
|
|
252
|
+
|
|
253
|
+
args: {
|
|
254
|
+
isInverse: false,
|
|
255
|
+
type: CarbonChartType.bar,
|
|
256
|
+
dataSet: [],
|
|
257
|
+
options: {
|
|
258
|
+
title: 'Vertical simple bar (empty state)',
|
|
259
|
+
axes: {
|
|
260
|
+
left: {},
|
|
261
|
+
bottom: {
|
|
262
|
+
scaleType: 'labels',
|
|
263
|
+
},
|
|
252
264
|
},
|
|
265
|
+
height: '400px',
|
|
253
266
|
},
|
|
254
|
-
height: '400px',
|
|
255
267
|
},
|
|
256
268
|
};
|
|
257
269
|
|
|
258
|
-
export const VerticalSimpleBarSkeleton =
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
270
|
+
export const VerticalSimpleBarSkeleton = {
|
|
271
|
+
render: Template,
|
|
272
|
+
|
|
273
|
+
args: {
|
|
274
|
+
isInverse: false,
|
|
275
|
+
type: CarbonChartType.bar,
|
|
276
|
+
dataSet: [],
|
|
277
|
+
options: {
|
|
278
|
+
title: 'Vertical simple bar (skeleton)',
|
|
279
|
+
axes: {
|
|
280
|
+
left: {},
|
|
281
|
+
bottom: {
|
|
282
|
+
scaleType: 'labels',
|
|
283
|
+
},
|
|
269
284
|
},
|
|
285
|
+
data: {
|
|
286
|
+
loading: true,
|
|
287
|
+
},
|
|
288
|
+
height: '400px',
|
|
270
289
|
},
|
|
271
|
-
data: {
|
|
272
|
-
loading: true,
|
|
273
|
-
},
|
|
274
|
-
height: '400px',
|
|
275
290
|
},
|
|
276
291
|
};
|
|
277
292
|
|
|
278
|
-
export const HorizontalSimpleBarTimeSeries =
|
|
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
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
options: {
|
|
310
|
-
title: 'Horizontal simple bar (time series)',
|
|
311
|
-
axes: {
|
|
312
|
-
left: {
|
|
313
|
-
mapsTo: 'date',
|
|
314
|
-
scaleType: 'time',
|
|
293
|
+
export const HorizontalSimpleBarTimeSeries = {
|
|
294
|
+
render: Template,
|
|
295
|
+
|
|
296
|
+
args: {
|
|
297
|
+
isInverse: false,
|
|
298
|
+
type: CarbonChartType.bar,
|
|
299
|
+
dataSet: [
|
|
300
|
+
{
|
|
301
|
+
group: 'Qty',
|
|
302
|
+
date: new Date(2019, 0, 1),
|
|
303
|
+
value: 10000,
|
|
304
|
+
},
|
|
305
|
+
{
|
|
306
|
+
group: 'More',
|
|
307
|
+
date: new Date(2019, 0, 2),
|
|
308
|
+
value: 65000,
|
|
309
|
+
},
|
|
310
|
+
{
|
|
311
|
+
group: 'Sold',
|
|
312
|
+
date: new Date(2019, 0, 3),
|
|
313
|
+
value: 30000,
|
|
314
|
+
},
|
|
315
|
+
{
|
|
316
|
+
group: 'Restocking',
|
|
317
|
+
date: new Date(2019, 0, 6),
|
|
318
|
+
value: 49213,
|
|
319
|
+
},
|
|
320
|
+
{
|
|
321
|
+
group: 'Misc',
|
|
322
|
+
date: new Date(2019, 0, 7),
|
|
323
|
+
value: 51213,
|
|
315
324
|
},
|
|
316
|
-
|
|
317
|
-
|
|
325
|
+
],
|
|
326
|
+
options: {
|
|
327
|
+
title: 'Horizontal simple bar (time series)',
|
|
328
|
+
axes: {
|
|
329
|
+
left: {
|
|
330
|
+
mapsTo: 'date',
|
|
331
|
+
scaleType: 'time',
|
|
332
|
+
},
|
|
333
|
+
bottom: {
|
|
334
|
+
mapsTo: 'value',
|
|
335
|
+
},
|
|
318
336
|
},
|
|
337
|
+
height: '400px',
|
|
319
338
|
},
|
|
320
|
-
height: '400px',
|
|
321
339
|
},
|
|
322
340
|
};
|
|
323
341
|
|
|
324
|
-
export const HorizontalSimpleBarDiscrete =
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
group: 'Restocking',
|
|
343
|
-
value: 51213,
|
|
344
|
-
},
|
|
345
|
-
{
|
|
346
|
-
group: 'Misc',
|
|
347
|
-
value: 16932,
|
|
348
|
-
},
|
|
349
|
-
],
|
|
350
|
-
options: {
|
|
351
|
-
title: 'Horizontal simple bar (discrete)',
|
|
352
|
-
axes: {
|
|
353
|
-
left: {
|
|
354
|
-
mapsTo: 'group',
|
|
355
|
-
scaleType: 'labels',
|
|
342
|
+
export const HorizontalSimpleBarDiscrete = {
|
|
343
|
+
render: Template,
|
|
344
|
+
|
|
345
|
+
args: {
|
|
346
|
+
isInverse: false,
|
|
347
|
+
type: CarbonChartType.bar,
|
|
348
|
+
dataSet: [
|
|
349
|
+
{
|
|
350
|
+
group: 'Qty',
|
|
351
|
+
value: 65000,
|
|
352
|
+
},
|
|
353
|
+
{
|
|
354
|
+
group: 'More',
|
|
355
|
+
value: 29123,
|
|
356
|
+
},
|
|
357
|
+
{
|
|
358
|
+
group: 'Sold',
|
|
359
|
+
value: 35213,
|
|
356
360
|
},
|
|
357
|
-
|
|
358
|
-
|
|
361
|
+
{
|
|
362
|
+
group: 'Restocking',
|
|
363
|
+
value: 51213,
|
|
359
364
|
},
|
|
365
|
+
{
|
|
366
|
+
group: 'Misc',
|
|
367
|
+
value: 16932,
|
|
368
|
+
},
|
|
369
|
+
],
|
|
370
|
+
options: {
|
|
371
|
+
title: 'Horizontal simple bar (discrete)',
|
|
372
|
+
axes: {
|
|
373
|
+
left: {
|
|
374
|
+
mapsTo: 'group',
|
|
375
|
+
scaleType: 'labels',
|
|
376
|
+
},
|
|
377
|
+
bottom: {
|
|
378
|
+
mapsTo: 'value',
|
|
379
|
+
},
|
|
380
|
+
},
|
|
381
|
+
height: '400px',
|
|
360
382
|
},
|
|
361
|
-
height: '400px',
|
|
362
383
|
},
|
|
363
384
|
};
|
|
364
385
|
|
|
365
|
-
export const HorizontalSimpleBarSkeleton =
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
386
|
+
export const HorizontalSimpleBarSkeleton = {
|
|
387
|
+
render: Template,
|
|
388
|
+
|
|
389
|
+
args: {
|
|
390
|
+
isInverse: false,
|
|
391
|
+
type: CarbonChartType.bar,
|
|
392
|
+
dataSet: [],
|
|
393
|
+
options: {
|
|
394
|
+
title: 'Horizontal simple bar (skeleton)',
|
|
395
|
+
axes: {
|
|
396
|
+
left: {
|
|
397
|
+
scaleType: 'labels',
|
|
398
|
+
},
|
|
399
|
+
bottom: {},
|
|
400
|
+
},
|
|
401
|
+
data: {
|
|
402
|
+
loading: true,
|
|
403
|
+
},
|
|
404
|
+
height: '400px',
|
|
380
405
|
},
|
|
381
|
-
height: '400px',
|
|
382
406
|
},
|
|
383
407
|
};
|
|
384
408
|
|
|
385
|
-
export const HorizontalSimpleBarEmptyState =
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
409
|
+
export const HorizontalSimpleBarEmptyState = {
|
|
410
|
+
render: Template,
|
|
411
|
+
|
|
412
|
+
args: {
|
|
413
|
+
isInverse: false,
|
|
414
|
+
type: CarbonChartType.bar,
|
|
415
|
+
dataSet: [],
|
|
416
|
+
options: {
|
|
417
|
+
title: 'Horizontal simple bar (empty state)',
|
|
418
|
+
axes: {
|
|
419
|
+
left: {
|
|
420
|
+
scaleType: 'labels',
|
|
421
|
+
},
|
|
422
|
+
bottom: {},
|
|
423
|
+
},
|
|
424
|
+
height: '400px',
|
|
397
425
|
},
|
|
398
|
-
height: '400px',
|
|
399
426
|
},
|
|
400
427
|
};
|