added favicon to web interface
[p2pool.git] / web-static / graphs.html
index a17ddc0..6577123 100644 (file)
@@ -3,6 +3,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
     <head>
         <title>P2Pool Graphs</title>
+        <link rel="shortcut icon" type="image/x-icon" href="favicon.ico" />
         <script type="text/javascript" src="d3.v2.min.js"></script>
         
         <style type="text/css">
                             for(var j = 0; j < line.data.length; j++)
                                 if(line.data[j] != null) {
                                     var d = line.data[j];
-                                    num += d.y*((d.y0 + d.y) + (d.y0))/2;
-                                    denom += d.y;
+                                    num += (d.y+1)*((d.y0 + d.y) + (d.y0))/2;
+                                    denom += (d.y+1);
                                 }
                             text_boxes.push([i, g.append("svg:text")
                                 .text(line.label + " (mean: " + d3.format(".3s")(stats.mean) + unit + ")")
                         .attr("text-anchor", "start")
                         .attr("dominant-baseline", "central")
                         .attr("fill", "black")
-                        .attr("x", w - margin_h + 2)
+                        .attr("x", w - margin_h)
                         .attr("y", y(total))]);
                 } else {
                     var y = d3.scale.linear().domain([
                     plot(d3.select('#pool'), 'H/s', null, data_to_lines(data), true);
                 });
                 plot_later(d3.select("#peers"), "", null, [
-                    {"url": "/web/graph_data/incoming_peers/last_" + lowerperiod, "color": "#0000FF", "label": "Incoming"},
-                    {"url": "/web/graph_data/outgoing_peers/last_" + lowerperiod, "color": "#FF0000", "label": "Outgoing"}
+                    {"url": "/web/graph_data/outgoing_peers/last_" + lowerperiod, "color": "#FF0000", "label": "Outgoing"},
+                    {"url": "/web/graph_data/incoming_peers/last_" + lowerperiod, "color": "#0000FF", "label": "Incoming"}
                 ], true);
                 
                 d3.json("/web/graph_data/miner_hash_rates/last_" + lowerperiod, function(data) {