sag_components 1.0.153 → 1.0.154
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.
|
@@ -55,7 +55,8 @@ var TotalDoughnutChart = function TotalDoughnutChart(_ref) {
|
|
|
55
55
|
label = _ref2.label;
|
|
56
56
|
if (active && payload && payload.length) {
|
|
57
57
|
console.log(active, payload, label);
|
|
58
|
-
|
|
58
|
+
var percent = value && value != 0 ? (payload[0].value / value * 100).toFixed(0) : 0;
|
|
59
|
+
return /*#__PURE__*/_react.default.createElement(_TotalDoughnutChartStyle.TooltipDiv, null, /*#__PURE__*/_react.default.createElement(_TotalDoughnutChartStyle.TooltipLabel, null, "".concat(payload[0].name, " ").concat(percent, "%")));
|
|
59
60
|
}
|
|
60
61
|
return null;
|
|
61
62
|
};
|
|
@@ -20,9 +20,9 @@ var ControlsContainer = _styledComponents.default.div(_templateObject || (_templ
|
|
|
20
20
|
exports.ControlsContainer = ControlsContainer;
|
|
21
21
|
var Controls = _styledComponents.default.div(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n border-radius: 12px;\n width: 100%;\n height: 100%;\n background: #ffffff;\n align-items: center;\n flex-direction: column;\n justify-content: space-between;\n"])));
|
|
22
22
|
exports.Controls = Controls;
|
|
23
|
-
var TooltipDiv = _styledComponents.default.div(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n border-radius: 5px;\n background: #FFF;\n"])));
|
|
23
|
+
var TooltipDiv = _styledComponents.default.div(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n border-radius: 5px;\n background: #FFF;\n padding: 8px 12px;\n display: flex;\n\n"])));
|
|
24
24
|
exports.TooltipDiv = TooltipDiv;
|
|
25
|
-
var TooltipLabel = _styledComponents.default.div(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\ncolor: #212121;\nfont-family: Lato;\nfont-size: 14px;\nfont-style: normal;\nfont-weight: 600;\nline-height: normal;\n"])));
|
|
25
|
+
var TooltipLabel = _styledComponents.default.div(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\ncolor: #212121;\nfont-family: Lato;\nfont-size: 14px;\nfont-style: normal;\nwidth: fit-content;\nfont-weight: 600;\nline-height: normal;\n"])));
|
|
26
26
|
exports.TooltipLabel = TooltipLabel;
|
|
27
27
|
var TitleAndValueContainer = _styledComponents.default.div(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n flex-direction: column;\n width: 90%;\n margin-top: 6%;\n"])));
|
|
28
28
|
exports.TitleAndValueContainer = TitleAndValueContainer;
|