Skip to content

Add percentage change dashboard widgets#5581

Open
weezy-git-it wants to merge 1 commit intoportfolio-performance:masterfrom
weezy-git-it:feature/percentage-change-widgets
Open

Add percentage change dashboard widgets#5581
weezy-git-it wants to merge 1 commit intoportfolio-performance:masterfrom
weezy-git-it:feature/percentage-change-widgets

Conversation

@weezy-git-it
Copy link

Summary

  • Percentage Change widget (Statement of Assets category): Shows the percentage change of total assets for the selected reporting period, comparing end value to start value. Calculation: (end - start) / start × 100.

  • Earnings Percentage Change YoY widget (Earnings category): Shows the year-over-year percentage change of earnings. Users can filter by earning type (dividends, interest, or both) via the context menu.

Both widgets support the standard reporting period and data series configuration via context menu.

Changes

  • WidgetFactory.java: Added PERCENTAGE_CHANGE and EARNINGS_PERCENTAGE_CHANGE_YOY widget definitions with helper methods readEarningType() and sumEarnings()
  • EarningType.java / EarningTypeConfig.java: Changed visibility from package-private to public for reuse from WidgetFactory
  • Messages.java, messages.properties, messages_de.properties: Added labels for both widgets

Test plan

  • Add "Percentage Change" widget from Statement of Assets category to dashboard
  • Verify it shows correct percentage for different reporting periods (1 month, 1 year, etc.)
  • Add "Earnings Percentage Change YoY" widget from Earnings category to dashboard
  • Verify it compares earnings to the same period one year ago
  • Test earning type filter: dividends only, interest only, both
  • Test edge cases: portfolio younger than 1 year, no dividends in comparison period

🤖 Generated with Claude Code

Add two new dashboard widgets:

1. Percentage Change (Statement of Assets category): Shows the
   percentage change of total assets for a selectable reporting period,
   comparing the end value to the start value.

2. Earnings Percentage Change YoY (Earnings category): Shows the
   year-over-year percentage change of earnings. Supports filtering
   by earning type (dividends, interest, or both) via context menu.

Both widgets integrate with the existing reporting period and data
series configuration. Made EarningType and EarningTypeConfig public
to allow reuse from WidgetFactory.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@weezy-git-it
Copy link
Author

Screenshots:

EN-1-contextmenu-statementofassets-insert_widget EN-2-contextmenu-earnings-insert_widget EN-3-contextmenu-assets-reporting_period EN-4-contextmenu-earnings-source EN-5-dashboard-with-widgets DE-1-Kontextmenue-Vermoegen-Widget_einfuegen DE-2-Kontextmenue-Ertraege-Widget_einfuegen DE-3-Kontextmenue-Vermoegen-Zeitraum DE-4-Kontextmenue-Ertraege-Quellen DE-5-Dashboard-mit-Widgets

Sign up for free to 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