From 6fdd701a849dcd8ae9a3619f26b552bf4ef0975f Mon Sep 17 00:00:00 2001 From: maziggy Date: Mon, 13 Jul 2026 16:06:59 +0200 Subject: [PATCH] fix(repo-stats): plot ghcr pulls on a linear axis so the trend is visible The ghcr pulls chart used a symlog y axis with a hardcoded tick list, both copied from github-repo-stats, which builds the rest of the report. Those settings suit views and clones - small, spiky, frequently zero - but not container pulls, which sit in a tight band far above zero. Consequences on the published report: the series (7,946 to 16,160) lives entirely inside the top decade of the log scale, so a 2x swing rendered as a 14px wobble on a 200px chart and read as a flat line. Of the nine fixed ticks, six were squashed against the baseline and 50000 fell outside the domain and never drew, leaving a single usable gridline. Switch to a linear scale, drop the fixed ticks so Vega derives them from the actual domain, and format labels with SI prefixes (5k / 10k / 15k). The zero baseline and the 10% headroom are unchanged, so the axis stays honest; the same swing now spans 92px and the growth from ~9k to ~15k pulls/day is legible. --- .github/scripts/ghcr_inject.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/scripts/ghcr_inject.py b/.github/scripts/ghcr_inject.py index ad7413a41..e5e38431d 100644 --- a/.github/scripts/ghcr_inject.py +++ b/.github/scripts/ghcr_inject.py @@ -181,11 +181,13 @@ def build_vega_spec(series: dict[str, int]) -> dict: "type": "temporal", }, "y": { - "axis": {"values": [1, 10, 50, 100, 500, 1000, 5000, 10000, 50000]}, + # Linear, not symlog: pulls sit in a tight band far above zero, so a log-ish + # axis squeezes the whole series into its top decade and flattens the line. + "axis": {"format": "~s"}, "field": "daily_count", "scale": { "domain": [0, y_max * 1.1 if y_max > 0 else 1], - "type": "symlog", + "type": "linear", "zero": True, }, "title": "container pulls per day",