diff -r ef903fff826d -r 7b9553a9db65 web/data/cubicweb.flot.js --- a/web/data/cubicweb.flot.js Thu Jun 03 10:17:44 2010 +0200 +++ b/web/data/cubicweb.flot.js Thu Jun 03 14:51:42 2010 +0200 @@ -1,14 +1,14 @@ function showTooltip(x, y, contents) { - $('
' + contents + '
').css( { - position: 'absolute', + $('
' + contents + '
').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); + left: x + 5, + border: '1px solid #fdd', + padding: '2px', + 'background-color': '#fee', + opacity: 0.80 + }).appendTo("body").fadeIn(200); } var previousPoint = null; @@ -18,19 +18,19 @@ previousPoint = item.datapoint; $("#tooltip").remove(); var x = item.datapoint[0].toFixed(2), - y = item.datapoint[1].toFixed(2); + y = item.datapoint[1].toFixed(2); if (item.datapoint.length == 3) { x = new Date(item.datapoint[2]); x = x.toLocaleDateString() + ' ' + x.toLocaleTimeString(); } else if (item.datapoint.length == 4) { - x = new Date(item.datapoint[2]); - x = x.strftime(item.datapoint[3]); + x = new Date(item.datapoint[2]); + x = x.strftime(item.datapoint[3]); } - showTooltip(item.pageX, item.pageY, - item.series.label + ': (' + x + ' ; ' + y + ')'); + showTooltip(item.pageX, item.pageY, item.series.label + ': (' + x + ' ; ' + y + ')'); } } else { $("#tooltip").remove(); previousPoint = null; } } +