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.
Unfortunately, activation email could not send to your email. Please try again.

Chart Lebel value

Thread ID:

Created:

Updated:

Platform:

Replies:

120794 Oct 15,2015 03:26 AM Oct 15,2015 07:57 AM ASP.NET Web Forms 1
loading
Tags: Chart
Vijaykumar
Asked On October 15, 2015 03:26 AM

Hi,

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

Thank You,
Vijayakumar.s

Deepaa Pragaasam [Syncfusion]
Replied On October 15, 2015 07:57 AM

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:
[JS]

   function labelFormat(sender)

        {

            var num = sender.data.text;

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

Screenshot:
The datalabel is rounded to 2 decimal places


Please refer the below link for further details on the event
http://help.syncfusion.com/aspnet/chart/behaviour-customization#handle-events
We have attached sample for your reference
http://www.syncfusion.com/downloads/support/forum/120794/ze/WebApplication1657634893
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
Regards,
Deepaa.



CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;