I haven't diffrent currencies in pivot grid

I want to have USD, EUR, TRY currencies. But, View on only one currency. And I want to decimal by currency. But it's not working. 

this.dataSourceSettings = {
enableSorting: true,
expandAll: false,
columns: [{ name: 'Bank' }],
values: [{ name: 'Amount' }, { name: 'ReportAmount' }],
dataSource: this.pviotDataSource,
rows: [{ name: 'Currency' }, { name: 'CompanyName' }, { name: 'Bank' }, { name: 'AccountGroup' }, { name: 'Account' }],
formatSettings: [{ name: 'Amount', format: '' }, { name: 'ReportAmount', format: '' }],
filters: [{ name: 'Currency' }],
drilledMembers: [{ name: 'Currency', items: currencies }],
filterSettings: [{ name: 'Currency', items: currencies, type: 'Include' }],
showRowGrandTotals: false,
};

7 Replies

SN Sivamathi Natarajan Syncfusion Team May 5, 2020 05:04 AM UTC

 
Thanks for contacting Syncfusion support. 
 
 
Also, kindly refer the below file which holds the localization keys of around 30 languages. 
 
 
It can also be downloaded by using the below command (it installs the CLDR JSON data). For more information about CLDR-Data, refer to this link
 
 
npm install cldr-data --save 
 
 
Please let us know if you need any further assistance on this. 
 
Regards, 
Sivamathi. 



UN Unknown May 7, 2020 09:18 AM UTC

Hi,

I know "npm install cldr-data --save" and I use that. But For Example, There are many currency in my array, But decimals not working. JSON Example.

let exampleJSON = [
     { Amount: 22155,56, "Currency": "TRY" },
     { Amount: 5000, "Currency": "EUR" },
     { Amount: 6000, "Currency": "USD" },
];

When I Run that code, View For Example
$22.155,56
$5.000
$6.000

But I want this
22,155.56 ₺
€ 5.000
$6.000



SN Sivamathi Natarajan Syncfusion Team May 8, 2020 01:39 PM UTC

Hi kenan dogan, 
 
We are validating the requirement at our end. We will update the further details in two business days. 
 
Regards, 
Sivamathi. 



UN Unknown May 10, 2020 08:28 PM UTC

Hi,

Thank you so much. 


SN Sivamathi Natarajan Syncfusion Team May 11, 2020 03:41 PM UTC

Hi kenan dogan, 
  
Please refer the respective *.json files to load the required currency. Meanwhile, we have prepared a sample for your reference with different currencies. 
  
  
Please check the below screenshot. Here we have displayed different currencies. 
  
 
  
As per your requirement, you can change the decimal separators in numbers.json file. Please check the below screenshot for your reference. 
  
 
  
  
We hope the above sample meets your requirements. 
  
Regards, 
Sivamathi. 



UN Unknown May 12, 2020 10:36 AM UTC

Thank you so much.

But I don't know currency type because it return from API. So, I can't choise formatSettings: [{ name: 'Sold', format: 'C2', currency: 'TRY'  },{ name: 'In_Stock', format: 'C2', currency: 'EUR'  }, { name: 'Amount', format: 'C2', currency: 'USD'  }]


SN Sivamathi Natarajan Syncfusion Team May 13, 2020 01:08 PM UTC

Hi kenan dogan, 
 
Referring the number.json file is the only option to set the appropriate decimal separators in pivot table. Based on the currency you can edit the file. So, we recommend you to do the same to achieve your requirement. 
 
Please let us know if you have concern. 
 
Regards, 
Sivamathi. 


Loader.
Up arrow icon