cancel
Showing results for 
Search instead for 
Did you mean: 

VizFrame Currency in Lakhs or Crores

mantrishekar
Active Participant
0 Kudos

Hi All,

In the below chart am able to Format the currency values in K or M.

Is it possible to change it to L (Lakhs) or C(Crores).

Could anybody please help me in solving this issue.

former_member196805
Contributor
0 Kudos

Hello,

Could you suggest how you could have the numeric values to come up with K or M? Did you apply your own formatter at all? If you did, could you share it?

My assumption is that if you could show the abbreviate of Kilo and Million at the end of each numeric value, showing L or C should not be a problem.

mantrishekar
Active Participant
0 Kudos

Hi Chapmon,

We had done this from Chart Properties.

Datalabel : {formatString : "#0.00 L"}

For me its L . Now you can Put any Label over there.

Regards,

Shekar.

former_member196805
Contributor
0 Kudos

Hello,

Sorry for the confusion.

Chart would not add and update any currency abbreviates automatically so you would have to set it on your own. Hardcoding the numeric formatting in formatString property is an option but the currency symbol would not be updated dynamically.

Assuming symbol will be updated according to the application language (or browser language or OS language) and you need to design this part on your own. You then use our ChartFormatter API to set your custom formatter and set it to our formatString property accordingly. Below is the sample of chartFormatter.

jQuery.sap.require("sap.viz.ui5.format.ChartFormatter");
registerformatter = function(){
  var formatterInstance = sap.viz.ui5.format.ChartFormatter.getInstance();
  sap.viz.ui5.api.env.Format.numericFormatter(formatterInstance);
  formatterInstance.registerCustomFormatter("EUR_abb",function(value){
    var fixedFloat = sap.ui.core.format.NumberFormat.getCurrencyInstance({style: 'standard', pattern: "EUR #,##0.0", currencyCode: true});
    return fixedFloat.format(value);
  });
};
registerformatter();
.......
... formatString: {"EUR_abb"}
......

Accepted Solutions (0)

Answers (1)

Answers (1)

iftah_peretz
Active Contributor
0 Kudos

Hi,

I think that the best way to get help, is to have a working example to demonstrate your problem.

In the meantime, you should define your own formatter and not the default one. Because, my guess is, that you are using sap.viz.ui5.format.ChartFormatter.DefaultPattern.SHORTFLOAT or sap.viz.ui5.format.ChartFormatter.DefaultPattern.SHORTINTEGER.