Skip to content

Node: show tokens/min values on the throughput chart - #38

Merged
jondeandres merged 1 commit into
mainfrom
throughput-chart-values
Nov 17, 2026
Merged

jondeandres merged 1 commit into
mainfrom
throughput-chart-values

Conversation

@jondeandres

Copy link
Copy Markdown
Contributor

The throughput chart on the Node page had no numbers on it.

Changes

  • Value axis on the left with labels at 0, half and a rounded max (1/2/5 × 10ⁿ, compact format like 2.5K), plus dashed gridlines.
  • Hover tooltip on each bar with the bucket's rate (2,965 tok/min) and its time (22:34, or Mon 18:00 on 1w). Tooltips at the edges are aligned so they don't overflow. Each bar also has an aria-label.
  • Values are now per minute. The backend returns tokens per bucket (2 min / 1 h / 6 h), but the chart is labelled "tokens / min", so each bucket is divided by its width before plotting. Bar heights are scaled to the axis max instead of the busiest bar. The colour ramp still follows each bar's share of the busiest one.

Testing

  • npm run test:unit: new ThroughputChart.test.ts covers perMinute and niceMax
  • npx playwright test tests/node.spec.ts: new spec checks the axis renders and that hovering a bar shows exactly one tok/min tooltip
  • tsc --noEmit passes
  • Checked visually in demo mode (1h / 1d)

Add a value axis (0, half, a rounded max) with gridlines, and a hover
tooltip on each bar with its rate and bucket time. Bars are now plotted
as tokens per minute (bucket total / bucket width), matching the chart's
label, against the rounded axis max.
@jondeandres
jondeandres merged commit 069ddc3 into main Nov 17, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant