Repository navigation
feat(ui): dashboard SVG sparklines — daily net + earn trend (v1.18 A) - #48
Merged
Merged
Conversation
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
Rant
2026-08-17T18:06:09(UI/UE 第三轮多角度深化), item A — 仪表盘数据可视化: the dashboard currently shows only plain text; add pure-SVG mini charts (sparklines) with zero external dependencies.Changes
ui/js/app.js:sparkline(values, opts)— hand-written SVG polyline + gradient area fill; per-point<title>for hover (label + formatted value); colors via existing CSS vars (--accent/--ok); unique gradient ids; safe for empty/single/all-zero series;lastDayLabels(n)— last n day labels (MM-DD);dailySeries(days, filter)— daily point aggregation from transactions.--okstroke); empty state preserved when no active listings (no chart drawn)..sparkline { width:100%; height:38px; };docs/user-stories.mdv1.18 changelog adds item A;ui/README.md数据可视化约定 section.Acceptance
Dashboard shows SVG mini charts; hover reveals daily values; zero deps.
Tests
node --checkon app.js — syntax OKcargo test— 1 passedcargo fmt --check— clean