sag_components 1.0.1044 → 1.0.1045

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,13 +40,7 @@ const Heatmap = props => {
40
40
  // Function to render Tooltip
41
41
  const renderTooltip = item => {
42
42
  if (tooltip && tooltipPosition && tooltip.label === `${item.label} - ${Math.round(item.value / totalValue * 100)}%`) {
43
- const top = `${tooltipPosition.y}px`;
44
- const left = `${tooltipPosition.x - 10}px`;
45
- return /*#__PURE__*/_react.default.createElement(_Heatmap.TooltipContainer, {
46
- className: "TooltipContainer",
47
- top: top,
48
- left: left
49
- }, item.label, ' ', "-", ' ', /*#__PURE__*/_react.default.createElement("span", null, Math.round(item.value / totalValue * 100), "%"));
43
+ return /*#__PURE__*/_react.default.createElement(_Heatmap.TooltipContainer, null, item.label, ' ', "-", ' ', /*#__PURE__*/_react.default.createElement("span", null, Math.round(item.value / totalValue * 100), "%"));
50
44
  }
51
45
  return null;
52
46
  };
@@ -119,8 +113,6 @@ const Heatmap = props => {
119
113
  className: "BarLabel"
120
114
  }, Math.round(item.value / totalValue * 100), "%")), renderTooltip(item)));
121
115
  }));
122
-
123
- // Function to render the Legend Area
124
116
  const renderLegend = () => /*#__PURE__*/_react.default.createElement(_Heatmap.LegendContainer, {
125
117
  className: "LegendContainer"
126
118
  }, filteredData.map((item, index) =>
@@ -8,19 +8,18 @@ exports.TooltipContainer = exports.TitleContainer = exports.Title = exports.Lege
8
8
  var _styledComponents = _interopRequireDefault(require("styled-components"));
9
9
  var _framerMotion = require("framer-motion");
10
10
  const HeatmapContainer = exports.HeatmapContainer = _styledComponents.default.div`
11
- display: flex;
12
- flex-direction: column;
13
- justify-content: flex-start;
14
- position: relative;
11
+ font-family: "Poppins", sans-serif;
12
+ width: 100%;
13
+ display: flex;
14
+ flex-direction: column;
15
+ justify-content: flex-start;
15
16
  height: ${props => props.height};
16
- width: 100%;
17
- font-family: "Poppins", sans-serif;
18
17
  `;
19
18
  const HeatmapWrapper = exports.HeatmapWrapper = _styledComponents.default.div`
20
19
  display: flex;
21
20
  flex-direction: column;
22
- padding: 20px;
23
- height: ${props => props.height};
21
+ padding: 20px;
22
+ height: ${props => props.height};
24
23
  `;
25
24
  const TitleContainer = exports.TitleContainer = _styledComponents.default.div`
26
25
  display: flex;
@@ -50,9 +49,9 @@ const BarsContainer = exports.BarsContainer = _styledComponents.default.div`
50
49
  height: ${props => props.height};
51
50
  `;
52
51
  const BarWrapper = exports.BarWrapper = _styledComponents.default.div`
52
+ position: relative;
53
53
  display: flex;
54
54
  flex-direction: column;
55
- /* align-items: center; */
56
55
  justify-content: flex-start;
57
56
  align-items: stretch; /* Ensures full vertical stretch */
58
57
  width: ${props => props.width};
@@ -74,11 +73,12 @@ const BarLabel = exports.BarLabel = _styledComponents.default.span`
74
73
  `;
75
74
  const TooltipContainer = exports.TooltipContainer = _styledComponents.default.div`
76
75
  position: absolute;
77
-
78
- top: ${props => props.top};
76
+ /* top: ${props => props.top};
79
77
  left: ${props => props.left};
78
+ inset: auto; */
79
+ top: 10%;
80
+ left: 40%;
80
81
  transition: left 0.8s ease, top 0.8s ease;
81
-
82
82
  background-color: white;
83
83
  box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
84
84
  font-weight: 400;
@@ -87,7 +87,6 @@ const TooltipContainer = exports.TooltipContainer = _styledComponents.default.di
87
87
  padding: 8px 12px;
88
88
  border-radius: 4px;
89
89
  z-index: 10;
90
- font-family: "Poppins", sans-serif;
91
90
  user-select: none;
92
91
 
93
92
  // Make the percentage bold
@@ -111,7 +111,7 @@ const TextAfterValue = exports.TextAfterValue = _styledComponents.default.span`
111
111
  const DoughnutChartAndLegendContainer = exports.DoughnutChartAndLegendContainer = _styledComponents.default.div`
112
112
  display: flex;
113
113
  gap: 2%;
114
- width: 80%;
114
+ width: 86%;
115
115
  min-height: 200px;
116
116
  margin: auto;
117
117
  padding: 0 20px;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sag_components",
3
- "version": "1.0.1044",
3
+ "version": "1.0.1045",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {