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.

Tooltip Data

Thread ID:

Created:

Updated:

Platform:

Replies:

124055 May 11,2016 12:54 PM May 16,2016 07:18 AM JavaScript 3
loading
Tags: ejChart
Michael O'Connor
Asked On May 11, 2016 12:54 PM


We have a chart that plots systolic and diastolic blood pressure as two lines in the chart, one in each series so you can see the trend of each.  On the tooltip for either value we want to show the summary systolic over diastolic numbers but the #point.x# format doesn't seem to provide a way to capture that other related value.  Is there a way to do this I haven't discovered?

thanks!

Saravana Kumar Kanagavel [Syncfusion]
Replied On May 12, 2016 05:29 AM

Hi Michael,   
   
Thanks for contacting Syncfusion Support.   
  
According to your requirement, we have created a sample. Your requirement can be achieved by using the toolTipInitialize event. In the sample, we have shown the diastolic series value on series of systolic tooltip by using the toolTipInitialize event.   
   
Please follow the code example below.   
  
[JS]   
   
    $(function ()   
    {   
        $("#container").ejChart(   
        {   
            toolTipInitialize: "toolTip"   
        });   
    });   
   
    function toolTip(sender) { // toolTipInitialize event triggered   
        var x, y, name;   
        if (sender.data.seriesIndex == 0) {   
            x = sender.model.series[1].points[sender.data.pointIndex].x;   
            y = sender.model.series[1].points[sender.data.pointIndex].y;   
            name = sender.model.series[1].name;   
            sender.data.currentText = sender.data.currentText + "<br/>" + name + " : " + x + " : " + y + "%";   
        }   
        else {   
            x = sender.model.series[0].points[sender.data.pointIndex].x;   
            y = sender.model.series[0].points[sender.data.pointIndex].y;   
            name = sender.model.series[0].name;   
            sender.data.currentText = sender.data.currentText + "<br/>" + name + " : " + x + " : " + y + "%";   
        }   
    }   
  
   
   
In the above code, by triggering the toolTipInitialize event, you can get the other series point value and that point value is added to the current series tooltip.    
   
We have also made a sample for your reference and attached in the below location.  
   
  
The output of the sample is as follows.  
   
    
   
   
Regards,   
Saravana Kumar K   


Ranjani Prabhakaran [Syncfusion]
Replied On May 16, 2016 04:58 AM

From: Michael O'Connor 
Sent: Saturday, May 14, 2016 6:00 PM
To: Syncfusion Support 

Subject: RE: Syncfusion support community forum 124055, Tooltip Data, has been updated. 
 
That was exactly what I needed. Thank you! 


Gowrimathi S [Syncfusion]
Replied On May 16, 2016 07:18 AM

Hi Michael,  
 
   Thanks for your update, Please let us know, if you need any further assistance on this. 
Regards, 
Gowri 


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.

;