Tooltip Data
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!
SIGN IN To post a reply.
3 Replies
SK
Saravana Kumar Kanagavel
Syncfusion Team
May 12, 2016 09:29 AM UTC
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
RP
Ranjani Prabhakaran
Syncfusion Team
May 16, 2016 08:58 AM UTC
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.
To: Syncfusion Support
That was exactly what I needed. Thank you!
GS
Gowrimathi S
Syncfusion Team
May 16, 2016 11:18 AM UTC
Hi Michael,
Thanks for your update, Please let us know, if you need any further assistance on this.
Regards,
Gowri
SIGN IN To post a reply.
- 3 Replies
- 4 Participants
-
MO Michael O'Connor
- May 11, 2016 04:54 PM UTC
- May 16, 2016 11:18 AM UTC