@@ -113,7 +113,7 @@
const data = dataset.data;
const total = data.reduce((sum, val) => sum + val, 0);
const percentage = total ? ((value / total) * 100).toFixed(2) : '0.00';
- return `${formatCurrency(value, currency)} (${percentage}%)`;
+ return `${percentage}% (${formatCurrency(value, currency)})`;
}
},
@@ -115,7 +115,8 @@
callbacks: {
label: function(tooltipItem) {
const value = tooltipItem.raw;
- return `${formatCurrency(value, currency)}`;
+ const percentage = ((value / total) * 100).toFixed(2);