sag_components 1.0.957 → 1.0.959

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.
@@ -31,6 +31,7 @@ const BarChartWithAreaChart = props => {
31
31
  barChartData,
32
32
  barSize,
33
33
  barFontSizeValue,
34
+ barChartHeight,
34
35
  signType,
35
36
  width,
36
37
  height,
@@ -176,8 +177,7 @@ const BarChartWithAreaChart = props => {
176
177
  }, /*#__PURE__*/_react.default.createElement(_BarChartWithAreaChart.Controls, {
177
178
  className: "Controls"
178
179
  }, /*#__PURE__*/_react.default.createElement(_BarChartWithAreaChart.Title, null, title), /*#__PURE__*/_react.default.createElement(_recharts.ResponsiveContainer, {
179
- width: "100%",
180
- height: height
180
+ height: barChartHeight
181
181
  }, /*#__PURE__*/_react.default.createElement(_recharts.ComposedChart, {
182
182
  data: barChartData
183
183
  // margin={{
@@ -253,6 +253,7 @@ BarChartWithAreaChart.defaultProps = {
253
253
  width: '100%',
254
254
  height: '100%',
255
255
  barSize: 60,
256
+ barChartHeight: 50,
256
257
  barFontSizeValue: '14px',
257
258
  barChartColor: '#BD9EFF',
258
259
  showLegend: true,
@@ -76,8 +76,8 @@ const SingleBarLineCharts = props => {
76
76
  const currentBarValue = payload[0].payload.barValue;
77
77
  const currentSecondBarValue = payload[0].payload.secondBarValue;
78
78
  const currentRetailer = payload[0].payload.retailer;
79
- const percentageFirstBar = Number(currentBarValue / totalBarValue * 100).toFixed(1);
80
- const percentageSecondBar = Number(currentSecondBarValue / totalSecondBarValue * 100).toFixed(1);
79
+ const percentageFirstBar = Number(Math.abs(currentBarValue) / Math.abs(totalBarValue) * 100).toFixed(1);
80
+ const percentageSecondBar = Number(Math.abs(currentSecondBarValue) / Math.abs(totalSecondBarValue) * 100).toFixed(1);
81
81
  const filteredLegendData = legendData.filter(item => item.iconType === 'Square');
82
82
  return /*#__PURE__*/_react.default.createElement(_SingleBarLineCharts.TooltipDiv, null, /*#__PURE__*/_react.default.createElement(_SingleBarLineCharts.TooltipTitle, null, `${currentRetailer}`), /*#__PURE__*/_react.default.createElement(_SingleBarLineCharts.TooltipLabel, null, `${filteredLegendData[0].title}: ${percentageFirstBar}%`), showSecondBar && /*#__PURE__*/_react.default.createElement(_SingleBarLineCharts.TooltipLabel, null, `${filteredLegendData[1].title}: ${percentageSecondBar}%`));
83
83
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sag_components",
3
- "version": "1.0.957",
3
+ "version": "1.0.959",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {