mirror of
https://github.com/eitchtee/WYGIWYH.git
synced 2026-07-11 15:22:55 +02:00
feat(insights): sankey diagram (WIP)
This commit is contained in:
@@ -1,3 +1,17 @@
|
||||
from django.shortcuts import render
|
||||
|
||||
# Create your views here.
|
||||
from apps.transactions.models import Transaction
|
||||
from apps.insights.utils.sankey import generate_sankey_data
|
||||
|
||||
|
||||
def sankey(request):
|
||||
# Get filtered transactions
|
||||
transactions = Transaction.objects.filter(date__year=2025)
|
||||
|
||||
# Generate Sankey data
|
||||
sankey_data = generate_sankey_data(transactions)
|
||||
print(sankey_data)
|
||||
|
||||
return render(
|
||||
request, "insights/fragments/sankey.html", {"sankey_data": sankey_data}
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user