@aclymatepackages/modules 5.0.5 → 5.1.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/components/BasicPieChart.js +94 -0
- package/dist/components/EmissionsPieChart.js +30 -49
- package/dist/components/PlacesAutocomplete.js +1 -1
- package/dist/index.js +7 -0
- package/package.json +1 -1
- package/src/components/BasicPieChart.js +98 -0
- package/src/components/EmissionsPieChart.js +38 -63
- package/src/components/PlacesAutocomplete.js +1 -1
- package/src/index.js +2 -0
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
require("core-js/modules/web.dom-collections.iterator.js");
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
var _recharts = require("recharts");
|
|
10
|
+
var _material = require("@mui/material");
|
|
11
|
+
var _atoms = require("@aclymatepackages/atoms");
|
|
12
|
+
var _formatters = require("@aclymatepackages/formatters");
|
|
13
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
14
|
+
const DefaultTooltip = _ref => {
|
|
15
|
+
let {
|
|
16
|
+
active,
|
|
17
|
+
payload
|
|
18
|
+
} = _ref;
|
|
19
|
+
if (!active || !payload || !payload.length) {
|
|
20
|
+
return null;
|
|
21
|
+
}
|
|
22
|
+
const [{
|
|
23
|
+
payload: slice
|
|
24
|
+
}] = payload;
|
|
25
|
+
const {
|
|
26
|
+
label,
|
|
27
|
+
value,
|
|
28
|
+
color,
|
|
29
|
+
unit,
|
|
30
|
+
percent
|
|
31
|
+
} = slice || {};
|
|
32
|
+
return /*#__PURE__*/_react.default.createElement(_atoms.DefaultPaper, null, /*#__PURE__*/_react.default.createElement(_material.Grid, {
|
|
33
|
+
container: true,
|
|
34
|
+
spacing: 1,
|
|
35
|
+
alignItems: "center"
|
|
36
|
+
}, /*#__PURE__*/_react.default.createElement(_material.Grid, {
|
|
37
|
+
item: true
|
|
38
|
+
}, /*#__PURE__*/_react.default.createElement(_material.Box, {
|
|
39
|
+
style: {
|
|
40
|
+
width: 12,
|
|
41
|
+
height: 12,
|
|
42
|
+
borderRadius: "50%",
|
|
43
|
+
backgroundColor: color
|
|
44
|
+
}
|
|
45
|
+
})), /*#__PURE__*/_react.default.createElement(_material.Grid, {
|
|
46
|
+
item: true
|
|
47
|
+
}, /*#__PURE__*/_react.default.createElement(_material.Typography, {
|
|
48
|
+
variant: "subtitle2",
|
|
49
|
+
color: "textPrimary"
|
|
50
|
+
}, label), /*#__PURE__*/_react.default.createElement(_material.Typography, {
|
|
51
|
+
variant: "caption",
|
|
52
|
+
color: "textSecondary"
|
|
53
|
+
}, "".concat((0, _formatters.formatDecimal)(value)).concat(unit ? " ".concat(unit) : "").concat(typeof percent === "number" ? " (".concat((0, _formatters.formatDecimal)(percent * 100), "%)") : "")))));
|
|
54
|
+
};
|
|
55
|
+
const BasicPieChart = _ref2 => {
|
|
56
|
+
let {
|
|
57
|
+
data,
|
|
58
|
+
dataKey = "value",
|
|
59
|
+
showTooltip = true,
|
|
60
|
+
CustomTooltip,
|
|
61
|
+
pieRef,
|
|
62
|
+
aspect = 1.5,
|
|
63
|
+
outerRadius = "100%",
|
|
64
|
+
cx = "50%",
|
|
65
|
+
cy = "50%"
|
|
66
|
+
} = _ref2;
|
|
67
|
+
const TooltipComponent = CustomTooltip || DefaultTooltip;
|
|
68
|
+
return /*#__PURE__*/_react.default.createElement(_recharts.ResponsiveContainer, {
|
|
69
|
+
height: "100%",
|
|
70
|
+
aspect: aspect
|
|
71
|
+
}, /*#__PURE__*/_react.default.createElement(_recharts.PieChart, {
|
|
72
|
+
ref: pieRef,
|
|
73
|
+
width: 500,
|
|
74
|
+
height: 300
|
|
75
|
+
}, /*#__PURE__*/_react.default.createElement(_recharts.Pie, {
|
|
76
|
+
data: data,
|
|
77
|
+
dataKey: dataKey,
|
|
78
|
+
nameKey: "label",
|
|
79
|
+
outerRadius: outerRadius,
|
|
80
|
+
cx: cx,
|
|
81
|
+
cy: cy,
|
|
82
|
+
isAnimationActive: false
|
|
83
|
+
}, data.map((slice, idx) => /*#__PURE__*/_react.default.createElement(_recharts.Cell, {
|
|
84
|
+
key: "basic-pie-cell-".concat(idx),
|
|
85
|
+
name: slice.label,
|
|
86
|
+
fill: slice.color
|
|
87
|
+
}))), showTooltip && /*#__PURE__*/_react.default.createElement(_recharts.Tooltip, {
|
|
88
|
+
wrapperStyle: {
|
|
89
|
+
zIndex: 99
|
|
90
|
+
},
|
|
91
|
+
content: props => /*#__PURE__*/_react.default.createElement(TooltipComponent, props)
|
|
92
|
+
})));
|
|
93
|
+
};
|
|
94
|
+
var _default = exports.default = BasicPieChart;
|
|
@@ -6,12 +6,12 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
require("core-js/modules/web.dom-collections.iterator.js");
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
var _recharts = require("recharts");
|
|
10
9
|
var _material = require("@mui/material");
|
|
11
10
|
var _atoms = require("@aclymatepackages/atoms");
|
|
12
11
|
var _formatters = require("@aclymatepackages/formatters");
|
|
13
12
|
var _otherHelpers = require("@aclymatepackages/other-helpers");
|
|
14
13
|
var _subcategories = require("@aclymatepackages/subcategories");
|
|
14
|
+
var _BasicPieChart = _interopRequireDefault(require("./BasicPieChart"));
|
|
15
15
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
16
16
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
17
17
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
@@ -69,57 +69,38 @@ const EmissionsPieChart = _ref2 => {
|
|
|
69
69
|
const subcategoriesArray = subcategoriesArrayProp || (0, _subcategories.buildSubcategoriesArray)(emissions);
|
|
70
70
|
const scopesArray = (0, _subcategories.buildScopesWithColors)(branding);
|
|
71
71
|
const emissionsSum = (0, _otherHelpers.sumTonsCo2e)(emissions);
|
|
72
|
-
const
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
return emission.scope === scopeNumber;
|
|
79
|
-
};
|
|
80
|
-
const slicesArray = viewMode === "subcategories" ? subcategoriesArray : scopesArray;
|
|
81
|
-
return slicesArray.map(subcategoryObj => {
|
|
82
|
-
const {
|
|
83
|
-
subcategory
|
|
84
|
-
} = subcategoryObj;
|
|
85
|
-
const emissionsWithThisCategory = emissions.filter(filterFunction(subcategory));
|
|
86
|
-
const categoryEmissionsSum = (0, _otherHelpers.sumTonsCo2e)(emissionsWithThisCategory);
|
|
87
|
-
return _objectSpread(_objectSpread({}, subcategoryObj), {}, {
|
|
88
|
-
viewMode,
|
|
89
|
-
emissionPercentage: categoryEmissionsSum / emissionsSum * 100
|
|
90
|
-
});
|
|
91
|
-
});
|
|
72
|
+
const filterFunction = subcategory => emission => {
|
|
73
|
+
if (viewMode === "subcategories") {
|
|
74
|
+
return emission.subcategory === subcategory;
|
|
75
|
+
}
|
|
76
|
+
const scopeNumber = Number(subcategory.charAt(subcategory.length - 1));
|
|
77
|
+
return emission.scope === scopeNumber;
|
|
92
78
|
};
|
|
93
|
-
const
|
|
94
|
-
const
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
aspect: aspect
|
|
98
|
-
}, /*#__PURE__*/_react.default.createElement(_recharts.PieChart, {
|
|
99
|
-
ref: pieChartRef
|
|
100
|
-
}, /*#__PURE__*/_react.default.createElement(_recharts.Pie, {
|
|
101
|
-
data: pieSlicesWithPercentages,
|
|
102
|
-
outerRadius: "100%",
|
|
103
|
-
fill: "#8884d8",
|
|
104
|
-
dataKey: "emissionPercentage",
|
|
105
|
-
cx: "50%",
|
|
106
|
-
cy: "50%"
|
|
107
|
-
}, pieSlicesWithPercentages.map(_ref3 => {
|
|
108
|
-
let {
|
|
109
|
-
category,
|
|
79
|
+
const slicesArray = viewMode === "subcategories" ? subcategoriesArray : scopesArray;
|
|
80
|
+
const pieSlicesWithPercentages = slicesArray.map(subcategoryObj => {
|
|
81
|
+
const {
|
|
82
|
+
subcategory,
|
|
110
83
|
name,
|
|
111
84
|
color
|
|
112
|
-
} =
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
85
|
+
} = subcategoryObj;
|
|
86
|
+
const emissionsWithThisCategory = emissions.filter(filterFunction(subcategory));
|
|
87
|
+
const categoryEmissionsSum = (0, _otherHelpers.sumTonsCo2e)(emissionsWithThisCategory);
|
|
88
|
+
const emissionPercentage = categoryEmissionsSum / emissionsSum * 100;
|
|
89
|
+
return _objectSpread(_objectSpread({}, subcategoryObj), {}, {
|
|
90
|
+
viewMode,
|
|
91
|
+
emissionPercentage,
|
|
92
|
+
label: name,
|
|
93
|
+
value: emissionPercentage,
|
|
94
|
+
color
|
|
117
95
|
});
|
|
118
|
-
})
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
96
|
+
});
|
|
97
|
+
return /*#__PURE__*/_react.default.createElement(_BasicPieChart.default, {
|
|
98
|
+
data: pieSlicesWithPercentages,
|
|
99
|
+
dataKey: "emissionPercentage",
|
|
100
|
+
showTooltip: showTooltip,
|
|
101
|
+
CustomTooltip: CustomTooltip || PieChartCustomTooltip,
|
|
102
|
+
pieRef: pieChartRef,
|
|
103
|
+
aspect: aspect
|
|
104
|
+
});
|
|
124
105
|
};
|
|
125
106
|
var _default = exports.default = EmissionsPieChart;
|
|
@@ -108,7 +108,7 @@ const PlacesAutocomplete = _ref => {
|
|
|
108
108
|
helperText: helperText,
|
|
109
109
|
style: style
|
|
110
110
|
}, textFieldProps)),
|
|
111
|
-
|
|
111
|
+
isOptionEqualToValue: (option, value) => {
|
|
112
112
|
return option === "" || option.description === value.description || option === value;
|
|
113
113
|
},
|
|
114
114
|
value: place || "",
|
package/dist/index.js
CHANGED
|
@@ -9,6 +9,12 @@ Object.defineProperty(exports, "AccountingChart", {
|
|
|
9
9
|
return _AccountingChart.default;
|
|
10
10
|
}
|
|
11
11
|
});
|
|
12
|
+
Object.defineProperty(exports, "BasicPieChart", {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function get() {
|
|
15
|
+
return _BasicPieChart.default;
|
|
16
|
+
}
|
|
17
|
+
});
|
|
12
18
|
Object.defineProperty(exports, "CompanyDataConfirmation", {
|
|
13
19
|
enumerable: true,
|
|
14
20
|
get: function get() {
|
|
@@ -103,6 +109,7 @@ var _ComparisonChart = _interopRequireDefault(require("./components/ComparisonCh
|
|
|
103
109
|
var _EmissionsReductionGraph = _interopRequireDefault(require("./components/EmissionsReductionGraph"));
|
|
104
110
|
var _CompanyOnboardingInput = _interopRequireDefault(require("./components/CompanyOnboardingInput"));
|
|
105
111
|
var _EmissionsPieChart = _interopRequireDefault(require("./components/EmissionsPieChart"));
|
|
112
|
+
var _BasicPieChart = _interopRequireDefault(require("./components/BasicPieChart"));
|
|
106
113
|
var _useChartWarningLabels = _interopRequireDefault(require("./components/useChartWarningLabels"));
|
|
107
114
|
var _EmissionsSummarySentence = _interopRequireDefault(require("./components/EmissionsSummarySentence"));
|
|
108
115
|
var _DbCompanySelect = _interopRequireDefault(require("./components/DbCompanySelect"));
|
package/package.json
CHANGED
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
|
|
3
|
+
import {
|
|
4
|
+
Tooltip as ChartTooltip,
|
|
5
|
+
ResponsiveContainer,
|
|
6
|
+
PieChart,
|
|
7
|
+
Pie,
|
|
8
|
+
Cell,
|
|
9
|
+
} from "recharts";
|
|
10
|
+
|
|
11
|
+
import { Box, Typography, Grid } from "@mui/material";
|
|
12
|
+
|
|
13
|
+
import { DefaultPaper } from "@aclymatepackages/atoms";
|
|
14
|
+
import { formatDecimal } from "@aclymatepackages/formatters";
|
|
15
|
+
|
|
16
|
+
const DefaultTooltip = ({ active, payload }) => {
|
|
17
|
+
if (!active || !payload || !payload.length) {
|
|
18
|
+
return null;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
const [{ payload: slice }] = payload;
|
|
22
|
+
const { label, value, color, unit, percent } = slice || {};
|
|
23
|
+
|
|
24
|
+
return (
|
|
25
|
+
<DefaultPaper>
|
|
26
|
+
<Grid container spacing={1} alignItems="center">
|
|
27
|
+
<Grid item>
|
|
28
|
+
<Box
|
|
29
|
+
style={{
|
|
30
|
+
width: 12,
|
|
31
|
+
height: 12,
|
|
32
|
+
borderRadius: "50%",
|
|
33
|
+
backgroundColor: color,
|
|
34
|
+
}}
|
|
35
|
+
/>
|
|
36
|
+
</Grid>
|
|
37
|
+
<Grid item>
|
|
38
|
+
<Typography variant="subtitle2" color="textPrimary">
|
|
39
|
+
{label}
|
|
40
|
+
</Typography>
|
|
41
|
+
<Typography variant="caption" color="textSecondary">
|
|
42
|
+
{`${formatDecimal(value)}${unit ? ` ${unit}` : ""}${
|
|
43
|
+
typeof percent === "number"
|
|
44
|
+
? ` (${formatDecimal(percent * 100)}%)`
|
|
45
|
+
: ""
|
|
46
|
+
}`}
|
|
47
|
+
</Typography>
|
|
48
|
+
</Grid>
|
|
49
|
+
</Grid>
|
|
50
|
+
</DefaultPaper>
|
|
51
|
+
);
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
const BasicPieChart = ({
|
|
55
|
+
data,
|
|
56
|
+
dataKey = "value",
|
|
57
|
+
showTooltip = true,
|
|
58
|
+
CustomTooltip,
|
|
59
|
+
pieRef,
|
|
60
|
+
aspect = 1.5,
|
|
61
|
+
outerRadius = "100%",
|
|
62
|
+
cx = "50%",
|
|
63
|
+
cy = "50%",
|
|
64
|
+
}) => {
|
|
65
|
+
const TooltipComponent = CustomTooltip || DefaultTooltip;
|
|
66
|
+
|
|
67
|
+
return (
|
|
68
|
+
<ResponsiveContainer height="100%" aspect={aspect}>
|
|
69
|
+
<PieChart ref={pieRef} width={500} height={300}>
|
|
70
|
+
<Pie
|
|
71
|
+
data={data}
|
|
72
|
+
dataKey={dataKey}
|
|
73
|
+
nameKey="label"
|
|
74
|
+
outerRadius={outerRadius}
|
|
75
|
+
cx={cx}
|
|
76
|
+
cy={cy}
|
|
77
|
+
isAnimationActive={false}
|
|
78
|
+
>
|
|
79
|
+
{data.map((slice, idx) => (
|
|
80
|
+
<Cell
|
|
81
|
+
key={`basic-pie-cell-${idx}`}
|
|
82
|
+
name={slice.label}
|
|
83
|
+
fill={slice.color}
|
|
84
|
+
/>
|
|
85
|
+
))}
|
|
86
|
+
</Pie>
|
|
87
|
+
{showTooltip && (
|
|
88
|
+
<ChartTooltip
|
|
89
|
+
wrapperStyle={{ zIndex: 99 }}
|
|
90
|
+
content={(props) => <TooltipComponent {...props} />}
|
|
91
|
+
/>
|
|
92
|
+
)}
|
|
93
|
+
</PieChart>
|
|
94
|
+
</ResponsiveContainer>
|
|
95
|
+
);
|
|
96
|
+
};
|
|
97
|
+
|
|
98
|
+
export default BasicPieChart;
|
|
@@ -1,13 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
|
|
3
|
-
import {
|
|
4
|
-
Tooltip as ChartTooltip,
|
|
5
|
-
ResponsiveContainer,
|
|
6
|
-
PieChart,
|
|
7
|
-
Pie,
|
|
8
|
-
Cell,
|
|
9
|
-
} from "recharts";
|
|
10
|
-
|
|
11
3
|
import { Typography, Grid } from "@mui/material";
|
|
12
4
|
|
|
13
5
|
import { DefaultPaper, CategoriesAvatar } from "@aclymatepackages/atoms";
|
|
@@ -18,6 +10,8 @@ import {
|
|
|
18
10
|
buildScopesWithColors,
|
|
19
11
|
} from "@aclymatepackages/subcategories";
|
|
20
12
|
|
|
13
|
+
import BasicPieChart from "./BasicPieChart";
|
|
14
|
+
|
|
21
15
|
const PieChartCustomTooltip = ({ payload: passedPayload }) => {
|
|
22
16
|
const [payloadObj] = passedPayload;
|
|
23
17
|
const { payload = {} } = payloadObj || [{}];
|
|
@@ -64,66 +58,47 @@ const EmissionsPieChart = ({
|
|
|
64
58
|
|
|
65
59
|
const emissionsSum = sumTonsCo2e(emissions);
|
|
66
60
|
|
|
67
|
-
const
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
const scopeNumber = Number(subcategory.charAt(subcategory.length - 1));
|
|
74
|
-
return emission.scope === scopeNumber;
|
|
75
|
-
};
|
|
76
|
-
|
|
77
|
-
const slicesArray =
|
|
78
|
-
viewMode === "subcategories" ? subcategoriesArray : scopesArray;
|
|
61
|
+
const filterFunction = (subcategory) => (emission) => {
|
|
62
|
+
if (viewMode === "subcategories") {
|
|
63
|
+
return emission.subcategory === subcategory;
|
|
64
|
+
}
|
|
79
65
|
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
const emissionsWithThisCategory = emissions.filter(
|
|
83
|
-
filterFunction(subcategory)
|
|
84
|
-
);
|
|
85
|
-
|
|
86
|
-
const categoryEmissionsSum = sumTonsCo2e(emissionsWithThisCategory);
|
|
87
|
-
|
|
88
|
-
return {
|
|
89
|
-
...subcategoryObj,
|
|
90
|
-
viewMode,
|
|
91
|
-
emissionPercentage: (categoryEmissionsSum / emissionsSum) * 100,
|
|
92
|
-
};
|
|
93
|
-
});
|
|
66
|
+
const scopeNumber = Number(subcategory.charAt(subcategory.length - 1));
|
|
67
|
+
return emission.scope === scopeNumber;
|
|
94
68
|
};
|
|
95
69
|
|
|
96
|
-
const
|
|
97
|
-
|
|
98
|
-
|
|
70
|
+
const slicesArray =
|
|
71
|
+
viewMode === "subcategories" ? subcategoriesArray : scopesArray;
|
|
72
|
+
|
|
73
|
+
const pieSlicesWithPercentages = slicesArray.map((subcategoryObj) => {
|
|
74
|
+
const { subcategory, name, color } = subcategoryObj;
|
|
75
|
+
const emissionsWithThisCategory = emissions.filter(
|
|
76
|
+
filterFunction(subcategory)
|
|
77
|
+
);
|
|
78
|
+
|
|
79
|
+
const categoryEmissionsSum = sumTonsCo2e(emissionsWithThisCategory);
|
|
80
|
+
const emissionPercentage = (categoryEmissionsSum / emissionsSum) * 100;
|
|
81
|
+
|
|
82
|
+
return {
|
|
83
|
+
...subcategoryObj,
|
|
84
|
+
viewMode,
|
|
85
|
+
emissionPercentage,
|
|
86
|
+
label: name,
|
|
87
|
+
value: emissionPercentage,
|
|
88
|
+
color,
|
|
89
|
+
};
|
|
90
|
+
});
|
|
99
91
|
|
|
100
92
|
return (
|
|
101
|
-
<
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
cy="50%"
|
|
110
|
-
>
|
|
111
|
-
{pieSlicesWithPercentages.map(({ category, name, color }) => (
|
|
112
|
-
<Cell
|
|
113
|
-
key={`emissions-pie-chart-cell-${category}`}
|
|
114
|
-
name={name}
|
|
115
|
-
fill={color}
|
|
116
|
-
/>
|
|
117
|
-
))}
|
|
118
|
-
</Pie>
|
|
119
|
-
{showTooltip && (
|
|
120
|
-
<ChartTooltip
|
|
121
|
-
wrapperStyle={{ zIndex: 99 }}
|
|
122
|
-
content={(props) => <TooltipComponent {...props} />}
|
|
123
|
-
/>
|
|
124
|
-
)}
|
|
125
|
-
</PieChart>
|
|
126
|
-
</ResponsiveContainer>
|
|
93
|
+
<BasicPieChart
|
|
94
|
+
data={pieSlicesWithPercentages}
|
|
95
|
+
dataKey="emissionPercentage"
|
|
96
|
+
showTooltip={showTooltip}
|
|
97
|
+
CustomTooltip={CustomTooltip || PieChartCustomTooltip}
|
|
98
|
+
pieRef={pieChartRef}
|
|
99
|
+
aspect={aspect}
|
|
100
|
+
/>
|
|
127
101
|
);
|
|
128
102
|
};
|
|
103
|
+
|
|
129
104
|
export default EmissionsPieChart;
|
package/src/index.js
CHANGED
|
@@ -8,6 +8,7 @@ import ComparisonChart from "./components/ComparisonChart";
|
|
|
8
8
|
import EmissionsReductionGraph from "./components/EmissionsReductionGraph";
|
|
9
9
|
import CompanyOnboardingInput from "./components/CompanyOnboardingInput";
|
|
10
10
|
import EmissionsPieChart from "./components/EmissionsPieChart";
|
|
11
|
+
import BasicPieChart from "./components/BasicPieChart";
|
|
11
12
|
import useChartWarningLabels from "./components/useChartWarningLabels";
|
|
12
13
|
import EmissionsSummarySentence from "./components/EmissionsSummarySentence";
|
|
13
14
|
import DbCompanySelect from "./components/DbCompanySelect";
|
|
@@ -25,6 +26,7 @@ export {
|
|
|
25
26
|
EmissionsReductionGraph,
|
|
26
27
|
CompanyOnboardingInput,
|
|
27
28
|
EmissionsPieChart,
|
|
29
|
+
BasicPieChart,
|
|
28
30
|
useChartWarningLabels,
|
|
29
31
|
EmissionsSummarySentence,
|
|
30
32
|
DbCompanySelect,
|