sag_components 1.0.520 → 1.0.522
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.
|
@@ -39,13 +39,13 @@ const TotalDoughnutChart = props => {
|
|
|
39
39
|
if (!DoughnutChartContainerRef) {
|
|
40
40
|
return;
|
|
41
41
|
}
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
42
|
+
|
|
43
|
+
// let { offsetWidth, offsetHeight } = DoughnutChartContainerRef?.current;
|
|
44
|
+
|
|
45
|
+
// offsetWidth = offsetWidth / 3;
|
|
46
|
+
// offsetHeight = offsetHeight / 3;
|
|
47
|
+
// console.log("DoughnutChartContainerRef 2", offsetWidth, offsetHeight);
|
|
48
|
+
|
|
49
49
|
const {
|
|
50
50
|
current
|
|
51
51
|
} = DoughnutChartContainerRef;
|
|
@@ -68,8 +68,8 @@ const TotalDoughnutChart = props => {
|
|
|
68
68
|
if (!current) {
|
|
69
69
|
return;
|
|
70
70
|
}
|
|
71
|
-
const DoughnutChartContainerWidth = current === null || current === void 0 ? void 0 : current.
|
|
72
|
-
const DoughnutChartContainerHeight = current === null || current === void 0 ? void 0 : current.
|
|
71
|
+
const DoughnutChartContainerWidth = current === null || current === void 0 ? void 0 : current.offsetWidth;
|
|
72
|
+
const DoughnutChartContainerHeight = current === null || current === void 0 ? void 0 : current.offsetHeight;
|
|
73
73
|
console.log("DoughnutChartContainerRef 5", DoughnutChartContainerWidth, DoughnutChartContainerHeight);
|
|
74
74
|
const radius = DoughnutChartContainerWidth > DoughnutChartContainerHeight ? DoughnutChartContainerHeight / 2 : DoughnutChartContainerWidth / 2;
|
|
75
75
|
setDoughnutChartRadius(radius);
|
|
@@ -129,8 +129,7 @@ const TotalDoughnutChart = props => {
|
|
|
129
129
|
id: "ControlsContainer",
|
|
130
130
|
height: height,
|
|
131
131
|
width: width,
|
|
132
|
-
textcolor: textcolor
|
|
133
|
-
ref: DoughnutChartContainerRef
|
|
132
|
+
textcolor: textcolor
|
|
134
133
|
}, (legendData === null || legendData === void 0 ? void 0 : legendData.length) > 0 ? /*#__PURE__*/_react.default.createElement(_TotalDoughnutChart.Controls, {
|
|
135
134
|
id: "Controls",
|
|
136
135
|
height: height,
|
|
@@ -148,9 +147,10 @@ const TotalDoughnutChart = props => {
|
|
|
148
147
|
}, /*#__PURE__*/_react.default.createElement(_TotalDoughnutChart.CurrencySign, {
|
|
149
148
|
id: "CurrencySign"
|
|
150
149
|
}, currencySign ? (0, _CommonFunctions.getCurrencySign)(currencyType, value) : ""), dotCut ? (0, _CommonFunctions.getFormattedValue)(value) : (0, _CommonFunctions.getNumberWithCommas)(value), dotCut ? (0, _CommonFunctions.getFormattedUnits)(value) : ""), addingBenchmark && /*#__PURE__*/_react.default.createElement(_Benchmark.Benchmark, null))), /*#__PURE__*/_react.default.createElement(_TotalDoughnutChart.DoughnutChartAndLegendContainer, {
|
|
151
|
-
id: "DoughnutChartAndLegendContainer"
|
|
152
|
-
|
|
153
|
-
|
|
150
|
+
id: "DoughnutChartAndLegendContainer",
|
|
151
|
+
ref: DoughnutChartContainerRef
|
|
152
|
+
}, /*#__PURE__*/_react.default.createElement(_TotalDoughnutChart.DoughnutChartContainer, {
|
|
153
|
+
id: "DoughnutChartContainer",
|
|
154
154
|
width: width,
|
|
155
155
|
height: height
|
|
156
156
|
}, /*#__PURE__*/_react.default.createElement(_recharts.ResponsiveContainer, null, /*#__PURE__*/_react.default.createElement(_recharts.PieChart, null, /*#__PURE__*/_react.default.createElement(_recharts.Pie, {
|
|
@@ -4,7 +4,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
|
-
exports.TooltipLabel = exports.TooltipDiv = exports.TitleAndValueContainer = exports.Title = exports.LegendTitleAndFormatedValueContainer = exports.LegendTitle = exports.LegendFormattedValue = exports.LegendFormatedValueContainer = exports.LegendControlsContainer = exports.LegendContainer = exports.LegendColorRectangle = exports.FormattedValue = exports.
|
|
7
|
+
exports.TooltipLabel = exports.TooltipDiv = exports.TitleAndValueContainer = exports.Title = exports.LegendTitleAndFormatedValueContainer = exports.LegendTitle = exports.LegendFormattedValue = exports.LegendFormatedValueContainer = exports.LegendControlsContainer = exports.LegendContainer = exports.LegendColorRectangle = exports.FormattedValue = exports.DoughnutChartContainer = exports.DoughnutChartAndLegendContainer = exports.CurrencySignAndFormattedValueContainer = exports.CurrencySign = exports.ControlsContainer = exports.Controls = void 0;
|
|
8
8
|
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/taggedTemplateLiteral"));
|
|
9
9
|
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
10
10
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14, _templateObject15, _templateObject16, _templateObject17, _templateObject18;
|
|
@@ -19,7 +19,7 @@ const CurrencySignAndFormattedValueContainer = exports.CurrencySignAndFormattedV
|
|
|
19
19
|
const CurrencySign = exports.CurrencySign = _styledComponents.default.span(_templateObject8 || (_templateObject8 = (0, _taggedTemplateLiteral2.default)(["\n font-weight: 500;\n font-size: 16px;\n @media (max-width: 1536px) {\n font-size: 14px;\n }\n @media (max-width: 1366px) {\n font-size: 11px;\n }\n"])));
|
|
20
20
|
const FormattedValue = exports.FormattedValue = _styledComponents.default.div(_templateObject9 || (_templateObject9 = (0, _taggedTemplateLiteral2.default)(["\n font-weight: 500;\n font-size: 40px;\n @media (max-width: 1536px) {\n font-size: 24px;\n } \n @media (max-width: 1366px) {\n font-size: 20px;\n }\n"])));
|
|
21
21
|
const DoughnutChartAndLegendContainer = exports.DoughnutChartAndLegendContainer = _styledComponents.default.div(_templateObject10 || (_templateObject10 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n justify-content: space-between;\n margin-top: auto;\n padding: 0 20px;\n"])));
|
|
22
|
-
const
|
|
22
|
+
const DoughnutChartContainer = exports.DoughnutChartContainer = _styledComponents.default.div(_templateObject11 || (_templateObject11 = (0, _taggedTemplateLiteral2.default)(["\n //display: flex;\n //align-items: center;\n //position: relative; \n min-width: 45%;\n flex-basis: 45%;\n min-height: 6rem;\n"])));
|
|
23
23
|
const LegendContainer = exports.LegendContainer = _styledComponents.default.div(_templateObject12 || (_templateObject12 = (0, _taggedTemplateLiteral2.default)(["\n padding-left: 10px;\n display: flex;\n flex-direction: column;\n justify-content: space-evenly;\n"])));
|
|
24
24
|
const LegendControlsContainer = exports.LegendControlsContainer = _styledComponents.default.div(_templateObject13 || (_templateObject13 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n gap: 0.5rem;\n align-items: center;\n margin-bottom: 0.375rem;\n"])));
|
|
25
25
|
const LegendTitleAndFormatedValueContainer = exports.LegendTitleAndFormatedValueContainer = _styledComponents.default.div(_templateObject14 || (_templateObject14 = (0, _taggedTemplateLiteral2.default)(["\n flex-grow: 1;\n"])));
|