feat(ui): trend chart polish + metric switcher (rant 2026-08-23T16:17:18) - #133
Merged
Conversation
…:18) - Metric switcher (Spend/Income/Net/Tokens, default Spend) with delegated click binding - Smooth Catmull-Rom line, gradient area fill, per-metric theme colors - Adaptive nice-scale axis (1/2/5x10^n; symmetric zero-axis for Net) - Hover tooltip + guide line (replaces <title>), dashed grid, legend total - i18n keys zh+en, cache-bust 20260824-1
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 freeto 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
Polish the transaction-page trend chart and add a metric switcher (host rant
2026-08-23T16:17:18):Requirement 1 — chart aesthetics:
<title>)Requirement 2 — selectable metric:
/api/transactions/trendalready returns all metrics)Related Issue
Host rant
2026-08-23T16:17:18(trend chart polish + metric switcher) — no GitHub issue.Changes
ui/js/app.js:renderTxTrendrewrite (switcher, smooth path, gradient area, adaptive scale, tooltip context) + delegated click/mousemove/mouseleave bindings +txTrendMetricstateui/css/style.css: switcher, chart wrapper, guide line, tooltip, gradient stops, per-metric colorsui/js/i18n.js: zh/en keystx.trend.metric.*ui/index.html: cache-bust20260823-3→20260824-1Tests
cargo testall pass (146/146)cargo fmt --checkpasscargo clippy --all-targets -- -D warningspass (no new warnings)node --checkonapp.js/i18n.jsChecklist
feat/trend-chart-polish)