@centreon/ui 26.3.1 → 26.3.2

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@centreon/ui",
3
- "version": "26.3.1",
3
+ "version": "26.3.2",
4
4
  "description": "Centreon UI Components",
5
5
  "scripts": {
6
6
  "update:deps": "pnpx npm-check-updates -i --format group",
@@ -68,6 +68,9 @@ const MemoizedGroup = ({
68
68
  [bar.key]: timeSerie[Number(bar.key)]
69
69
  }));
70
70
 
71
+ const unit = isStackedBar ? bar.key.split('-')[1] : (linesBar as Line).unit;
72
+ const yScale = unit === '' && yScalesPerUnit[unit] === undefined ? yScalesPerUnit[undefined] : yScalesPerUnit[unit];
73
+
71
74
  return isStackedBar ? (
72
75
  <BarStack
73
76
  isStacked
@@ -80,7 +83,7 @@ const MemoizedGroup = ({
80
83
  isTooltipHidden={isTooltipHidden}
81
84
  lines={linesBar as Array<Line>}
82
85
  timeSeries={timeSeriesBar}
83
- yScale={yScalesPerUnit[bar.key.split('-')[1] ?? undefined]}
86
+ yScale={yScale}
84
87
  neutralValue={neutralValue}
85
88
  />
86
89
  ) : (
@@ -94,7 +97,7 @@ const MemoizedGroup = ({
94
97
  isTooltipHidden={isTooltipHidden}
95
98
  lines={[linesBar as Line]}
96
99
  timeSeries={timeSeriesBar}
97
- yScale={yScalesPerUnit[(linesBar as Line).unit ?? undefined]}
100
+ yScale={yScale}
98
101
  neutralValue={neutralValue}
99
102
  />
100
103
  );