mirror of
https://github.com/maybe-finance/maybe.git
synced 2025-07-23 15:19:38 +02:00
Improve chart performance and gapfilling (#2306)
This commit is contained in:
parent
e1b81ef879
commit
6e202bd7ec
10 changed files with 382 additions and 196 deletions
|
@ -50,14 +50,17 @@ class Assistant::Function::GetBalanceSheet < Assistant::Function
|
|||
if period.start_date == Date.current
|
||||
[]
|
||||
else
|
||||
balance_series = scope.balance_series(
|
||||
account_ids = scope.pluck(:id)
|
||||
|
||||
builder = Balance::ChartSeriesBuilder.new(
|
||||
account_ids: account_ids,
|
||||
currency: family.currency,
|
||||
period: period,
|
||||
interval: "1 month",
|
||||
favorable_direction: "up"
|
||||
favorable_direction: "up",
|
||||
interval: "1 month"
|
||||
)
|
||||
|
||||
to_ai_time_series(balance_series)
|
||||
to_ai_time_series(builder.balance_series)
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue