Browse Source

include a preceeding data point so that lines that are off the

graph draw more nicely..
main
John-Mark Gurney 4 years ago
parent
commit
610524ab9b
1 changed files with 4 additions and 2 deletions
  1. +4
    -2
      root/js/solardash.file.jspp

+ 4
- 2
root/js/solardash.file.jspp View File

@@ -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,


Loading…
Cancel
Save