@widergy/energy-ui 3.116.1 → 3.117.0
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.117.0](https://github.com/widergy/energy-ui/compare/v3.116.1...v3.117.0) (2025-11-04)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* use level value as max value in chart ([#714](https://github.com/widergy/energy-ui/issues/714)) ([05a823b](https://github.com/widergy/energy-ui/commit/05a823b89c1e849181746d8c95f4ebf557059624))
|
|
7
|
+
|
|
1
8
|
## [3.116.1](https://github.com/widergy/energy-ui/compare/v3.116.0...v3.116.1) (2025-10-30)
|
|
2
9
|
|
|
3
10
|
|
|
@@ -29,7 +29,7 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e
|
|
|
29
29
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
30
30
|
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
31
31
|
const UTBarChart = _ref => {
|
|
32
|
-
var _xAxisDefinition$filt, _formattedData$, _formattedData$2;
|
|
32
|
+
var _xAxisDefinition$filt, _formattedData$, _levels$, _formattedData$2;
|
|
33
33
|
let {
|
|
34
34
|
barBorderRadius,
|
|
35
35
|
barData,
|
|
@@ -137,8 +137,9 @@ const UTBarChart = _ref => {
|
|
|
137
137
|
} = (0, _utils.getGraphAttributes)(containerWidth, containerHeight, marginLeft, marginRight, marginBottom, pagination ? 0 : minBarWidth, ((_formattedData$ = formattedData[0]) === null || _formattedData$ === void 0 ? void 0 : _formattedData$.length) || visibleLabelsCount, barPadding, groups, spacingOptions);
|
|
138
138
|
const [linearLowerBound, linearUpperBound] = (0, _utils.getBounds)(maxLinearValue, yAxisTicks);
|
|
139
139
|
const [barLowerBound, barUpperBound] = (0, _utils.getBounds)(maxBarValue, yAxisTicks, useMaxBarValue);
|
|
140
|
-
const
|
|
141
|
-
const
|
|
140
|
+
const levelValue = (_levels$ = levels[0]) === null || _levels$ === void 0 ? void 0 : _levels$.value;
|
|
141
|
+
const maxAbsoluteValue = levelValue || Math.max(linearUpperBound, barUpperBound);
|
|
142
|
+
const barMaxValue = singleYAxis || levelValue ? maxAbsoluteValue : barUpperBound;
|
|
142
143
|
const yAxis = d3.scaleLinear().domain([barLowerBound, barMaxValue]).range([GRAPH_Y_START, GRAPH_Y_END]);
|
|
143
144
|
const xAxis = d3.scaleBand().domain(d3.range(((_formattedData$2 = formattedData[0]) === null || _formattedData$2 === void 0 ? void 0 : _formattedData$2.length) || (xAxisDefinition === null || xAxisDefinition === void 0 ? void 0 : xAxisDefinition.length) || 0)).range([GRAPH_X_START, GRAPH_X_END]).padding(barPadding);
|
|
144
145
|
const groupWidth = fullSizeBars ? GRAPH_X_END : xAxis.bandwidth();
|