Add Daily Balance mode to ledger Statistics view #52

Open
opened 2026-08-30 09:24:45 +02:00 by Sirttas · 0 comments
Owner

Summary

Add a "Daily Balance" mode to the existing ViewLedgerStatistics.vue, showing the running mark-to-market value (ISK) of a ledger's holdings per day — average value with a highest/lowest band — served by mammon #128 via GET /ledgers/{ledgerId}/balance/daily-valuation. Depends on that endpoint being available.

Scope

  • New generated client method for GET /ledgers/{ledgerId}/balance/daily-valuation (regenerated from mammon's OpenAPI spec once mammon #128 ships, returning date + average/highest/lowest per day); wire it into src/mammon/mammonService.ts alongside profitApi/ledgerApi.
  • Add "Daily Balance" as a third mode in ViewLedgerStatistics.vue, alongside the existing Cash Flow / Margin modes, reusing the same chart.js scaffolding, DualRangeSlider, and IskLabel total.
  • Render Daily Balance as a line + band chart: the average value as the main line, highest/lowest as a shaded band around it (distinct from Cash Flow/Margin's bar+line combo).
  • Move the existing isMain(ledger) gate from the Statistics tab-level v-if (in ViewLedger.vue) down to just the Cash Flow/Margin mode options: the Statistics tab becomes visible for all ledgers (main and combined); Cash Flow/Margin remain main-only; Daily Balance is available for both, since mammon computes the summed value server-side for combined ledgers.

Explicitly out of scope

  • Computing the estimated value itself (mammon #128)

Acceptance criteria

  • Daily Balance mode renders an average line with a highest/lowest band for a main ledger
  • Daily Balance mode also works for a combined ledger
  • Statistics tab is visible for combined ledgers (Cash Flow/Margin options remain hidden there)
  • Tests for the new mode/component

Related

  • Depends on mammon #128
## Summary Add a "Daily Balance" mode to the existing `ViewLedgerStatistics.vue`, showing the running mark-to-market value (ISK) of a ledger's holdings per day — average value with a highest/lowest band — served by `mammon #128` via `GET /ledgers/{ledgerId}/balance/daily-valuation`. Depends on that endpoint being available. ## Scope - New generated client method for `GET /ledgers/{ledgerId}/balance/daily-valuation` (regenerated from mammon's OpenAPI spec once `mammon #128` ships, returning date + average/highest/lowest per day); wire it into `src/mammon/mammonService.ts` alongside `profitApi`/`ledgerApi`. - Add "Daily Balance" as a third mode in `ViewLedgerStatistics.vue`, alongside the existing Cash Flow / Margin modes, reusing the same chart.js scaffolding, `DualRangeSlider`, and `IskLabel` total. - Render Daily Balance as a line + band chart: the average value as the main line, highest/lowest as a shaded band around it (distinct from Cash Flow/Margin's bar+line combo). - Move the existing `isMain(ledger)` gate from the Statistics tab-level `v-if` (in `ViewLedger.vue`) down to just the Cash Flow/Margin mode options: the Statistics tab becomes visible for all ledgers (main and combined); Cash Flow/Margin remain main-only; Daily Balance is available for both, since mammon computes the summed value server-side for combined ledgers. ## Explicitly out of scope - Computing the estimated value itself (`mammon #128`) ## Acceptance criteria - [ ] Daily Balance mode renders an average line with a highest/lowest band for a main ledger - [ ] Daily Balance mode also works for a combined ledger - [ ] Statistics tab is visible for combined ledgers (Cash Flow/Margin options remain hidden there) - [ ] Tests for the new mode/component ## Related - Depends on `mammon #128`
Sirttas added the
Priority
Medium
3
Kind/Feature
Status
To Refine
labels 2026-08-30 09:24:45 +02:00
Sirttas changed title from Display estimated portfolio value per day in ledger view to Add Daily Balance mode to ledger Statistics view 2026-08-30 09:42:57 +02:00
Sirttas removed the
Status
To Refine
label 2026-08-30 09:42:59 +02:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: eveal/gemory#52