commit e6453da3a956d0d51026f77e365a0551c8aec244
parent 6eea00b175eb7bed6c54e1dc56be857354cfeaa9
Author: Brian Graham <brian@buildingbetterteams.de>
Date: Mon, 6 Apr 2026 20:31:53 +0200
Put (n=) count on separate line below model name in box plot
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Diffstat:
1 file changed, 12 insertions(+), 4 deletions(-)
diff --git a/dashboard/src/components/Charts.tsx b/dashboard/src/components/Charts.tsx
@@ -189,7 +189,7 @@ function aggregateByModel(runs: Run[]): BoxPlotData[] {
const stats = computeBoxStats(scores);
const baseModel = model;
return {
- label: `${model} (n=${modelCells.length})`,
+ label: `${model}|(n=${modelCells.length})`,
...stats,
base: stats.q1,
iqr: stats.q3 - stats.q1,
@@ -395,16 +395,24 @@ export default function Charts({ runs }: ChartsProps) {
<div style={{ display: "grid", gridTemplateColumns: "1fr 1fr", gap: "16px" }}>
<div className="card">
<h3 style={{ marginBottom: "16px" }}>Score Distribution by Model</h3>
- <ResponsiveContainer width="100%" height={250}>
+ <ResponsiveContainer width="100%" height={270}>
<ComposedChart data={modelData} barCategoryGap="20%">
<CartesianGrid strokeDasharray="3 3" stroke={SMUI.border} vertical={false} />
<XAxis
dataKey="label"
stroke={SMUI.muted}
- fontSize={11}
- fontFamily="'JetBrains Mono', monospace"
tickLine={false}
axisLine={{ stroke: SMUI.border }}
+ tick={({ x, y, payload }: any) => {
+ const [name, count] = (payload.value as string).split("|");
+ return (
+ <g>
+ <text x={x} y={y + 12} textAnchor="middle" fill={SMUI.muted} fontSize={11} fontFamily="'JetBrains Mono', monospace">{name}</text>
+ <text x={x} y={y + 24} textAnchor="middle" fill={SMUI.muted} fontSize={9} fontFamily="'JetBrains Mono', monospace" opacity={0.6}>{count}</text>
+ </g>
+ );
+ }}
+ height={40}
/>
<YAxis
stroke={SMUI.muted}