sag_components 1.0.519 → 1.0.520
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.
|
@@ -40,9 +40,16 @@ const TotalDoughnutChart = props => {
|
|
|
40
40
|
return;
|
|
41
41
|
}
|
|
42
42
|
let {
|
|
43
|
-
|
|
43
|
+
offsetWidth,
|
|
44
|
+
offsetHeight
|
|
44
45
|
} = DoughnutChartContainerRef === null || DoughnutChartContainerRef === void 0 ? void 0 : DoughnutChartContainerRef.current;
|
|
45
|
-
|
|
46
|
+
offsetWidth = offsetWidth / 3;
|
|
47
|
+
offsetHeight = offsetHeight / 3;
|
|
48
|
+
console.log("DoughnutChartContainerRef 2", offsetWidth, offsetHeight);
|
|
49
|
+
const {
|
|
50
|
+
current
|
|
51
|
+
} = DoughnutChartContainerRef;
|
|
52
|
+
console.log("DoughnutChartContainerRef 3", current);
|
|
46
53
|
|
|
47
54
|
// console.log(
|
|
48
55
|
// "DoughnutChartContainerRef 3",
|
|
@@ -66,7 +73,7 @@ const TotalDoughnutChart = props => {
|
|
|
66
73
|
console.log("DoughnutChartContainerRef 5", DoughnutChartContainerWidth, DoughnutChartContainerHeight);
|
|
67
74
|
const radius = DoughnutChartContainerWidth > DoughnutChartContainerHeight ? DoughnutChartContainerHeight / 2 : DoughnutChartContainerWidth / 2;
|
|
68
75
|
setDoughnutChartRadius(radius);
|
|
69
|
-
}, [height, width
|
|
76
|
+
}, [height, width]);
|
|
70
77
|
|
|
71
78
|
// useEffect(() => {
|
|
72
79
|
// console.log("DoughnutChartContainerRef 1", DoughnutChartContainerRef);
|
|
@@ -122,7 +129,8 @@ const TotalDoughnutChart = props => {
|
|
|
122
129
|
id: "ControlsContainer",
|
|
123
130
|
height: height,
|
|
124
131
|
width: width,
|
|
125
|
-
textcolor: textcolor
|
|
132
|
+
textcolor: textcolor,
|
|
133
|
+
ref: DoughnutChartContainerRef
|
|
126
134
|
}, (legendData === null || legendData === void 0 ? void 0 : legendData.length) > 0 ? /*#__PURE__*/_react.default.createElement(_TotalDoughnutChart.Controls, {
|
|
127
135
|
id: "Controls",
|
|
128
136
|
height: height,
|
|
@@ -145,9 +153,7 @@ const TotalDoughnutChart = props => {
|
|
|
145
153
|
id: "DoughnutChart",
|
|
146
154
|
width: width,
|
|
147
155
|
height: height
|
|
148
|
-
}, /*#__PURE__*/_react.default.createElement(_recharts.ResponsiveContainer, {
|
|
149
|
-
ref: DoughnutChartContainerRef
|
|
150
|
-
}, /*#__PURE__*/_react.default.createElement(_recharts.PieChart, null, /*#__PURE__*/_react.default.createElement(_recharts.Pie, {
|
|
156
|
+
}, /*#__PURE__*/_react.default.createElement(_recharts.ResponsiveContainer, null, /*#__PURE__*/_react.default.createElement(_recharts.PieChart, null, /*#__PURE__*/_react.default.createElement(_recharts.Pie, {
|
|
151
157
|
fill: "#8884d8",
|
|
152
158
|
dataKey: "value",
|
|
153
159
|
blendStroke: true,
|