var lbl = new Array(); jQuery(document).ready(function(){ jQuery('#wpta_trend').hide(); jQuery('#wpta_powered').hide(); var data = [6,14,12,8,2]; lbl = ['17-May-2016','18-May-2016','19-May-2016','20-May-2016','21-May-2016']; var datapoint = new Array(); for(var i=0;i0){ if(jQuery('#trenddiv').length>0){ plot = jQuery.plot( jQuery('#trenddiv'), [ datapoint ] , plot_options ); } }else{ jQuery('#trenddiv').html("No Data Found"); } jQuery("#trenddiv").bind("plothover", function (event, pos, item) { if (item){ jQuery('#tooltip').remove(); showTooltip(pos.pageX,pos.pageY,item); }else{ jQuery('#tooltip').remove(); } } ); } ); function showTooltip(x, y, item) { var x_point = item.datapoint[0]; // => x-axis var y_point = item.datapoint[1]; // => y-axis var x_lbl = lbl[item.datapoint[0]] //=> X-Axis Label jQuery('