We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

Chart Lebel value


How to round the chart data label value in syncfusion chart.

Thank You,

1 Reply

DP Deepaa Pragaasam Syncfusion Team October 15, 2015 11:57 AM UTC

Hi Vijayakumar,
Thanks for contacting syncfusion support.
We have analyised your query and created a workaround sample for providing the rounding support to datalabels.
The “OnClientDisplayTextRendering” event is used to achieve this.
Code Example:

   function labelFormat(sender)


            var num = sender.data.text;

            sender.data.text = Math.round(num * 100) / 100;

The datalabel is rounded to 2 decimal places

Please refer the below link for further details on the event
We have attached sample for your reference
As we dont know your version, so we have sent a sample without ej.web.all.min.js in scripts folder.
Please refer the below screenshot and refer the files accordingly

Please let us know if you have any concern

Live Chat Icon For mobile
Up arrow icon