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

tooltip for stackingchart

Thread ID:





118462 Mar 10,2015 12:25 PM UTC Mar 11,2015 07:21 AM UTC JavaScript 1
Tags: ejChart
kalpa serashiya
Asked On March 10, 2015 12:25 PM UTC

thanks for reply,
Query about tooltip for stacking chart.
can we show tooltip as shown in attached Image.
common toolip for all series


Attachment: tooltip_c7fc38e4.rar

Anandaraj T [Syncfusion]
Replied On March 11, 2015 07:21 AM UTC

Hi Kalpa,

Thanks for using Syncfusion products.

We can achieve your requirement using template property of tooltip and toolTipInitialize event of Chart. Please refer the following code snippet to achieve this



        //Event handler to modify the contents of tooltip template

        function tooltip(sender) {

            var pointIndex = sender.data.pointIndex;

            tooltipDiv.innerHTML = '<center> <b>' + sender.model.series[0].points[pointIndex].x + "</b> </center>";

            for (var i = 0; i < sender.model.series.length; i++)

                if (!sender.model.series[i].points[pointIndex].isEmpty)

                    tooltipDiv.innerHTML += sender.model.series[i].name + " : <b> " + sender.model.series[i].points[pointIndex].y + "</b><br/>";

            //Dynamically adding a div with customized content as tooltip template

            sender.data.currentText = tooltipDiv;


        $(function () {



                          series: [{

                              . . . . .

                              //Using tooltip template to customize the appearance of chart tooltip

                              tooltip: { visible: true, template: '' }


                          . . . . . .


                          //Event for rendering tooltip

                          toolTipInitialize: 'tooltip'




We have also prepared a sample and it can be downloaded from the following link



Stacking column with customized tooltip

Please let us know if you have any concern.




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

or the page will be automatically redirected to 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