Added offset to max Y in temperature chart

This commit is contained in:
Nicanor Romero Venier 2015-09-30 09:20:40 +02:00
parent 2674741797
commit 4a7c81d1c6

View file

@ -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);
}
};