X-Git-Url: https://git.novaco.in/?a=blobdiff_plain;f=web-static%2Fgraphs.html;h=5bd8daaffe5c74bc26b445782a39152ace386ca1;hb=b142f305e6c8cfbe68e5bb5c8e2f907d5f679741;hp=11adc6cb633390ec9b4aff863f2eaff3108e10b9;hpb=228aa8ffdc1ca2de032fb162ba1c9e4372379277;p=p2pool.git diff --git a/web-static/graphs.html b/web-static/graphs.html index 11adc6c..5bd8daa 100644 --- a/web-static/graphs.html +++ b/web-static/graphs.html @@ -94,7 +94,7 @@ return {"area": top, "mean": bottom==0?null:top/bottom}; } - function plot(g, unit, total_unit, lines, stack, proportion_view, isnt_first) { + function plot(g, unit, total_unit, lines, stack, proportion_view) { // lines is a list of objects which have attributes data, color, and label var orig_unit = unit; @@ -422,7 +422,8 @@ ]); plot_later(d3.select("#local_shares"), "H/s", "H", [ {"url": "../web/graph_data/local_share_hash_rate/last_" + lowerperiod, "color": "#0000FF", "label": "Total"}, - //{"url": getData("../web/graph_data/local_dead_share_hash_rate/last_" + lowerperiod, "color": "#FF0000", "label": "Dead"} + {"url": "../web/graph_data/local_dead_share_hash_rate/last_" + lowerperiod, "color": "#FF0000", "label": "Dead"}, + {"url": "../web/graph_data/local_orphan_share_hash_rate/last_" + lowerperiod, "color": "#00FF00", "label": "Orphan"} ]); plot_later(d3.select("#payout"), currency_info.symbol, null, [ {"url": "../web/graph_data/current_payout/last_" + lowerperiod, "color": "#0000FF"} @@ -430,10 +431,9 @@ d3.json("../web/graph_data/pool_rates/last_" + lowerperiod, function(data) { plot(d3.select('#pool'), 'H/s', 'H', data_to_lines(data), true); }); - plot_later(d3.select("#peers"), "", null, [ - {"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/peers/last_" + lowerperiod, function(data) { + plot(d3.select('#peers'), '', null, data_to_lines(data, function(line){ return line.label == "incoming" }), true); + }); d3.json("../web/graph_data/miner_hash_rates/last_" + lowerperiod, function(data) { d3.json("../web/graph_data/miner_dead_hash_rates/last_" + lowerperiod, function(dead_data) {