Is there a way to use other currency than US dollar? We’ve some data that display currencies equivalence for products, but we’re using just numbers.
Support for custom currencies
Hi @ahmed. Custom currencies will be supported in next release 1.12. It will also allow you to use custom number formatting so you can place the currency symbol at the front or end of the number, use commas instead of periods and more.
Hi, I have the same question and I noticed that ChartFactor 1.12 was released. Is this something possible now?
Hi @sandip. Indeed, release 1.12 has included the support for custom currencies and formats for numbers. It also included custom formats for dates so you can provide your own. You can check the documentation for custom formats for numeric fields and custom formats for time fields. Let us know if you have any questions about it.
hi guys, I don’t know if is here the correct place to ask, but the thing is that I have a numeric value that is the price of a product in USD dollars I want to convert this field to other currency and format him, how can I do this?
hi @john you can do that combining a Derived Field with a Custom Currency Formatting Definition in the following way:
const dep1 = cf.Metric('fare', 'sum');
const fareInCAD= {
'name': 'fare_cad',
'label': 'Fare in CAD',
'type': 'MONEY',
'currency': 'C$',
'displayFormat': '0,0.00 $',
'dependencies': [dep1],
'function': (fare) => fare / 0.76
};
let _META_ = {
"chicago_taxi_trips": {
"fields": {
"fare_cad": fareInCAD
}
}
}
Let me know if you have additional questions. Best regards.