0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-02-24 23:48:13 -05:00

Fixed currency in chart options

refs https://github.com/TryGhost/Team/issues/469

Uses correct binding to setup currency for MRR charts in y axis ticks
This commit is contained in:
Rish 2021-02-23 02:12:12 +05:30
parent 42d7282b57
commit 002cc33d52

View file

@ -247,7 +247,7 @@ export default Component.extend({
padding: 8, padding: 8,
precision: 0, precision: 0,
suggestedMin: 0, suggestedMin: 0,
callback: function (value) { callback: (value) => {
const currency = this.chartType === 'mrr' ? getSymbol(this.stats.currency) : ''; const currency = this.chartType === 'mrr' ? getSymbol(this.stats.currency) : '';
if (parseInt(value) >= 1000) { if (parseInt(value) >= 1000) {
return currency + value.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ','); return currency + value.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',');