sag_components 1.0.654 → 1.0.656

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.
@@ -30,21 +30,22 @@ const BarChart = props => {
30
30
  showLegend,
31
31
  legendData
32
32
  } = props;
33
- const [BarChartContainerWidth, setBarChartContainerWidth] = (0, _react.useState)(0);
34
- const [BarChartContainerHeight, setBarChartContainerHeight] = (0, _react.useState)(0);
33
+
34
+ // const [BarChartContainerWidth, setBarChartContainerWidth] = useState(0);
35
+ // const [BarChartContainerHeight, setBarChartContainerHeight] = useState(0);
36
+
35
37
  const controlsContainerRef = (0, _react.useRef)();
36
- (0, _react.useEffect)(() => {
37
- const {
38
- offsetWidth
39
- } = controlsContainerRef.current;
40
- setBarChartContainerWidth(offsetWidth - 20);
41
- }, [width]);
42
- (0, _react.useEffect)(() => {
43
- const {
44
- offsetHeight
45
- } = controlsContainerRef.current;
46
- setBarChartContainerHeight(offsetHeight - 40);
47
- }, [height]);
38
+
39
+ // useEffect(() => {
40
+ // const { offsetWidth } = controlsContainerRef.current;
41
+ // setBarChartContainerWidth(offsetWidth - 20);
42
+ // }, [width]);
43
+
44
+ // useEffect(() => {
45
+ // const { offsetHeight } = controlsContainerRef.current;
46
+ // setBarChartContainerHeight(offsetHeight - 40);
47
+ // }, [height]);
48
+
48
49
  const displayFormattedValue = value => {
49
50
  if (!value) return '';
50
51
  let formattedValue = '';
@@ -151,8 +152,8 @@ const BarChart = props => {
151
152
  width: "100%",
152
153
  height: showLegend ? '80%' : '86%'
153
154
  }, /*#__PURE__*/_react.default.createElement(_recharts.BarChart, {
154
- width: BarChartContainerWidth,
155
- height: BarChartContainerHeight,
155
+ width: width,
156
+ height: height,
156
157
  data: barChartData,
157
158
  margin: {
158
159
  top: 20,
@@ -14,6 +14,7 @@ var _Benchmark = require("./Benchmark");
14
14
  const TotalDoughnutChart = props => {
15
15
  var _DoughnutChartContain, _DoughnutChartContain2;
16
16
  const {
17
+ className,
17
18
  title,
18
19
  value,
19
20
  addingBenchmark,
@@ -88,6 +89,7 @@ const TotalDoughnutChart = props => {
88
89
  }
89
90
  }, !isPercent && row.value && currencySign ? (0, _CommonFunctions.getCurrencySign)(currencyType, row.value) : '', !isPercent && row.value ? dotCutTrenty(row) : !isPercent && 'No Data', !isPercent && row.value && dotCut ? (0, _CommonFunctions.getFormattedUnits)(row.value) : '', !isPercent && row.value && itemsPercentagesValueAside && " (".concat(Math.round(row.value / value * 100), "%)"), isPercent && row.value && "".concat(row.value.toFixed(1), "%"));
90
91
  return /*#__PURE__*/_react.default.createElement(_TotalDoughnutChart.ControlsContainer, {
92
+ className: className,
91
93
  id: "ControlsContainer",
92
94
  height: height,
93
95
  width: width,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sag_components",
3
- "version": "1.0.654",
3
+ "version": "1.0.656",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {