Feat: Adds multi currency support (#88)
This commit is contained in:
@@ -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)}%)`;
|
||||
}
|
||||
},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user