mirror of
https://github.com/eitchtee/WYGIWYH.git
synced 2026-03-20 16:44:00 +01:00
fix(insights): sankey diagram inconsistent sizing
This commit is contained in:
@@ -47,7 +47,7 @@ def generate_sankey_data(transactions_queryset):
|
||||
# Function to add flow
|
||||
def add_flow(from_node, to_node, amount, currency):
|
||||
percentage = (amount / total_amount) * 100 if total_amount else 0
|
||||
scaled_flow = 1 + min(percentage / 5, 2) # Scale 1-5, capping at 100%
|
||||
scaled_flow = 1 + min(percentage / 20, 4) # Scale 1-5, capping at 100%
|
||||
flows.append(
|
||||
{
|
||||
"from_node": from_node,
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{% extends "layouts/base.html" %}
|
||||
|
||||
{% block content %}
|
||||
<canvas id="sankeyChart" class="h-100"></canvas>
|
||||
<canvas id="sankeyChart" height="379"></canvas>
|
||||
|
||||
<script>
|
||||
function setupSankeyChart(data, chartId = 'sankeyChart') {
|
||||
|
||||
Reference in New Issue
Block a user