[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 + "%"; } } |