up graph home

This commit is contained in:
Tykayn 2025-06-21 18:41:00 +02:00 committed by tykayn
parent 68680e0569
commit 1bde077df6

View file

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