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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

format tooltip,legend

Thread ID:





118470 Mar 11,2015 07:06 AM UTC Mar 13,2015 07:00 AM UTC JavaScript 4
Tags: ejChart
kalpa serashiya
Asked On March 11, 2015 07:06 AM UTC

Have to format  x,y value point in tooltip
e.g=for curruncy append '$'at start.
   formatting datatime to date  for xpoint value


kalpa serashiya
Replied On March 11, 2015 11:12 AM UTC

Thanks for reply .
 Now  x,y value point in tooltip is formated.
from previous Query.
if have to format legend value ?


Anandaraj T [Syncfusion]
Replied On March 12, 2015 09:10 AM UTC

Hi Kalpa,

Thanks for using Syncfusion products.

Query: How to format legend value?

We can use legendItemRendering event of Chart to format the text in legend item.

Please refer the following code snippet to achieve this.





                          //Event for rendering legend items

                          legendItemRendering: 'LegendRendering',

                          . . . . . .

                          . . . . . .


        //Formatting legend item text in event handler

        function LegendRendering(sender) {

            var seriesIndex = sender.data.legendItem.SeriesIndex;

            var pointIndex = sender.data.legendItem.PointIndex;

            //Formatting legend item text

            sender.data.legendItem.Text = Globalize.format(sender.model.series[seriesIndex].points[pointIndex].y, "c0");



We have also prepared a sample for formatting legend text and it can be downloaded from the following link



Chart with formatted text in legend

Please let us know if you have any concern.



kalpa serashiya
Replied On March 12, 2015 10:20 AM UTC


Jayavigneshwaran [Syncfusion]
Replied On March 13, 2015 07:00 AM UTC

Hi Kalpa,
Thanks for your update.
Please let us know if you need any furture assitance.


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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon 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.Close Icon