fix: better previous on overview

This commit is contained in:
Carl-Gerhard Lindesvärd
2025-10-16 14:34:32 +02:00
parent 56ad8854eb
commit 1187bcac0a
2 changed files with 14 additions and 12 deletions

View File

@@ -36,6 +36,15 @@ export const BarWithBorder = (options: Options) => {
};
};
export const BarShapeGrey = BarWithBorder({
borderHeight: 2,
border: 'rgba(100, 100, 100, 1)',
fill: 'rgba(100, 100, 100, 0.3)',
active: {
border: 'rgba(100, 100, 100, 1)',
fill: 'rgba(100, 100, 100, 0.4)',
},
});
export const BarShapeBlue = BarWithBorder({
borderHeight: 2,
border: 'rgba(59, 121, 255, 1)',

View File

@@ -24,7 +24,7 @@ import {
YAxis,
} from 'recharts';
import { createChartTooltip } from '../charts/chart-tooltip';
import { BarShapeBlue } from '../charts/common-bar';
import { BarShapeBlue, BarShapeGrey } from '../charts/common-bar';
import { useXAxisProps, useYAxisProps } from '../report-chart/common/axis';
import { PreviousDiffIndicatorPure } from '../report-chart/common/previous-diff-indicator';
import { Skeleton } from '../skeleton';
@@ -245,20 +245,13 @@ function Chart({
className="stroke-border"
/>
<Line
<Bar
key={`prev_${activeMetric.key}`}
type="step"
dataKey={`prev_${activeMetric.key}`}
stroke={'var(--border)'}
strokeWidth={2}
isAnimationActive={false}
dot={false}
activeDot={{
stroke: 'var(--foreground)',
fill: 'var(--def-100)',
strokeWidth: 1,
r: 2,
}}
shape={(props: any) => (
<BarShapeGrey isActive={activeBar === props.index} {...props} />
)}
/>
<Bar
key={activeMetric.key}