@widergy/energy-ui 3.162.1 → 3.163.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.163.0](https://github.com/widergy/energy-ui/compare/v3.162.1...v3.163.0) (2026-06-08)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* [CX-2600] add barPaddingOuter prop to UTBarChart ([#814](https://github.com/widergy/energy-ui/issues/814)) ([a7028cf](https://github.com/widergy/energy-ui/commit/a7028cf576d911e7ab7569045d0a4a85c74f3d36))
|
|
7
|
+
|
|
1
8
|
## [3.162.1](https://github.com/widergy/energy-ui/compare/v3.162.0...v3.162.1) (2026-06-08)
|
|
2
9
|
|
|
3
10
|
|
|
@@ -34,6 +34,7 @@ const UTBarChart = _ref => {
|
|
|
34
34
|
barBorderRadius,
|
|
35
35
|
barData,
|
|
36
36
|
barPadding,
|
|
37
|
+
barPaddingOuter,
|
|
37
38
|
buttonProps,
|
|
38
39
|
center,
|
|
39
40
|
classes: theme,
|
|
@@ -140,7 +141,7 @@ const UTBarChart = _ref => {
|
|
|
140
141
|
const maxAbsoluteValue = Math.max(linearUpperBound, barUpperBound);
|
|
141
142
|
const barMaxValue = singleYAxis ? maxAbsoluteValue : barUpperBound;
|
|
142
143
|
const yAxis = d3.scaleLinear().domain([barLowerBound, barMaxValue]).range([GRAPH_Y_START, GRAPH_Y_END]);
|
|
143
|
-
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]).
|
|
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]).paddingInner(barPadding).paddingOuter(barPaddingOuter !== null && barPaddingOuter !== void 0 ? barPaddingOuter : barPadding);
|
|
144
145
|
const groupWidth = fullSizeBars ? GRAPH_X_END : xAxis.bandwidth();
|
|
145
146
|
const xSubAxis = d3.scaleBand().domain(d3.range(groups)).range([0, groupWidth]).padding(barPadding);
|
|
146
147
|
const barWidth = xSubAxis.bandwidth();
|
|
@@ -315,6 +316,7 @@ UTBarChart.propTypes = {
|
|
|
315
316
|
barBorderRadius: _propTypes.number,
|
|
316
317
|
barData: _types.barDataType,
|
|
317
318
|
barPadding: _propTypes.number,
|
|
319
|
+
barPaddingOuter: _propTypes.number,
|
|
318
320
|
buttonProps: _types.buttonPropsTypes,
|
|
319
321
|
center: _propTypes.bool,
|
|
320
322
|
classes: _commonTypes.classesType,
|
|
@@ -26,6 +26,7 @@ const UTBarChart = _ref => {
|
|
|
26
26
|
barBorderRadius,
|
|
27
27
|
barData,
|
|
28
28
|
barPadding,
|
|
29
|
+
barPaddingOuter,
|
|
29
30
|
buttonProps,
|
|
30
31
|
center,
|
|
31
32
|
classes: theme,
|
|
@@ -132,7 +133,7 @@ const UTBarChart = _ref => {
|
|
|
132
133
|
const maxAbsoluteValue = Math.max(linearUpperBound, barUpperBound);
|
|
133
134
|
const barMaxValue = singleYAxis ? maxAbsoluteValue : barUpperBound;
|
|
134
135
|
const yAxis = d3.scaleLinear().domain([barLowerBound, barMaxValue]).range([GRAPH_Y_START, GRAPH_Y_END]);
|
|
135
|
-
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]).
|
|
136
|
+
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]).paddingInner(barPadding).paddingOuter(barPaddingOuter !== null && barPaddingOuter !== void 0 ? barPaddingOuter : barPadding);
|
|
136
137
|
const groupWidth = fullSizeBars ? GRAPH_X_END : xAxis.bandwidth();
|
|
137
138
|
const xSubAxis = d3.scaleBand().domain(d3.range(groups)).range([0, groupWidth]).padding(barPadding);
|
|
138
139
|
const barWidth = xSubAxis.bandwidth();
|
|
@@ -307,6 +308,7 @@ UTBarChart.propTypes = {
|
|
|
307
308
|
barBorderRadius: number,
|
|
308
309
|
barData: barDataType,
|
|
309
310
|
barPadding: number,
|
|
311
|
+
barPaddingOuter: number,
|
|
310
312
|
buttonProps: buttonPropsTypes,
|
|
311
313
|
center: bool,
|
|
312
314
|
classes: classesType,
|