Best Android App InstaSquare Lite for full-size publication of photos in Instagram, Facebook, Twitter. Run the android application on PC. You can through the android emulator Droid4X.

root/trunk/rapidandroid/org.rapidandroid/assets/flot/html/basechart.html @ 113

Revision 113, 2.1 KB (checked in by czue, 16 months ago)

move the legend axis off center and add the click event to turn on the tooltip. This is not that smooth in execution and we may just want to turn it off.

Line 
1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
2<html>
3 <head>
4    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
5    <title>Flot Examples</title>
6    <link href="layout.css" rel="stylesheet" type="text/css"></link>
7    <!--[if IE]><script language="javascript" type="text/javascript" src="../excanvas.pack.js"></script><![endif]-->
8    <script language="javascript" type="text/javascript" src="../jquery.js"></script>
9    <script language="javascript" type="text/javascript" src="../jquery.flot.js"></script>
10   
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   
27function load(){
28        //document.getElementById('graphtitle').innerHTML = window.graphdata.getGraphTitle("wassup", 5);
29        //document.getElementById('graphtitle').innerHTML = window.graphdata.getGraphTitle();
30        window.graphdata.loadGraph();
31}
32
33function SetGraph(gwidth, gheight) {
34        var graphObj = document.getElementById("placeholder");
35        graphObj.style.width = gwidth;
36        graphObj.style.height = gheight;       
37}
38function GotGraph(gData, gOptions) {   
39    $("#tooltip").remove();
40           
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       
51        window.graphdata.finishGraph();
52        }
53</script>
54   
55 </head>
56    <body onload="load()">
57   
58
59    <div id="placeholder"></div>   
60 </body>
61</html>
Note: See TracBrowser for help on using the browser.