Skip to content

Compare chart: axes leave their metric's range and tick labels repeat or change format within an axis #390

Description

@harenome

Priority

medium. The chart module of the backend (app/nullius/charts.py) that Compare's Chart view draws from, and the tick formats Compare gives it (app/web/compare.py).

Components

  • app/nullius (backend)
  • app/web (routes)
  • templates and static files
  • docs and the site
  • catalogue (benchmarks, agents, capabilities)
  • the standard (ports, kits, relay, runs)
  • CI, workflows and skills

Evidence

Compare, Chart view, a scatter of cost against adjusted rate on two runs that both score 0 and cost 0: the y axis runs from -100% to 100% and the x axis from $-1.0000 to $1.00, with mixed formats ($-1.0000, 0, $1.00). Neither value can be negative.

Cause: nice_ticks pads both ways when lo == hi (app/nullius/charts.py, lines 119-121). _ticks_for clamps an all-zero range to [0, 1] only when with_zero is set (lines 150-154), and the scatter calls it with False (lines 255-256).

More tick labels on main:

Chart Values Ticks
Dots, Run wall time about 5 s and 6 s 5s 5s 5s 5s 6s 6s
Dots, cost $0.01, $0.03 $0.01 $0.01 $0.02 $0.03 $0.03
Dots, cost $0.02 $0.02 five times
Dots, tokens 1000, 1100 1.0k 1.0k 1.1k 1.1k 1.1k
Dots, minutes 1, 3 1m 2m 2m 2m 3m
Dots, score 0.001, 0.004 0.00 four times
Bars, cost $0.01 0 $0.0025 $0.0050 $0.0075 $0.01
Bars, tokens 1000 0 250 500 750 1.0k
Bars, tokens 1,000,000 0 250.0k 500.0k 750.0k 1.00M
Bars, minutes 2 0 30s 1m 2m 2m (1.5 shown as 2m)
Dots, rate 100%, 100% 90% 100% 110%
Bars, cost and rate $0.50; 50% origin 0 beside $0.20; 0 beside 20%

Cause: each tick is written by the value's own formatter, which picks its unit and decimals per value, and _tick writes the origin as a bare 0. Ranges are padded without the metric's bounds.

Screenshot

6-scatter-all-zero-1280

Reproduction

  1. Compare two runs whose cost and adjusted rate are both 0 (two nop runs).
  2. Chart view, a scatter of Cost against Adjusted rate.
  3. Compare two runs that both solve every task, with costs $0.01 and $0.03: dots of Adjusted rate, then of Cost.

Expected

An axis stays within what its metric can take, and writes every tick in one format, each label its own.

Acceptance

  • An axis whose values are all 0 starts at 0 and has no negative tick, in every chart kind.
  • A rate axis stays within 0% and 100%; one value at a bound pads inwards only.
  • Every tick label on one axis is distinct.
  • The ticks of one axis share one unit and, apart from the origin, one number of decimals.
  • The origin tick keeps the axis's unit ($0, 0k, 0%, 0m) and may drop trailing decimals, never a bare 0 beside a unit.
  • A rate or token axis uses the fewest decimals that keep its labels distinct and exact (90% 95% 100%).
  • A table test over bars, dots and scatter and each unit covers the cases above.

Dependencies and related

The chart view came with #218.

Activity

  1. added
    bug
    P2
    on Nov 24, 2026
  2. added theissue type on Nov 24, 2026
  3. changed the title [-]Compare chart: an axis whose values are all 0 runs into negative numbers[/-] [+]Compare chart: axes leave their metric's range and tick labels repeat or change format within an axis[/+] on Nov 24, 2026
  4. added a commit that references this issue on Nov 24, 2026
    e3bc760
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2bug

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions