How to control the format of the Y-axis coordinate value of the Syncfusion chart

H


How to control the format of the Y-axis coordinate value of the Syncfusion chart, for example, to display two decimal places, or not to display decimals

Thanks.

1 Reply

DD Dharanidharan Dharmasivam Syncfusion Team August 13, 2018 06:17 AM UTC

Hi Luke, 

Greetings from Syncfusion. 

Your requirment of controlling the decimal values of an axis can be achieved by using the labelFormat property. Here you can specify labelFormat as n0, n1, n2 and so on, with respect to your requirement and  the precision (highlighted in green colored in above label formats) implies the number of digits has to be dispalyed after the decimal point. For more information on labels formats, you can find the help document. 

You can find the code snippet to achieve your requirement. 

Asp.Net Core: 

<ejs-chart id="container"> 
    <e-chart-primaryyaxis labelFormat="n2"></e-chart-primaryyaxis> 
</ejs-chart> 


Screenshot with label format n2
 

Screenshot with label format n0
 

Sample for reference can be find from below link. 

Thanks, 
Dharani.

Loader.
Up arrow icon