mirror of
https://github.com/eitchtee/WYGIWYH.git
synced 2026-07-12 15:52:54 +02:00
feat(networth): show all chart data points when clicking on account or currency card title
This commit is contained in:
@@ -20,7 +20,16 @@
|
|||||||
<i class="fa-solid fa-coins"></i>
|
<i class="fa-solid fa-coins"></i>
|
||||||
</div>
|
</div>
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<h5 class="tw-text-yellow-400 fw-bold mb-3">{% translate 'By currency' %}</h5>
|
<h5 class="tw-text-yellow-400 fw-bold mb-3"
|
||||||
|
_="on click
|
||||||
|
set chart to Chart.getChart('currencyBalanceChart')
|
||||||
|
for dataset in chart.data.datasets
|
||||||
|
call chart.setDatasetVisibility(chart.data.datasets.indexOf(dataset), true)
|
||||||
|
end
|
||||||
|
call chart.update()
|
||||||
|
end">
|
||||||
|
{% translate 'By currency' %}
|
||||||
|
</h5>
|
||||||
{% for currency in currency_net_worth.values %}
|
{% for currency in currency_net_worth.values %}
|
||||||
<div class="d-flex justify-content-between mt-2">
|
<div class="d-flex justify-content-between mt-2">
|
||||||
<div class="d-flex align-items-baseline w-100">
|
<div class="d-flex align-items-baseline w-100">
|
||||||
@@ -73,7 +82,16 @@
|
|||||||
<i class="fa-solid fa-wallet"></i>
|
<i class="fa-solid fa-wallet"></i>
|
||||||
</div>
|
</div>
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<h5 class="tw-text-blue-400 fw-bold mb-3">{% translate 'By account' %}</h5>
|
<h5 class="tw-text-blue-400 fw-bold mb-3"
|
||||||
|
_="on click
|
||||||
|
set chart to Chart.getChart('accountBalanceChart')
|
||||||
|
for dataset in chart.data.datasets
|
||||||
|
call chart.setDatasetVisibility(chart.data.datasets.indexOf(dataset), true)
|
||||||
|
end
|
||||||
|
call chart.update()
|
||||||
|
end">
|
||||||
|
{% translate 'By account' %}
|
||||||
|
</h5>
|
||||||
{% regroup account_net_worth.values by account.group as account_data %}
|
{% regroup account_net_worth.values by account.group as account_data %}
|
||||||
{% for data in account_data %}
|
{% for data in account_data %}
|
||||||
{% if data.grouper %}
|
{% if data.grouper %}
|
||||||
|
|||||||
Reference in New Issue
Block a user