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