From 1bde077df6b3ef49660a077a34a590a8997ec760 Mon Sep 17 00:00:00 2001 From: Tykayn Date: Sat, 21 Jun 2025 18:41:00 +0200 Subject: [PATCH] up graph home --- assets/dashboard-charts.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/assets/dashboard-charts.js b/assets/dashboard-charts.js index be21412..1976d38 100644 --- a/assets/dashboard-charts.js +++ b/assets/dashboard-charts.js @@ -6,10 +6,11 @@ function getBubbleData(proportional) { const data = window.statsDataForBubble.map(stat => { const population = parseInt(stat.population, 10); const placesCount = parseInt(stat.placesCount, 10); - const ratio = population > 0 ? (placesCount / population) * 1000 : 0; + // const ratio = population > 0 ? (placesCount / population) * 1000 : 0; + const completion = parseInt(stat.completionPercent, 10); return { x: population, - y: ratio, + y: completion, r: proportional ? Math.sqrt(placesCount) * 2 : 12, label: stat.name, completion: stat.completionPercent || 0, @@ -148,7 +149,7 @@ document.addEventListener('DOMContentLoaded', function() { title: { display: true, text: 'Population (échelle log)' } }, y: { - title: { display: true, text: 'Commerces par habitant' } + title: { display: true, text: 'Completion' } } } }