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' } } } }