2025-03-07 17:35:55 -05:00
|
|
|
<% series = @account.balance_series(period: @period, view: @chart_view) %>
|
2024-11-27 16:01:50 -05:00
|
|
|
<% trend = series.trend %>
|
|
|
|
|
|
|
|
<%= turbo_frame_tag dom_id(@account, :chart_details) do %>
|
2025-06-10 18:20:06 -04:00
|
|
|
<div class="px-4">
|
|
|
|
<%= render partial: "shared/trend_change", locals: { trend: trend, comparison_label: @period.comparison_label } %>
|
|
|
|
</div>
|
2024-11-27 16:01:50 -05:00
|
|
|
|
2025-06-10 18:20:06 -04:00
|
|
|
<div class="h-64 pb-4">
|
|
|
|
<% if series.any? %>
|
|
|
|
<div
|
2024-11-27 16:01:50 -05:00
|
|
|
id="lineChart"
|
|
|
|
class="w-full h-full"
|
|
|
|
data-controller="time-series-chart"
|
|
|
|
data-time-series-chart-data-value="<%= series.to_json %>"></div>
|
2025-06-10 18:20:06 -04:00
|
|
|
<% else %>
|
|
|
|
<div class="w-full h-full flex items-center justify-center">
|
|
|
|
<p class="text-secondary text-sm"><%= t(".data_not_available") %></p>
|
|
|
|
</div>
|
|
|
|
<% end %>
|
|
|
|
</div>
|
2024-11-27 16:01:50 -05:00
|
|
|
<% end %>
|