formatting label

How to customize the format of labels in y-axis.
Like i have to show in y-axis value in k's and m's format

1 Reply 1 reply marked as answer

DG Durga Gopalakrishnan Syncfusion Team August 26, 2020 05:15 PM UTC

Hi Kalyan, 
 
We have analyzed your query. There are two methods to format axis labels.  
 
Method 1 : Using labelFormat property  
 
You can specify labelFormat for Y axis as per your need. Please check with below snippet 
 
public primaryYAxis: Object = { 
        labelFormat: '{value}k', 
} 
 
Method 2 : Using axisLabelRender event 
 
You can use axisLabelRender event to customize axis labels.  
 
public axisLabelRender(args : IAxisLabelRenderEventArgs ): void { 
      if(args.axis.name === "primaryYAxis"){ 
        // customize your code here 
      } 
    }; 
 

Kindly revert us, if you have any concerns. 

Regards, 
Durga G 


Marked as answer
Loader.
Up arrow icon