some fixes
This commit is contained in:
@@ -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`;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user