Currency: Adds Indonesian IDR currency (#28363)

pull/28555/head
Muhammad Hendri 5 years ago committed by GitHub
parent 9a241a2a4f
commit 3abd9957aa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      packages/grafana-data/src/valueFormats/categories.ts
  2. 1
      packages/grafana-data/src/valueFormats/valueFormats.test.ts
  3. 3
      public/app/core/utils/kbn.test.ts

@ -126,6 +126,7 @@ export const getCategories = (): ValueFormatCategory[] => [
{ name: 'South African Rand (R)', id: 'currencyZAR', fn: currency('R') },
{ name: 'Indian Rupee (₹)', id: 'currencyINR', fn: currency('₹') },
{ name: 'South Korean Won (₩)', id: 'currencyKRW', fn: currency('₩') },
{ name: 'Indonesian Rupiah (Rp)', id: 'currencyIDR', fn: currency('Rp') },
],
},
{

@ -16,6 +16,7 @@ const formatTests: ValueFormatTest[] = [
// Currency
{ id: 'currencyUSD', decimals: 2, value: 1532.82, result: '$1.53K' },
{ id: 'currencyKRW', decimals: 2, value: 1532.82, result: '₩1.53K' },
{ id: 'currencyIDR', decimals: 2, value: 1532.82, result: 'Rp1.53K' },
// Standard
{ id: 'ms', decimals: 4, value: 0.0024, result: '0.0024 ms' },

@ -11,9 +11,10 @@ interface ValueFormatTest {
}
const formatTests: ValueFormatTest[] = [
// Currancy
// Currency
{ id: 'currencyUSD', decimals: 2, value: 1532.82, result: '$1.53K' },
{ id: 'currencyKRW', decimals: 2, value: 1532.82, result: '₩1.53K' },
{ id: 'currencyIDR', decimals: 2, value: 1532.82, result: 'Rp1.53K' },
// Typical
{ id: 'ms', decimals: 4, value: 0.0024, result: '0.0024 ms' },

Loading…
Cancel
Save