@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,167 +23,182 @@ 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 Pie =
|
|
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
|
-
|
|
32
|
+
export const Pie = {
|
|
33
|
+
render: Template,
|
|
34
|
+
|
|
35
|
+
args: {
|
|
36
|
+
isInverse: false,
|
|
37
|
+
type: CarbonChartType.pie,
|
|
38
|
+
dataSet: [
|
|
39
|
+
{
|
|
40
|
+
group: '2V2N 9KYPM version 1',
|
|
41
|
+
value: 20000,
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
group: 'L22I P66EP L22I P66EP L22I P66EP',
|
|
45
|
+
value: 65000,
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
group: 'JQAI 2M4L1',
|
|
49
|
+
value: 75000,
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
group: 'J9DZ F37AP',
|
|
53
|
+
value: 1200,
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
group: 'YEL48 Q6XK YEL48',
|
|
57
|
+
value: 10000,
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
group: 'Misc',
|
|
61
|
+
value: 25000,
|
|
62
|
+
},
|
|
63
|
+
],
|
|
64
|
+
options: {
|
|
65
|
+
title: 'Pie',
|
|
66
|
+
resizable: true,
|
|
67
|
+
height: '400px',
|
|
68
|
+
legend: {
|
|
69
|
+
truncation: {
|
|
70
|
+
type: 'none',
|
|
71
|
+
},
|
|
69
72
|
},
|
|
70
73
|
},
|
|
71
74
|
},
|
|
72
75
|
};
|
|
73
76
|
|
|
74
|
-
export const PieCentered =
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
77
|
+
export const PieCentered = {
|
|
78
|
+
render: Template,
|
|
79
|
+
|
|
80
|
+
args: {
|
|
81
|
+
isInverse: false,
|
|
82
|
+
type: CarbonChartType.pie,
|
|
83
|
+
dataSet: [
|
|
84
|
+
{
|
|
85
|
+
group: '2V2N 9KYPM version 1',
|
|
86
|
+
value: 20000,
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
group: 'L22I P66EP L22I P66EP L22I P66EP',
|
|
90
|
+
value: 65000,
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
group: 'JQAI 2M4L1',
|
|
94
|
+
value: 75000,
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
group: 'J9DZ F37AP',
|
|
98
|
+
value: 1200,
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
group: 'YEL48 Q6XK YEL48',
|
|
102
|
+
value: 10000,
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
group: 'Misc',
|
|
106
|
+
value: 25000,
|
|
107
|
+
},
|
|
108
|
+
],
|
|
109
|
+
options: {
|
|
110
|
+
title: 'Pie (centered)',
|
|
111
|
+
resizable: true,
|
|
112
|
+
pie: {
|
|
113
|
+
alignment: 'center',
|
|
114
|
+
},
|
|
115
|
+
height: '400px',
|
|
116
|
+
legend: {
|
|
117
|
+
truncation: {
|
|
118
|
+
type: 'none',
|
|
119
|
+
},
|
|
114
120
|
},
|
|
115
121
|
},
|
|
116
122
|
},
|
|
117
123
|
};
|
|
118
124
|
|
|
119
|
-
export const PieValueMapsToCount =
|
|
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
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
125
|
+
export const PieValueMapsToCount = {
|
|
126
|
+
render: Template,
|
|
127
|
+
|
|
128
|
+
args: {
|
|
129
|
+
isInverse: false,
|
|
130
|
+
type: CarbonChartType.pie,
|
|
131
|
+
dataSet: [
|
|
132
|
+
{
|
|
133
|
+
group: '2V2N 9KYPM version 1',
|
|
134
|
+
count: 28000,
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
group: 'L22I P66EP L22I P66EP L22I P66EP',
|
|
138
|
+
count: 65000,
|
|
139
|
+
},
|
|
140
|
+
{
|
|
141
|
+
group: 'JQAI 2M4L1',
|
|
142
|
+
count: 75000,
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
group: 'J9DZ F37AP',
|
|
146
|
+
count: 3200,
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
group: 'YEL48 Q6XK YEL48',
|
|
150
|
+
count: 15000,
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
group: 'Misc',
|
|
154
|
+
count: 25000,
|
|
155
|
+
},
|
|
156
|
+
],
|
|
157
|
+
options: {
|
|
158
|
+
title: 'Pie (value maps to count)',
|
|
159
|
+
resizable: true,
|
|
160
|
+
pie: {
|
|
161
|
+
valueMapsTo: 'count',
|
|
162
|
+
},
|
|
163
|
+
height: '400px',
|
|
164
|
+
legend: {
|
|
165
|
+
truncation: {
|
|
166
|
+
type: 'none',
|
|
167
|
+
},
|
|
159
168
|
},
|
|
160
169
|
},
|
|
161
170
|
},
|
|
162
171
|
};
|
|
163
172
|
|
|
164
|
-
export const PieEmptyState =
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
+
export const PieEmptyState = {
|
|
174
|
+
render: Template,
|
|
175
|
+
|
|
176
|
+
args: {
|
|
177
|
+
isInverse: false,
|
|
178
|
+
type: CarbonChartType.pie,
|
|
179
|
+
dataSet: [],
|
|
180
|
+
options: {
|
|
181
|
+
title: 'Pie (empty state)',
|
|
182
|
+
resizable: true,
|
|
183
|
+
height: '400px',
|
|
184
|
+
},
|
|
173
185
|
},
|
|
174
186
|
};
|
|
175
187
|
|
|
176
|
-
export const PieSkeleton =
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
188
|
+
export const PieSkeleton = {
|
|
189
|
+
render: Template,
|
|
190
|
+
|
|
191
|
+
args: {
|
|
192
|
+
isInverse: false,
|
|
193
|
+
type: CarbonChartType.pie,
|
|
194
|
+
dataSet: [],
|
|
195
|
+
options: {
|
|
196
|
+
title: 'Pie (skeleton)',
|
|
197
|
+
resizable: true,
|
|
198
|
+
data: {
|
|
199
|
+
loading: true,
|
|
200
|
+
},
|
|
201
|
+
height: '400px',
|
|
186
202
|
},
|
|
187
|
-
height: '400px',
|
|
188
203
|
},
|
|
189
204
|
};
|