Skip to content

Commit ddc1f3d

Browse files
roomote[bot]roomote
authored andcommitted
fix: prevent negative cost values and improve label visibility in evals chart (#7830)
Co-authored-by: Roo Code <[email protected]>
1 parent 0454dad commit ddc1f3d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

apps/web-roo-code/src/app/evals/plot.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -175,13 +175,13 @@ export const Plot = ({ tableData }: PlotProps) => {
175175
<>
176176
<div className="pt-4 pb-8 font-mono">Cost x Score</div>
177177
<ChartContainer config={chartConfig} className="h-[500px] w-full">
178-
<ScatterChart margin={{ top: 0, right: 0, bottom: 0, left: 20 }}>
178+
<ScatterChart margin={{ top: 20, right: 0, bottom: 0, left: 20 }}>
179179
<XAxis
180180
type="number"
181181
dataKey="cost"
182182
name="Cost"
183183
domain={[
184-
(dataMin: number) => Math.round((dataMin - 5) / 5) * 5,
184+
(dataMin: number) => Math.max(0, Math.round((dataMin - 5) / 5) * 5),
185185
(dataMax: number) => Math.round((dataMax + 5) / 5) * 5,
186186
]}
187187
tickFormatter={(value) => formatCurrency(value)}

0 commit comments

Comments
 (0)