feat(market): optional price-trend sparkline per portfolio group

Add a per-group "Sparkline" toggle (live-market bases only, like 24h). When on,
the group card draws a faint price-trend line in its lower band — the group's
value tracks the DRGX price, so it plots the market price_history (normalized),
colored green/red by overall direction. Behind the text so amounts stay
readable. The editor's live preview reflects it too.

Persisted as show_sparkline in settings.json; wired through PortfolioEntry +
the editor working state + the pfDrawSparkline() helper shared by card+preview.

Full-node + Lite build clean; ctest 1/1; hygiene clean. Rendering change —
needs a screenshot check.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-07-03 01:15:23 -05:00
parent b0ded528b1
commit b26aff392b
4 changed files with 51 additions and 0 deletions

View File

@@ -1134,6 +1134,7 @@ void I18n::loadBuiltinEnglish()
strings_["portfolio_show"] = "Show:";
strings_["portfolio_show_value"] = "Value";
strings_["portfolio_show_24h"] = "24h";
strings_["portfolio_show_sparkline"] = "Sparkline";
strings_["portfolio_appearance"] = "APPEARANCE";
strings_["portfolio_addresses_hdr"] = "ADDRESSES";
strings_["portfolio_search"] = "Search addresses\xE2\x80\xA6";