@centreon/ui 23.10.18-MON-17793-create-graph-component-centreon-ui.24 → 23.10.18-MON-17793-create-graph-component-centreon-ui.26

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.18-MON-17793-create-graph-component-centreon-ui.24",
3
+ "version": "23.10.18-MON-17793-create-graph-component-centreon-ui.26",
4
4
  "description": "Centreon UI Components",
5
5
  "scripts": {
6
6
  "eslint": "eslint ./src --ext .js,.jsx,.ts,.tsx --max-warnings 0",
@@ -6,6 +6,9 @@ const useStyles = makeStyles()((theme) => ({
6
6
  '& .visx-axis-tick': {
7
7
  '& .visx-line': {
8
8
  stroke: theme.palette.text.primary
9
+ },
10
+ text: {
11
+ fill: theme.palette.text.primary
9
12
  }
10
13
  }
11
14
  },
@@ -10,11 +10,9 @@ import { GetYAnchorPoint } from './models';
10
10
  import AnchorPoint from '.';
11
11
 
12
12
  interface Props {
13
- areaColor: string;
14
13
  lineColor: string;
15
14
  metric: string;
16
15
  timeSeries: Array<TimeValue>;
17
- transparency: number;
18
16
  xScale: ScaleTime<number, number>;
19
17
  yScale: ScaleLinear<number, number>;
20
18
  }
@@ -36,8 +34,6 @@ const RegularAnchorPoint = ({
36
34
  yScale,
37
35
  metric,
38
36
  timeSeries,
39
- areaColor,
40
- transparency,
41
37
  lineColor
42
38
  }: Props): JSX.Element | null => {
43
39
  const { tickAxisBottom: timeTick } = useTickGraph({
@@ -63,13 +59,7 @@ const RegularAnchorPoint = ({
63
59
  }
64
60
 
65
61
  return (
66
- <AnchorPoint
67
- areaColor={areaColor}
68
- lineColor={lineColor}
69
- transparency={transparency}
70
- x={xAnchorPoint}
71
- y={yAnchorPoint}
72
- />
62
+ <AnchorPoint lineColor={lineColor} x={xAnchorPoint} y={yAnchorPoint} />
73
63
  );
74
64
  };
75
65
 
@@ -10,11 +10,9 @@ import useTickGraph from './useTickGraph';
10
10
  import AnchorPoint from '.';
11
11
 
12
12
  interface Props {
13
- areaColor: string;
14
13
  lineColor: string;
15
14
  stackValues: Array<StackValue>;
16
15
  timeSeries: Array<TimeValue>;
17
- transparency: number;
18
16
  xScale: ScaleTime<number, number>;
19
17
  yScale: ScaleLinear<number, number>;
20
18
  }
@@ -25,8 +23,7 @@ interface GetYAnchorPoint {
25
23
  }
26
24
 
27
25
  const getStackedDates = (stackValues: Array<StackValue>): Array<Date> => {
28
- const toTimeTick = (stackValue: StackValue): string =>
29
- stackValue[2]?.data?.timeTick;
26
+ const toTimeTick = (stackValue): string => stackValue?.data?.timeTick;
30
27
 
31
28
  const toDate = (tick: string): Date => new Date(tick);
32
29
 
@@ -49,8 +46,6 @@ const StackedAnchorPoint = ({
49
46
  yScale,
50
47
  stackValues,
51
48
  timeSeries,
52
- areaColor,
53
- transparency,
54
49
  lineColor
55
50
  }: Props): JSX.Element | null => {
56
51
  const { tickAxisBottom: timeTick } = useTickGraph({
@@ -74,13 +69,7 @@ const StackedAnchorPoint = ({
74
69
  }
75
70
 
76
71
  return (
77
- <AnchorPoint
78
- areaColor={areaColor}
79
- lineColor={lineColor}
80
- transparency={transparency}
81
- x={xAnchorPoint}
82
- y={yAnchorPoint}
83
- />
72
+ <AnchorPoint lineColor={lineColor} x={xAnchorPoint} y={yAnchorPoint} />
84
73
  );
85
74
  };
86
75