diff --git a/public/app.js b/public/app.js index 6f7e935..258949e 100644 --- a/public/app.js +++ b/public/app.js @@ -347,6 +347,7 @@ window.addEventListener('resize', resizeAndCenterNetwork); let lastUpdateTime = 0; +let lastPieChartUpdateTime = 0; const updateInterval = 120; // 120ms throttle function updateNodes() { @@ -355,10 +356,16 @@ function updateNodes() { nodes.update(nodesToUpdate); nodesToUpdate = []; calculateSmallGroups(); - updatePieChartThrottled(); updateCounter(); lastUpdateTime = currentTime; } + + // Separate throttle for pie chart update + if (currentTime - lastPieChartUpdateTime >= updateInterval) { + updatePieChart(); + lastPieChartUpdateTime = currentTime; + } + setTimeout(updateNodes, updateInterval); }