Skip to content

Commit

Permalink
hierarchy chart: remove now uneeded modifier (#90)
Browse files Browse the repository at this point in the history
  • Loading branch information
yagebu authored Feb 4, 2024
1 parent da63cd5 commit 841c4c9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 13 deletions.
14 changes: 2 additions & 12 deletions fava_investor/templates/Investor.html
Original file line number Diff line number Diff line change
Expand Up @@ -202,24 +202,14 @@ <h3>What not to buy</h3>
</tree-table>
{% endmacro %}

{% macro asset_allocation_hierarchy(serialised_tree, label='Asset Allocation') %}
{% do chart_data.append({
'type': 'hierarchy',
'label': label,
'data': {
'modifier': 1,
'root': serialised_tree,
},
}) %}
{% endmacro %}

{% if (module == 'aa_class') %}
<h2>Portfolio: Asset Allocation by Class</h2>

{% set chart_data = [] %}
{% set results = extension.build_assetalloc_by_class() %}

{{ asset_allocation_hierarchy(results[0].serialise(results[0]['currency']), label='Asset Allocation') }}
{% set serialised_tree = results[0].serialise(results[0]['currency']) %}
{% set chart_data = [{ 'type': 'hierarchy', 'label': 'Asset Allocation', 'data': serialised_tree }] %}
<svelte-component type="charts"><script type="application/json">{{ chart_data|tojson }}</script></svelte-component>

{{ asset_tree(results[0]) }}
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
'Click >= 7.0',
'beancount >= 2.3.2',
'click_aliases >= 1.0.1',
'fava >= 1.23',
'fava >= 1.26',
'packaging >= 20.3',
'python_dateutil >= 2.8.1',
'tabulate >= 0.8.9',
Expand Down

0 comments on commit 841c4c9

Please sign in to comment.