@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,93 +23,98 @@ 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
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
{
|
|
44
|
-
group: 'Dataset 2',
|
|
45
|
-
key: 'More',
|
|
46
|
-
value: 34200,
|
|
47
|
-
},
|
|
48
|
-
{
|
|
49
|
-
group: 'Dataset 3',
|
|
50
|
-
key: 'Sold',
|
|
51
|
-
value: 41200,
|
|
52
|
-
},
|
|
53
|
-
{
|
|
54
|
-
group: 'Dataset 4',
|
|
55
|
-
key: 'Restocking',
|
|
56
|
-
value: 22000,
|
|
57
|
-
},
|
|
58
|
-
],
|
|
59
|
-
options: {
|
|
60
|
-
title: 'Lollipop (discrete)',
|
|
61
|
-
axes: {
|
|
62
|
-
bottom: {
|
|
63
|
-
title: '2019 Annual Sales Figures',
|
|
64
|
-
scaleType: 'labels',
|
|
65
|
-
mapsTo: 'key',
|
|
32
|
+
export const LollipopDiscrete = {
|
|
33
|
+
render: Template,
|
|
34
|
+
|
|
35
|
+
args: {
|
|
36
|
+
isInverse: false,
|
|
37
|
+
type: CarbonChartType.lollipop,
|
|
38
|
+
dataSet: [
|
|
39
|
+
{
|
|
40
|
+
group: 'Dataset 1',
|
|
41
|
+
key: 'Qty',
|
|
42
|
+
value: 34200,
|
|
66
43
|
},
|
|
67
|
-
|
|
68
|
-
|
|
44
|
+
{
|
|
45
|
+
group: 'Dataset 2',
|
|
46
|
+
key: 'More',
|
|
47
|
+
value: 34200,
|
|
69
48
|
},
|
|
49
|
+
{
|
|
50
|
+
group: 'Dataset 3',
|
|
51
|
+
key: 'Sold',
|
|
52
|
+
value: 41200,
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
group: 'Dataset 4',
|
|
56
|
+
key: 'Restocking',
|
|
57
|
+
value: 22000,
|
|
58
|
+
},
|
|
59
|
+
],
|
|
60
|
+
options: {
|
|
61
|
+
title: 'Lollipop (discrete)',
|
|
62
|
+
axes: {
|
|
63
|
+
bottom: {
|
|
64
|
+
title: '2019 Annual Sales Figures',
|
|
65
|
+
scaleType: 'labels',
|
|
66
|
+
mapsTo: 'key',
|
|
67
|
+
},
|
|
68
|
+
left: {
|
|
69
|
+
mapsTo: 'value',
|
|
70
|
+
},
|
|
71
|
+
},
|
|
72
|
+
height: '400px',
|
|
70
73
|
},
|
|
71
|
-
height: '400px',
|
|
72
74
|
},
|
|
73
75
|
};
|
|
74
|
-
|
|
75
|
-
LollipopHorizontalPresentation
|
|
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
|
-
title: 'Lollipop (horizontal) - presentation',
|
|
102
|
-
axes: {
|
|
103
|
-
left: {
|
|
104
|
-
title: '2019 Annual Sales Figures',
|
|
105
|
-
scaleType: 'labels',
|
|
106
|
-
mapsTo: 'key',
|
|
76
|
+
|
|
77
|
+
export const LollipopHorizontalPresentation = {
|
|
78
|
+
render: Template,
|
|
79
|
+
|
|
80
|
+
args: {
|
|
81
|
+
isInverse: false,
|
|
82
|
+
type: CarbonChartType.lollipop,
|
|
83
|
+
dataSet: [
|
|
84
|
+
{
|
|
85
|
+
group: 'Dataset 1',
|
|
86
|
+
key: 'Qty',
|
|
87
|
+
value: 34200,
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
group: 'Dataset 2',
|
|
91
|
+
key: 'More',
|
|
92
|
+
value: 34200,
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
group: 'Dataset 3',
|
|
96
|
+
key: 'Sold',
|
|
97
|
+
value: 41200,
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
group: 'Dataset 4',
|
|
101
|
+
key: 'Restocking',
|
|
102
|
+
value: 22000,
|
|
107
103
|
},
|
|
108
|
-
|
|
109
|
-
|
|
104
|
+
],
|
|
105
|
+
options: {
|
|
106
|
+
title: 'Lollipop (horizontal) - presentation',
|
|
107
|
+
axes: {
|
|
108
|
+
left: {
|
|
109
|
+
title: '2019 Annual Sales Figures',
|
|
110
|
+
scaleType: 'labels',
|
|
111
|
+
mapsTo: 'key',
|
|
112
|
+
},
|
|
113
|
+
bottom: {
|
|
114
|
+
mapsTo: 'value',
|
|
115
|
+
},
|
|
110
116
|
},
|
|
117
|
+
height: '400px',
|
|
111
118
|
},
|
|
112
|
-
height: '400px',
|
|
113
119
|
},
|
|
114
120
|
};
|
|
115
|
-
//Lollipop//
|
|
@@ -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,193 +23,208 @@ 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 MeterChartWithStatuses =
|
|
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
|
-
|
|
32
|
+
export const MeterChartWithStatuses = {
|
|
33
|
+
render: Template,
|
|
34
|
+
|
|
35
|
+
args: {
|
|
36
|
+
isInverse: false,
|
|
37
|
+
type: CarbonChartType.meter,
|
|
38
|
+
dataSet: [
|
|
39
|
+
{
|
|
40
|
+
group: 'Dataset 1',
|
|
41
|
+
value: 56,
|
|
42
|
+
},
|
|
43
|
+
],
|
|
44
|
+
options: {
|
|
45
|
+
title: 'Meter Chart - with statuses',
|
|
46
|
+
meter: {
|
|
47
|
+
peak: 80,
|
|
48
|
+
status: {
|
|
49
|
+
ranges: [
|
|
50
|
+
{
|
|
51
|
+
range: [0, 50],
|
|
52
|
+
status: 'success',
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
range: [50, 60],
|
|
56
|
+
status: 'warning',
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
range: [60, 100],
|
|
60
|
+
status: 'danger',
|
|
61
|
+
},
|
|
62
|
+
],
|
|
63
|
+
},
|
|
61
64
|
},
|
|
65
|
+
height: '100px',
|
|
62
66
|
},
|
|
63
|
-
height: '100px',
|
|
64
67
|
},
|
|
65
68
|
};
|
|
66
69
|
|
|
67
|
-
export const MeterChartNoStatus =
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
70
|
+
export const MeterChartNoStatus = {
|
|
71
|
+
render: Template,
|
|
72
|
+
|
|
73
|
+
args: {
|
|
74
|
+
isInverse: false,
|
|
75
|
+
type: CarbonChartType.meter,
|
|
76
|
+
dataSet: [
|
|
77
|
+
{
|
|
78
|
+
group: 'Dataset 1',
|
|
79
|
+
value: 56,
|
|
80
|
+
},
|
|
81
|
+
],
|
|
82
|
+
options: {
|
|
83
|
+
title: 'Meter Chart - no status',
|
|
84
|
+
meter: {
|
|
85
|
+
peak: 70,
|
|
86
|
+
},
|
|
87
|
+
height: '100px',
|
|
81
88
|
},
|
|
82
|
-
height: '100px',
|
|
83
89
|
},
|
|
84
90
|
};
|
|
85
91
|
|
|
86
|
-
export const ProportionalMeterChart =
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
group: 'photos',
|
|
97
|
-
value: 654,
|
|
98
|
-
},
|
|
99
|
-
{
|
|
100
|
-
group: 'text messages',
|
|
101
|
-
value: 723,
|
|
102
|
-
},
|
|
103
|
-
{
|
|
104
|
-
group: 'other',
|
|
105
|
-
value: 120,
|
|
106
|
-
},
|
|
107
|
-
],
|
|
108
|
-
options: {
|
|
109
|
-
title: 'Proportional Meter Chart',
|
|
110
|
-
height: '130px',
|
|
111
|
-
meter: {
|
|
112
|
-
proportional: {
|
|
113
|
-
total: 2000,
|
|
114
|
-
unit: 'GB',
|
|
92
|
+
export const ProportionalMeterChart = {
|
|
93
|
+
render: Template,
|
|
94
|
+
|
|
95
|
+
args: {
|
|
96
|
+
isInverse: false,
|
|
97
|
+
type: CarbonChartType.meter,
|
|
98
|
+
dataSet: [
|
|
99
|
+
{
|
|
100
|
+
group: 'emails',
|
|
101
|
+
value: 202,
|
|
115
102
|
},
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
103
|
+
{
|
|
104
|
+
group: 'photos',
|
|
105
|
+
value: 654,
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
group: 'text messages',
|
|
109
|
+
value: 723,
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
group: 'other',
|
|
113
|
+
value: 120,
|
|
114
|
+
},
|
|
115
|
+
],
|
|
116
|
+
options: {
|
|
117
|
+
title: 'Proportional Meter Chart',
|
|
118
|
+
height: '130px',
|
|
119
|
+
meter: {
|
|
120
|
+
proportional: {
|
|
121
|
+
total: 2000,
|
|
122
|
+
unit: 'GB',
|
|
123
|
+
},
|
|
124
|
+
},
|
|
125
|
+
color: {
|
|
126
|
+
pairing: {
|
|
127
|
+
option: 2,
|
|
128
|
+
},
|
|
120
129
|
},
|
|
121
130
|
},
|
|
122
131
|
},
|
|
123
132
|
};
|
|
124
133
|
|
|
125
|
-
export const ProportionalMeterChartPeakAndStatuses =
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
group: 'photos',
|
|
136
|
-
value: 654,
|
|
137
|
-
},
|
|
138
|
-
{
|
|
139
|
-
group: 'text messages',
|
|
140
|
-
value: 723,
|
|
141
|
-
},
|
|
142
|
-
{
|
|
143
|
-
group: 'other',
|
|
144
|
-
value: 120,
|
|
145
|
-
},
|
|
146
|
-
],
|
|
147
|
-
options: {
|
|
148
|
-
title: 'Proportional Meter Chart - peak and statuses',
|
|
149
|
-
height: '130px',
|
|
150
|
-
meter: {
|
|
151
|
-
peak: 1800,
|
|
152
|
-
proportional: {
|
|
153
|
-
total: 2000,
|
|
154
|
-
unit: 'GB',
|
|
155
|
-
},
|
|
156
|
-
status: {
|
|
157
|
-
ranges: [
|
|
158
|
-
{
|
|
159
|
-
range: [0, 800],
|
|
160
|
-
status: 'success',
|
|
161
|
-
},
|
|
162
|
-
{
|
|
163
|
-
range: [800, 1800],
|
|
164
|
-
status: 'warning',
|
|
165
|
-
},
|
|
166
|
-
{
|
|
167
|
-
range: [1800, 2000],
|
|
168
|
-
status: 'danger',
|
|
169
|
-
},
|
|
170
|
-
],
|
|
134
|
+
export const ProportionalMeterChartPeakAndStatuses = {
|
|
135
|
+
render: Template,
|
|
136
|
+
|
|
137
|
+
args: {
|
|
138
|
+
isInverse: false,
|
|
139
|
+
type: CarbonChartType.meter,
|
|
140
|
+
dataSet: [
|
|
141
|
+
{
|
|
142
|
+
group: 'emails',
|
|
143
|
+
value: 202,
|
|
171
144
|
},
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
145
|
+
{
|
|
146
|
+
group: 'photos',
|
|
147
|
+
value: 654,
|
|
148
|
+
},
|
|
149
|
+
{
|
|
150
|
+
group: 'text messages',
|
|
151
|
+
value: 723,
|
|
152
|
+
},
|
|
153
|
+
{
|
|
154
|
+
group: 'other',
|
|
155
|
+
value: 120,
|
|
156
|
+
},
|
|
157
|
+
],
|
|
158
|
+
options: {
|
|
159
|
+
title: 'Proportional Meter Chart - peak and statuses',
|
|
160
|
+
height: '130px',
|
|
161
|
+
meter: {
|
|
162
|
+
peak: 1800,
|
|
163
|
+
proportional: {
|
|
164
|
+
total: 2000,
|
|
165
|
+
unit: 'GB',
|
|
166
|
+
},
|
|
167
|
+
status: {
|
|
168
|
+
ranges: [
|
|
169
|
+
{
|
|
170
|
+
range: [0, 800],
|
|
171
|
+
status: 'success',
|
|
172
|
+
},
|
|
173
|
+
{
|
|
174
|
+
range: [800, 1800],
|
|
175
|
+
status: 'warning',
|
|
176
|
+
},
|
|
177
|
+
{
|
|
178
|
+
range: [1800, 2000],
|
|
179
|
+
status: 'danger',
|
|
180
|
+
},
|
|
181
|
+
],
|
|
182
|
+
},
|
|
183
|
+
},
|
|
184
|
+
color: {
|
|
185
|
+
pairing: {
|
|
186
|
+
option: 2,
|
|
187
|
+
},
|
|
176
188
|
},
|
|
177
189
|
},
|
|
178
190
|
},
|
|
179
191
|
};
|
|
180
192
|
|
|
181
|
-
export const ProportionalMeterChartTruncated =
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
`
|
|
193
|
+
export const ProportionalMeterChartTruncated = {
|
|
194
|
+
render: Template,
|
|
195
|
+
|
|
196
|
+
args: {
|
|
197
|
+
isInverse: false,
|
|
198
|
+
type: CarbonChartType.meter,
|
|
199
|
+
dataSet: [
|
|
200
|
+
{
|
|
201
|
+
group: 'emails',
|
|
202
|
+
value: 202,
|
|
203
|
+
},
|
|
204
|
+
{
|
|
205
|
+
group: 'photos',
|
|
206
|
+
value: 654,
|
|
207
|
+
},
|
|
208
|
+
{
|
|
209
|
+
group: 'text messages',
|
|
210
|
+
value: 723,
|
|
211
|
+
},
|
|
212
|
+
{
|
|
213
|
+
group: 'other',
|
|
214
|
+
value: 120,
|
|
215
|
+
},
|
|
216
|
+
],
|
|
217
|
+
options: {
|
|
218
|
+
title: 'Proportional Meter Chart (truncated)',
|
|
219
|
+
height: '130px',
|
|
220
|
+
meter: {
|
|
221
|
+
proportional: {
|
|
222
|
+
total: 2000,
|
|
223
|
+
unit: 'MB',
|
|
224
|
+
totalFormatter: e => `custom total string for: ${e}`,
|
|
225
|
+
breakdownFormatter: e =>
|
|
226
|
+
`You are using ${e.datasetsTotal} GB of the space this label is really long will need to be truncated with a tooltip Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.`,
|
|
227
|
+
},
|
|
213
228
|
},
|
|
214
229
|
},
|
|
215
230
|
},
|