mirror of
https://github.com/we-promise/sure.git
synced 2026-05-07 04:44:08 +00:00
FIX networth chart dashboard (#1449)
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user