- Timestamp:
- 02/05/09 12:03:32 (16 months ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
trunk/rapidandroid/org.rapidandroid/assets/flot/html/basechart.html
r102 r113 10 10 11 11 <script id="source" language="javascript" type="text/javascript"> 12 13 function showTooltip(x, y, contents) { 14 $('<div id="tooltip">' + contents + '</div>').css( { 15 position: 'absolute', 16 display: 'none', 17 top: y + 5, 18 left: x + 5, 19 border: '1px solid #fdd', 20 padding: '2px', 21 'background-color': '#fee', 22 opacity: 0.80 23 }).appendTo("body").fadeIn(200); 24 } 25 26 12 27 function load(){ 13 28 //document.getElementById('graphtitle').innerHTML = window.graphdata.getGraphTitle("wassup", 5); … … 22 37 } 23 38 function GotGraph(gData, gOptions) { 39 $("#tooltip").remove(); 40 24 41 $.plot($("#placeholder"), gData, gOptions); 42 $("#placeholder").bind("plotclick", function (event, pos, item) { 43 if (item) { 44 $("#tooltip").remove(); 45 var y = item.datapoint[1].toFixed(0); 46 showTooltip(item.pageX, item.pageY, 47 item.series.label + " = " + y); 48 } 49 }); 50 25 51 window.graphdata.finishGraph(); 26 52 }