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;
]);
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"}
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) {