From 4a7c81d1c6aa196bec63bc7fd41894419c2a1745 Mon Sep 17 00:00:00 2001 From: Nicanor Romero Venier Date: Wed, 30 Sep 2015 09:20:40 +0200 Subject: [PATCH] Added offset to max Y in temperature chart --- src/octoprint/static/js/app/viewmodels/temperature.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/octoprint/static/js/app/viewmodels/temperature.js b/src/octoprint/static/js/app/viewmodels/temperature.js index 964e7b29..dc75c9f8 100644 --- a/src/octoprint/static/js/app/viewmodels/temperature.js +++ b/src/octoprint/static/js/app/viewmodels/temperature.js @@ -232,7 +232,7 @@ $(function() { var heaterOptions = self.heaterOptions(); if (!heaterOptions) return; - var maxTemps = [310]; + var maxTemps = [310/1.1]; _.each(_.keys(heaterOptions), function(type) { if (type == "bed" && !self.hasBed()) { @@ -264,8 +264,7 @@ $(function() { maxTemps.push(self.getMaxTemp(actuals, targets)); }); - self.plotOptions.yaxis.max = Math.max.apply(null, maxTemps); - self.plotOptions.yaxis.ticks = self.plotOptions.yaxis.max / 30; + self.plotOptions.yaxis.max = Math.max.apply(null, maxTemps) * 1.1; $.plot(graph, data, self.plotOptions); } };