|
|
@@ -35,8 +35,10 @@ WebSocketTest.prototype.send = function (s) { |
|
|
|
msg[2] = Infinity; |
|
|
|
var loidx, hiidx; |
|
|
|
loidx = fakedata.production.bisect([msg[1], 0]); |
|
|
|
hiidx = fakedata.production.bisect([msg[2], 0]); |
|
|
|
var subar = fakedata.production.slice(loidx, hiidx + 1); |
|
|
|
if (loidx > 0) |
|
|
|
loidx -= 1; |
|
|
|
hiidx = fakedata.production.bisect([msg[2], 0]) + 1; |
|
|
|
var subar = fakedata.production.slice(loidx, hiidx); |
|
|
|
var data = { |
|
|
|
"production": subar, |
|
|
|
"consumption": subar, |
|
|
|