Feat: Adds multi currency support (#88)

This commit is contained in:
hackerESQ
2025-04-09 19:25:15 -05:00
committed by GitHub
parent 6d6f968f42
commit eae345f243
100 changed files with 17735 additions and 35761 deletions
@@ -94,7 +94,7 @@
}
this.data.yaxis.labels.formatter = function (value) {
return `$${value}`
return `{{ Number::currencySymbol(auth()->user()->getCurrency()) }}${value}`
}
this.data.tooltip = {
@@ -103,7 +103,7 @@
formatter: (value, { series, seriesIndex, dataPointIndex, w }) => {
const firstDataPoint = this.data.series[seriesIndex].data[0][1]
const percentageChange = ((value - firstDataPoint) / firstDataPoint) * 100;
return `$${parseFloat(value.toFixed(2))} (${percentageChange.toFixed(2)}%)`;
return `${parseFloat(value.toFixed(2))} (${percentageChange.toFixed(2)}%)`;
}
},
}