Percent values must not be more than 100 on scale
This commit is contained in:
parent
59e83c7cc0
commit
be98dc257a
|
|
@ -161,6 +161,7 @@ function drawGraph(deveui, alias, property, start, stop, create_graph) {
|
|||
|
||||
var label;
|
||||
var labels = {};
|
||||
var forceNiceScale = true;
|
||||
$(".button").removeClass("is-success");
|
||||
if (property=="t") {
|
||||
$("#btn_t").addClass("is-success");
|
||||
|
|
@ -174,6 +175,7 @@ function drawGraph(deveui, alias, property, start, stop, create_graph) {
|
|||
mysubtitle = 'Akkuladung in Prozent';
|
||||
minfunc = function(min) { return 0 }
|
||||
maxfunc = function(max) { return 100 }
|
||||
forceNiceScale = false;
|
||||
} else if (property=="w") {
|
||||
$("#btn_w").addClass("is-success");
|
||||
label = 'Gewicht';
|
||||
|
|
@ -191,6 +193,7 @@ function drawGraph(deveui, alias, property, start, stop, create_graph) {
|
|||
mysubtitle = 'Luftfeuchtigkeit in Prozent';
|
||||
minfunc = function(min) { return 0 }
|
||||
maxfunc = function(max) { return 100 }
|
||||
forceNiceScale = false;
|
||||
} else if (property=="p") {
|
||||
$("#btn_p").addClass("is-success");
|
||||
label = 'Luftdruck';
|
||||
|
|
@ -238,7 +241,7 @@ function drawGraph(deveui, alias, property, start, stop, create_graph) {
|
|||
yaxis: {
|
||||
min: minfunc,
|
||||
max: maxfunc,
|
||||
forceNiceScale: true,
|
||||
forceNiceScale: forceNiceScale,
|
||||
labels: labels
|
||||
},
|
||||
tooltip: {
|
||||
|
|
|
|||
Loading…
Reference in New Issue