Преглед изворни кода

fix: prevent negative cost values and improve label visibility in evals chart (#7830)

Co-authored-by: Roo Code <[email protected]>
roomote[bot] пре 3 месеци
родитељ
комит
48d592f433
1 измењених фајлова са 2 додато и 2 уклоњено
  1. 2 2
      apps/web-roo-code/src/app/evals/plot.tsx

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

@@ -175,13 +175,13 @@ export const Plot = ({ tableData }: PlotProps) => {
 		<>
 			<div className="pt-4 pb-8 font-mono">Cost x Score</div>
 			<ChartContainer config={chartConfig} className="h-[500px] w-full">
-				<ScatterChart margin={{ top: 0, right: 0, bottom: 0, left: 20 }}>
+				<ScatterChart margin={{ top: 20, right: 0, bottom: 0, left: 20 }}>
 					<XAxis
 						type="number"
 						dataKey="cost"
 						name="Cost"
 						domain={[
-							(dataMin: number) => Math.round((dataMin - 5) / 5) * 5,
+							(dataMin: number) => Math.max(0, Math.round((dataMin - 5) / 5) * 5),
 							(dataMax: number) => Math.round((dataMax + 5) / 5) * 5,
 						]}
 						tickFormatter={(value) => formatCurrency(value)}