var lbl = new Array(); jQuery(document).ready(function(){ jQuery('#wpta_trend').hide(); jQuery('#wpta_powered').hide(); var data = [5,9,4,5,1]; lbl = ['06-September-2016','07-September-2016','08-September-2016','09-September-2016','10-September-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('