Skip to content

Commit cfc8c5e

Browse files
MVarshinichaitanyaenr
authored andcommitted
CHAOS-1173
Update Recovery Time Visualization to Bar Chart (Expected vs Actual) Signed-off-by: Varshini M <varm@redhat.com>
1 parent 4c12f2e commit cfc8c5e

File tree

1 file changed

+17
-30
lines changed

1 file changed

+17
-30
lines changed

src/components/atoms/PlotGraph/index.jsx

Lines changed: 17 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,8 @@ const PlotGraph = (props) => {
5656
x: podNames,
5757
y: reschedulingTimes,
5858
marker: {
59-
color: "rgba(135, 206, 235, 0.8)",
60-
line: { color: "rgba(135, 206, 235, 1)", width: 1 },
59+
color: "rgba(173, 216, 230, 0.8)",
60+
line: { color: "rgba(173, 216, 230, 1)", width: 1 },
6161
},
6262
hovertemplate:
6363
"<b>%{x}</b><br>" +
@@ -70,54 +70,41 @@ const PlotGraph = (props) => {
7070
x: podNames,
7171
y: readinessTimes,
7272
marker: {
73-
color: "rgba(255, 165, 0, 0.8)",
74-
line: { color: "rgba(255, 165, 0, 1)", width: 1 },
73+
color: "rgba(255, 204, 170, 0.8)",
74+
line: { color: "rgba(255, 204, 170, 1)", width: 1 },
7575
},
7676
hovertemplate:
7777
"<b>%{x}</b><br>" +
7878
"Readiness Time: %{y:.2f}s<br>" +
7979
"<extra></extra>",
8080
},
8181
{
82-
type: "scatter",
83-
mode: "lines+markers",
84-
name: "Total Recovery Time",
82+
type: "bar",
83+
name: "Expected Recovery Time",
8584
x: podNames,
86-
y: totalRecoveryTimes,
87-
line: {
88-
color: "rgba(220, 20, 60, 1)",
89-
width: 3,
90-
dash: "dash",
91-
},
85+
y: expectedRecoveryTimes,
9286
marker: {
93-
color: "rgba(220, 20, 60, 1)",
94-
size: 8,
95-
symbol: "diamond",
87+
color: "rgba(182, 224, 200, 0.8)",
88+
line: { color: "rgba(182, 224, 200, 1)", width: 1 },
9689
},
9790
hovertemplate:
9891
"<b>%{x}</b><br>" +
99-
"Total Recovery Time: %{y:.2f}s<br>" +
92+
"Expected Recovery Time: %{y:.2f}s<br>" +
10093
"<extra></extra>",
10194
},
10295
{
103-
type: "scatter",
104-
mode: "lines+markers",
105-
name: "Expected Recovery Time",
96+
type: "bar",
97+
name: "Total Recovery Time",
10698
x: podNames,
107-
y: expectedRecoveryTimes,
108-
line: {
109-
color: "rgba(34, 139, 34, 1)",
110-
width: 3,
111-
dash: "dot",
112-
},
99+
y: totalRecoveryTimes,
113100
marker: {
114-
color: "rgba(34, 139, 34, 1)",
101+
color: "rgba(209, 196, 233, 1)",
115102
size: 8,
116-
symbol: "circle",
103+
symbol: "diamond",
117104
},
118105
hovertemplate:
119106
"<b>%{x}</b><br>" +
120-
"Expected Recovery Time: %{y:.2f}s<br>" +
107+
"Total Recovery Time: %{y:.2f}s<br>" +
121108
"<extra></extra>",
122109
},
123110
]}
@@ -148,7 +135,7 @@ const PlotGraph = (props) => {
148135
xanchor: "left",
149136
x: 1.02,
150137
},
151-
hovermode: "x unified",
138+
hovermode: "x",
152139
margin: { l: 60, r: 150, t: 80, b: 80 },
153140
plot_bgcolor: "rgba(0,0,0,0)",
154141
paper_bgcolor: "rgba(0,0,0,0)",

0 commit comments

Comments
 (0)