@widergy/utilitygo-smart-bill-web 3.24.0 → 3.24.1

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.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ ## [3.24.1](https://github.com/widergy/UtilityGO-Smart-Bill-Web/compare/v3.24.0...v3.24.1) (2026-03-12)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * bar height ([#85](https://github.com/widergy/UtilityGO-Smart-Bill-Web/issues/85)) ([1be07f3](https://github.com/widergy/UtilityGO-Smart-Bill-Web/commit/1be07f3d6044a38b13712dbc7d11c049919f5296))
7
+
1
8
  # [3.24.0](https://github.com/widergy/UtilityGO-Smart-Bill-Web/compare/v3.23.0...v3.24.0) (2026-03-11)
2
9
 
3
10
 
@@ -3,7 +3,6 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.SCALE_FACTOR = exports.MIN_HEIGHT = exports.MAX_HEIGHT = void 0;
6
+ exports.MIN_HEIGHT = exports.MAX_HEIGHT = void 0;
7
7
  const MIN_HEIGHT = exports.MIN_HEIGHT = 8;
8
- const MAX_HEIGHT = exports.MAX_HEIGHT = 160;
9
- const SCALE_FACTOR = exports.SCALE_FACTOR = 6;
8
+ const MAX_HEIGHT = exports.MAX_HEIGHT = 160;
@@ -14,9 +14,11 @@ _dayjs.default.locale('es');
14
14
  const getMaxValue = consumptionData => Math.max(...consumptionData.map(d => d?.consumptions?.[0]?.value || 0));
15
15
  exports.getMaxValue = getMaxValue;
16
16
  const getBarHeight = (maxValue, value) => {
17
- const adjustedValue = value ** _constants.SCALE_FACTOR;
18
- const adjustedMax = maxValue ** _constants.SCALE_FACTOR;
19
- return _constants.MIN_HEIGHT + adjustedValue / adjustedMax * (_constants.MAX_HEIGHT - _constants.MIN_HEIGHT);
17
+ if (!maxValue || maxValue === 0) return _constants.MIN_HEIGHT;
18
+ if (!value || value === 0) return _constants.MIN_HEIGHT;
19
+ const proportion = value / maxValue;
20
+ const rawHeight = proportion * _constants.MAX_HEIGHT;
21
+ return Math.max(rawHeight, _constants.MIN_HEIGHT);
20
22
  };
21
23
  exports.getBarHeight = getBarHeight;
22
24
  const getPeriod = function () {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@widergy/utilitygo-smart-bill-web",
3
- "version": "3.24.0",
3
+ "version": "3.24.1",
4
4
  "description": "UtilityGO SmartBill Web",
5
5
  "license": "MIT",
6
6
  "main": "dist/index.js",