MOdified: Removed unused old chart's tool tip code

This commit is contained in:
Awais-cb 2017-05-26 11:50:43 +05:00
parent b5474a4224
commit f2a773d080

View file

@ -560,49 +560,6 @@ $.ajax({
// $.plot("#placeholder", data, options);
var iteration = 0;
function showTooltip(x, y, contents) {
$('<div id="tooltip">' + contents + '</div>').css( {
position: 'absolute',
display: 'none',
top: y + 5,
left: x + 5,
border: '1px solid #fdd',
padding: '2px',
'background-color': '#fee',
opacity: 0.80
}).appendTo("body").fadeIn(200);
}
var previousPoint = null;
function tooltip(chart_id,tooltip_id){
$(chart_id).bind("plothover", function (event, pos, item) {
$("#x").text(pos.x.toFixed(2));
$("#y").text(pos.y.toFixed(2));
if ($(tooltip_id).is(':checked')) {
if (item) {
if (previousPoint != item.dataIndex) {
previousPoint = item.dataIndex;
$("#tooltip").remove();
var x = item.datapoint[0].toFixed(2),
y = item.datapoint[1].toFixed(2);
showTooltip(item.pageX, item.pageY,
item.series.label + " = " + y);
}
}
else {
$("#tooltip").remove();
previousPoint = null;
}
}
});
}
var page = '{$baseurl}/admin_area/index.php';
$(".oneNote .delete").on({