Skip to content

feat(ui): redo tx trend chart in dashboard sparkline style (rants 2026-08-24T10:51:57) - #136

Merged
argszero merged 1 commit into
mainfrom
feat/tx-trend-sparkline
Aug 24, 2026
Merged

feat(ui): redo tx trend chart in dashboard sparkline style (rants 2026-08-24T10:51:57)#136
argszero merged 1 commit into
mainfrom
feat/tx-trend-sparkline

Conversation

@argszero

Copy link
Copy Markdown
Owner

Summary

Redo the transactions-page "点数趋势" (points trend) chart in the style of the dashboard "本月点数变化" sparkline (host rants 2026-08-24T10:51:57.821209 + 2026-08-24T10:51:57.821928).

Fixes per rant 10:51:57.821209:

  • Gradient area fill: 0.35 opacity at top fading to 0 at bottom (was 0.22 — rendered like a solid black block)
  • Continuous smooth curve only — removed the hollow data-point circles that created visible gaps / jagged edges at inflection points
  • Removed the dashed grid lines + heavy axis ticks (visual noise); minimal coordinates now: just top/bottom value labels
  • Colors unified to the theme teal family: expense uses the teal accent (was danger red — the complaint), income ok-green, net accent-text, tokens warn
  • Compact X-axis labels and legend

Fixes per rant 10:51:57.821928:

  • viewBox height 190 → 85 (more than halved), tighter paddings, axis font 10px → 9px, legend 12px → 11px

Kept (per both rants):

  • Metric switcher: 消费点数/收入点数/净变化/Token 用量, default 消费点数
  • Hover tooltip + vertical guide line
  • Elegant degradation: no dots regardless of point count

All changes are frontend-only (renderTxTrend + .tx-trend* CSS + cache-bust).

Related Issue

Host rants 2026-08-24T10:51:57.821209 (sparkline-style redo) and 2026-08-24T10:51:57.821928 (height halving). No GitHub issue.

Tests

  • cargo test all pass (146/146)
  • cargo fmt --check pass
  • cargo clippy --all-targets -- -D warnings pass
  • node --check on modified JS

Checklist

  • Branch naming follows convention (feat/tx-trend-sparkline)
  • Conventional Commits
  • Single responsibility, minimal change

…6-08-24T10:51:57)
Redo the transactions page points-trend chart to match the dashboard
'本月点数变化' sparkline (host rants 10:51:57.821209 + 10:51:57.821928):
- Gradient area fill: 0.35 opacity at top fading to 0 (was 0.22, looked like
a solid block)
- Continuous smooth curve only — removed the hollow data-point circles that
created visible gaps/jagged edges at inflection points
- Removed the dashed grid lines and heavy axis ticks; minimal coordinates
(top/bottom value labels only)
- Theme colors: expense now uses the teal accent (was danger red), income ok
green, net accent-text, tokens warn
- Compact height: viewBox 190 -> 85 (half) with tighter padding, smaller
axis font (9px) and compact legend
- Kept metric switcher (expense/income/net/tokens, default expense) and the
hover tooltip + guide line
- cache-bust 20260824-4
@argszero
argszero merged commit 43cbc90 into mainAug 24, 2026
1 check passed
@argszero
argszero deleted the feat/tx-trend-sparkline branch August 24, 2026 04:06
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

@argszero