sag_components 1.0.655 → 1.0.657

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 = '';
@@ -114,7 +115,7 @@ const BarChart = props => {
114
115
  dy: "30",
115
116
  fontSize: 14,
116
117
  fontWeight: 400
117
- }, retailerData[0].period)));
118
+ }, retailerData[0].date)));
118
119
  }
119
120
  return null;
120
121
  }
@@ -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,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sag_components",
3
- "version": "1.0.655",
3
+ "version": "1.0.657",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {