@centreon/ui 23.10.76 → 23.10.77

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": "23.10.76",
3
+ "version": "23.10.77",
4
4
  "description": "Centreon UI Components",
5
5
  "scripts": {
6
6
  "eslint": "eslint ./src --ext .js,.jsx,.ts,.tsx --max-warnings 0",
@@ -38,7 +38,7 @@ const Axes = ({
38
38
 
39
39
  const [firstUnit, secondUnit, thirdUnit] = getUnits(lines);
40
40
 
41
- const xTickCount = Math.ceil(width / 82);
41
+ const xTickCount = Math.min(Math.ceil(width / 82), 12);
42
42
 
43
43
  const tickFormat =
44
44
  data?.axisX?.xAxisTickFormat ?? getXAxisTickFormat(graphInterval);
@@ -73,22 +73,27 @@ export default memo(RegularLine, (prevProps, nextProps) => {
73
73
  timeSeries: prevTimeSeries,
74
74
  graphHeight: prevGraphHeight,
75
75
  highlight: prevHighlight,
76
- xScale: prevXScale
76
+ xScale: prevXScale,
77
+ yScale: prevYScale
77
78
  } = prevProps;
78
79
  const {
79
80
  timeSeries: nextTimeSeries,
80
81
  graphHeight: nextGraphHeight,
81
82
  highlight: nextHighlight,
82
- xScale: nextXScale
83
+ xScale: nextXScale,
84
+ yScale: nextYScale
83
85
  } = nextProps;
84
86
 
85
87
  const prevXScaleRange = prevXScale.range();
86
88
  const nextXScaleRange = nextXScale.range();
89
+ const prevYScaleDomain = prevYScale.domain();
90
+ const nextYScaleDomain = nextYScale.domain();
87
91
 
88
92
  return (
89
93
  equals(prevTimeSeries, nextTimeSeries) &&
90
94
  equals(prevGraphHeight, nextGraphHeight) &&
91
95
  equals(prevHighlight, nextHighlight) &&
92
- equals(prevXScaleRange, nextXScaleRange)
96
+ equals(prevXScaleRange, nextXScaleRange) &&
97
+ equals(prevYScaleDomain, nextYScaleDomain)
93
98
  );
94
99
  });