Value should display in lakhs instead of millions

Hello Helical Insight,

Hi team. I am using helical insight enterprise edition 4.1 GA. We are using pie chart and donut chart. The numbers are appearing in thousand, millions, billions etc.
However we would like the same to appear in Indian formatting like lakh crore etc. Please help with the same.

Thank You,
Snow.

Hello Snow,

If you are looking to do formatting for bar charts or other axis charts you can follow the steps mentioned here : Add Option for Lakhs in Data Label Script

Whereas if you would like the same to be done in pie and donut charts please in the JSeditor please put the below code. With this it will show the data in Indian formatting.

hi_container.set("preExecution",function(c){             
var viz_Options = c.get("viz_Options");                
 viz_Options.chartOptions.pie = { 					
 label: {
 format: function(value, ratio, id) {
 var d = value;
 if (d>=0 && d <= 999){ 
 return d; 								
 } 								
 else if(d >= 1000 && d <= 99999){ 
 return (d/1000).toFixed(2) + ' K';
 }
 else if(d >= 100000 && d <= 9999999){ 
 return (d/100000).toFixed(2) + ' L';
 }
 else if (d >= 10000000){ 
 return (d/10000000).toFixed(2) + ' C'; 
 } 			
 } 
 } 	
 }; 
 viz_Options.chartOptions["tooltip"] = { 
 format: {      		
 value: function (value, ratio, id) { 		
 var k = value; 					
 if (k>=0 && k <= 999){ 			
 return k; 						
 } 								
 else if(k >= 1000 && k <= 99999){ 	
 return (k/1000).toFixed(2) + ' K'; 
 } 								
 else if(k >= 100000 && k <= 9999999){ 		
 return (k/100000).toFixed(2) + ' L'; 
 } 								
 else if (k >= 10000000){ 		
 return (k/10000000).toFixed(2) + ' C'; 	
 } 							
 } 							 					
 } 					
 } 				    
 c.set("viz_Options",viz_Options);     
 });

Thank You,
Helical Insight.