some fixes

This commit is contained in:
Doar Mihai
2026-03-25 20:39:10 +02:00
parent 4db544bcc2
commit b5f948433b
8 changed files with 164 additions and 10 deletions
@@ -76,8 +76,9 @@
cornerRadius: 8,
callbacks: {
label: (ctx) => {
const countryName = ctx.raw?.feature?.properties?.name || 'Unknown';
const val = ctx.raw?.value || 0;
return val > 0 ? `${ctx.label}: ${val.toLocaleString()} visitors` : `${ctx.label}: 0`;
return val > 0 ? `${countryName}: ${val.toLocaleString()} visitors` : `${countryName}: 0 visitors`;
}
}
}