FIX networth chart dashboard (#1449)

This commit is contained in:
soky srm
2026-04-12 18:09:03 +02:00
committed by Juan José Mata
parent dd8760372a
commit 6d2d340cf3
2 changed files with 4 additions and 2 deletions

View File

@@ -1,5 +1,5 @@
class Balance::ChartSeriesBuilder
def initialize(account_ids:, currency:, period: Period.last_30_days, interval: "1 day", favorable_direction: "up")
def initialize(account_ids:, currency:, period: Period.last_30_days, interval: nil, favorable_direction: "up")
@account_ids = account_ids
@currency = currency
@period = period

View File

@@ -165,7 +165,9 @@ class Period
end
def interval
if days > 366
if days > 1825 # 5 years
"1 month"
elsif days > 366
"1 week"
else
"1 day"