@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,136 +23,147 @@ 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 HorizontalFloatingBarTimeSeries =
|
|
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
|
-
group: 'Misc',
|
|
59
|
-
date: new Date(2019, 0, 7),
|
|
60
|
-
value: [3500, 71213],
|
|
61
|
-
},
|
|
62
|
-
],
|
|
63
|
-
options: {
|
|
64
|
-
title: 'Horizontal floating bar (time series)',
|
|
65
|
-
axes: {
|
|
66
|
-
left: {
|
|
67
|
-
mapsTo: 'date',
|
|
68
|
-
scaleType: 'time',
|
|
32
|
+
export const HorizontalFloatingBarTimeSeries = {
|
|
33
|
+
render: Template,
|
|
34
|
+
|
|
35
|
+
args: {
|
|
36
|
+
isInverse: false,
|
|
37
|
+
type: CarbonChartType.bar,
|
|
38
|
+
dataSet: [
|
|
39
|
+
{
|
|
40
|
+
group: 'Qty',
|
|
41
|
+
date: new Date(2019, 0, 1),
|
|
42
|
+
value: [10000, 41000],
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
group: 'More',
|
|
46
|
+
date: new Date(2019, 0, 2),
|
|
47
|
+
value: 65000,
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
group: 'Sold',
|
|
51
|
+
date: new Date(2019, 0, 3),
|
|
52
|
+
value: 30000,
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
group: 'Restocking',
|
|
56
|
+
date: new Date(2019, 0, 6),
|
|
57
|
+
value: [22000, 69213],
|
|
69
58
|
},
|
|
70
|
-
|
|
71
|
-
|
|
59
|
+
{
|
|
60
|
+
group: 'Misc',
|
|
61
|
+
date: new Date(2019, 0, 7),
|
|
62
|
+
value: [3500, 71213],
|
|
72
63
|
},
|
|
64
|
+
],
|
|
65
|
+
options: {
|
|
66
|
+
title: 'Horizontal floating bar (time series)',
|
|
67
|
+
axes: {
|
|
68
|
+
left: {
|
|
69
|
+
mapsTo: 'date',
|
|
70
|
+
scaleType: 'time',
|
|
71
|
+
},
|
|
72
|
+
bottom: {
|
|
73
|
+
mapsTo: 'value',
|
|
74
|
+
},
|
|
75
|
+
},
|
|
76
|
+
height: '400px',
|
|
73
77
|
},
|
|
74
|
-
height: '400px',
|
|
75
78
|
},
|
|
76
79
|
};
|
|
77
|
-
|
|
78
|
-
FloatingVerticalBarDiscrete
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
value: [15000, 29123],
|
|
89
|
-
},
|
|
90
|
-
{
|
|
91
|
-
group: 'Sold',
|
|
92
|
-
value: [22000, 35213],
|
|
93
|
-
},
|
|
94
|
-
{
|
|
95
|
-
group: 'Restocking',
|
|
96
|
-
value: [28000, 51213],
|
|
97
|
-
},
|
|
98
|
-
{
|
|
99
|
-
group: 'Misc',
|
|
100
|
-
value: [3000, 16932],
|
|
101
|
-
},
|
|
102
|
-
],
|
|
103
|
-
options: {
|
|
104
|
-
title: 'Floating vertical bar (discrete)',
|
|
105
|
-
axes: {
|
|
106
|
-
left: {
|
|
107
|
-
mapsTo: 'value',
|
|
108
|
-
includeZero: false,
|
|
109
|
-
},
|
|
110
|
-
bottom: {
|
|
111
|
-
mapsTo: 'group',
|
|
112
|
-
scaleType: 'labels',
|
|
80
|
+
|
|
81
|
+
export const FloatingVerticalBarDiscrete = {
|
|
82
|
+
render: Template,
|
|
83
|
+
|
|
84
|
+
args: {
|
|
85
|
+
isInverse: false,
|
|
86
|
+
type: CarbonChartType.bar,
|
|
87
|
+
dataSet: [
|
|
88
|
+
{
|
|
89
|
+
group: 'Qty',
|
|
90
|
+
value: [30000, 65000],
|
|
113
91
|
},
|
|
92
|
+
{
|
|
93
|
+
group: 'More',
|
|
94
|
+
value: [15000, 29123],
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
group: 'Sold',
|
|
98
|
+
value: [22000, 35213],
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
group: 'Restocking',
|
|
102
|
+
value: [28000, 51213],
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
group: 'Misc',
|
|
106
|
+
value: [3000, 16932],
|
|
107
|
+
},
|
|
108
|
+
],
|
|
109
|
+
options: {
|
|
110
|
+
title: 'Floating vertical bar (discrete)',
|
|
111
|
+
axes: {
|
|
112
|
+
left: {
|
|
113
|
+
mapsTo: 'value',
|
|
114
|
+
includeZero: false,
|
|
115
|
+
},
|
|
116
|
+
bottom: {
|
|
117
|
+
mapsTo: 'group',
|
|
118
|
+
scaleType: 'labels',
|
|
119
|
+
},
|
|
120
|
+
},
|
|
121
|
+
height: '400px',
|
|
114
122
|
},
|
|
115
|
-
height: '400px',
|
|
116
123
|
},
|
|
117
124
|
};
|
|
118
|
-
|
|
119
|
-
FloatingHorizontalBarDiscrete
|
|
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
|
-
|
|
125
|
+
|
|
126
|
+
export const FloatingHorizontalBarDiscrete = {
|
|
127
|
+
render: Template,
|
|
128
|
+
|
|
129
|
+
args: {
|
|
130
|
+
isInverse: false,
|
|
131
|
+
type: CarbonChartType.bar,
|
|
132
|
+
dataSet: [
|
|
133
|
+
{
|
|
134
|
+
group: 'Qty',
|
|
135
|
+
value: [30000, 65000],
|
|
136
|
+
},
|
|
137
|
+
{
|
|
138
|
+
group: 'More',
|
|
139
|
+
value: [15000, 29123],
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
group: 'Sold',
|
|
143
|
+
value: [22000, 35213],
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
group: 'Restocking',
|
|
147
|
+
value: [28000, 51213],
|
|
148
|
+
},
|
|
149
|
+
{
|
|
150
|
+
group: 'Misc',
|
|
151
|
+
value: [3000, 36932],
|
|
152
|
+
},
|
|
153
|
+
],
|
|
154
|
+
options: {
|
|
155
|
+
title: 'Floating horizontal bar (discrete)',
|
|
156
|
+
axes: {
|
|
157
|
+
left: {
|
|
158
|
+
mapsTo: 'group',
|
|
159
|
+
scaleType: 'labels',
|
|
160
|
+
},
|
|
161
|
+
bottom: {
|
|
162
|
+
mapsTo: 'value',
|
|
163
|
+
includeZero: false,
|
|
164
|
+
},
|
|
154
165
|
},
|
|
166
|
+
height: '400px',
|
|
155
167
|
},
|
|
156
|
-
height: '400px',
|
|
157
168
|
},
|
|
158
169
|
};
|