Repository navigation
fix(site): label weekly chart buckets by date, not ISO week number - #205
Merged
Merged
Conversation
Weekly buckets are keyed YYYY-Www, and the shared axis/tooltip formatters rendered that as "u17" / "Uke 17 · 2026". Readers want plain dates. Convert weekly labels to the week's Monday date: axis "20. apr" (same style as the daily ticks), tooltip a "28. apr - 04. mai 2026" range. Daily and monthly labels are unchanged. Adds isoWeekMondayUTC (inverse of range.ts isoWeekKey) with roundtrip tests. Affects every chart's 6m/weekly view, all pillars. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Follow-up to #204. The weekly-resolution charts label their x-axis with ISO week numbers (
u16 … u37) and tooltips withUke 17 · 2026. Weekly buckets are keyedYYYY-Www, so the formatters emitted week numbers — but readers want date/month, not week numbers.What
bucket-format.ts: weekly buckets now labelled by the week's Monday date.formatBucketShort):20. apr— same style as daily ticks.formatBucket):28. apr – 04. mai 2026range (clearly a week, still date-based).isoWeekMondayUTC(inverse ofisoWeekKeyinrange.ts), with roundtrip + boundary tests.Verified
pnpm typecheck✓ ·bucket-format.test.ts5/5 ✓ (incl.2026-W17 → 2026-04-20, ISO-week roundtrips across year boundaries). Will confirm on the live chart after deploy.🤖 Generated with Claude Code