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

tooltip for stackingchart

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

1 Reply

AT Anandaraj T Syncfusion Team 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.



Live Chat Icon For mobile
Up arrow icon