Repository navigation
Conversation
… activity chart (@fehmer)
…c scale (@fehmer) The utc scale derives its tick interval from a *preferred* count rather than a hard max, so the previous 55px spacing over-packed the axis to monthly ticks. A preferred count of 8 resolves to the same ~3-month interval chart.js produces with maxTicksLimit: 20 on a dense multi-month history.
fehmer
force-pushed
the
feature/ts-charts-s5-daily-activity
branch
from
November 26, 2026 15:32
449c0f4 to
2b22832
Compare
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.
Summary
The account daily activity chart (per-day minutes bar + average-speed line + trendline) now also renders through TanStack Charts, switched by the dev-only parity flag. The legacy Chart.js half is kept as the
Showfallback until S12.The TanStack definition mirrors the Chart.js datasets:
Parity fixes folded in:
beginAtZeroviaviewport: { domain: [0, max] }, skipped when the data is all-zero — a[0, 0]viewport throws in the library, so an all-zero history must fall back to the fitted scale.count: 8; the utc scale derives its interval from that, resolving to the same ~3-month interval Chart.js'maxTicksLimit: 20produces (a raw pixel spacing over-packed the axis to monthly ticks).strokeDasharray: "2 2"), matching the Chart.js trendline plugin'sdottedstyle.Evidence
pnpm vitest run __tests__/components/pages/account/DailyActivityChart.spec.tsx→ 8 passed (scale bindings,beginAtZeroviewport, all-zero guard, dotted trendline with no band, per-day group-x tooltip, flag switch).pnpm oxlint --type-aware --type-checkclean./account(dev flag on vs Chart.js): minutes bars, average-speed line/dots, trendline, and x-tick density all match; tooltip and theme reactivity verified.Merge Danger
Door: two-way. The whole TanStack path sits behind the dev-only parity flag (
getUseTanstackCharts), which is alwaysfalsein production — production keeps the existing Chart.js chart. Reverting the commit (or flipping the flag off) restores the status quo.Blast Radius: contained — dev-only; the production default (Chart.js) is untouched.