diff --git a/lib/client/renderer.js b/lib/client/renderer.js index ba848303a9f..24ef4455800 100644 --- a/lib/client/renderer.js +++ b/lib/client/renderer.js @@ -1091,7 +1091,7 @@ function init (client, d3) { } } lastbasal = basalvalue; - date += times.mins(1).msecs; + date += times.secs(1).msecs; } var toTempBasal = profile.getTempBasal(to); diff --git a/lib/report_plugins/daytoday.js b/lib/report_plugins/daytoday.js index c44cdf0386f..8120b6eaa78 100644 --- a/lib/report_plugins/daytoday.js +++ b/lib/report_plugins/daytoday.js @@ -475,7 +475,7 @@ daytoday.report = function report_daytoday (datastorage, sorteddaystoshow, optio console.log("Device COB status available: ", cobStatusAvailable); console.log("Device IOB status available: ", iobStatusAvailable); - for (var dt = moment(from); dt < to; dt.add(5, 'minutes')) { + for (var dt = moment(from); dt < to; dt.add(1, 'seconds')) { if (options.iob && !iobStatusAvailable) { var iob = client.plugins('iob').calcTotal(datastorage.treatments, datastorage.devicestatus, profile, dt.toDate()).iob; // make the graph discontinuous when data is missing @@ -503,8 +503,8 @@ daytoday.report = function report_daytoday (datastorage, sorteddaystoshow, optio var hournow = dt.hour(); var basalvalue = profile.getTempBasal(date); // Calculate basal stats - baseBasalInsulin += basalvalue.basal * 5 / 60; // 5 minutes part - var tempPart = (basalvalue.tempbasal - basalvalue.basal) * 5 / 60; + baseBasalInsulin += basalvalue.basal * 1 / 3600; // 1 secs part + var tempPart = (basalvalue.tempbasal - basalvalue.basal) * 1 / 3600; if (tempPart > 0) { positiveTemps += tempPart; data.netBasalPositive[hournow] += tempPart;