History graph: show down status in red instead of green

This commit is contained in:
nmemmert committed 2025-12-15 12:04:15 -05:00
1 parent 63bdc6c91c
commit c5027b339b
7 files changed
+22 -8

No files matched your search

+14
View File
@@ -166,6 +166,20 @@ function History() {
name="Status"
opacity={0.5}
isAnimationActive={false}
shape={(props) => {
const { x, y, width, height, payload } = props;
const color = payload.status === 'up' ? '#4caf50' : '#f44336';
return (
<rect
x={x}
y={y}
width={width}
height={height}
fill={color}
opacity={0.5}
/>
);
}}
/>
</ComposedChart>
</ResponsiveContainer>