From 16267510839e8b38a2c77d1bbc1b71f769e26a03 Mon Sep 17 00:00:00 2001 From: julius Date: Fri, 20 Jun 2025 14:01:04 +0200 Subject: [PATCH] feat: exponentially decreasing edge weight and adjustment of negative weight --- cutt/analysis.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/cutt/analysis.py b/cutt/analysis.py index e034cbc..ace0228 100644 --- a/cutt/analysis.py +++ b/cutt/analysis.py @@ -160,15 +160,16 @@ def graph_json( if p_id not in player_map: continue p = player_map[p_id] + weight = 0.9**i edges.append( { "id": f"{user}->{p}", "source": user, "target": p, - "size": max(1.0 - 0.1 * i, 0.3), + "size": weight, "data": { "relation": 2, - "origSize": max(1.0 - 0.1 * i, 0.3), + "origSize": weight, "origFill": "#bed4ff", }, } @@ -182,7 +183,7 @@ def graph_json( "id": f"{user}-x>{p}", "source": user, "target": p, - "size": 0.3, + "size": 0.5, "data": {"relation": 0, "origSize": 0.3, "origFill": "#ff7c7c"}, "fill": "#ff7c7c", }