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 label;
|
||||||
var labels = {};
|
var labels = {};
|
||||||
|
var forceNiceScale = true;
|
||||||
$(".button").removeClass("is-success");
|
$(".button").removeClass("is-success");
|
||||||
if (property=="t") {
|
if (property=="t") {
|
||||||
$("#btn_t").addClass("is-success");
|
$("#btn_t").addClass("is-success");
|
||||||
|
|
@ -174,6 +175,7 @@ function drawGraph(deveui, alias, property, start, stop, create_graph) {
|
||||||
mysubtitle = 'Akkuladung in Prozent';
|
mysubtitle = 'Akkuladung in Prozent';
|
||||||
minfunc = function(min) { return 0 }
|
minfunc = function(min) { return 0 }
|
||||||
maxfunc = function(max) { return 100 }
|
maxfunc = function(max) { return 100 }
|
||||||
|
forceNiceScale = false;
|
||||||
} else if (property=="w") {
|
} else if (property=="w") {
|
||||||
$("#btn_w").addClass("is-success");
|
$("#btn_w").addClass("is-success");
|
||||||
label = 'Gewicht';
|
label = 'Gewicht';
|
||||||
|
|
@ -191,6 +193,7 @@ function drawGraph(deveui, alias, property, start, stop, create_graph) {
|
||||||
mysubtitle = 'Luftfeuchtigkeit in Prozent';
|
mysubtitle = 'Luftfeuchtigkeit in Prozent';
|
||||||
minfunc = function(min) { return 0 }
|
minfunc = function(min) { return 0 }
|
||||||
maxfunc = function(max) { return 100 }
|
maxfunc = function(max) { return 100 }
|
||||||
|
forceNiceScale = false;
|
||||||
} else if (property=="p") {
|
} else if (property=="p") {
|
||||||
$("#btn_p").addClass("is-success");
|
$("#btn_p").addClass("is-success");
|
||||||
label = 'Luftdruck';
|
label = 'Luftdruck';
|
||||||
|
|
@ -238,7 +241,7 @@ function drawGraph(deveui, alias, property, start, stop, create_graph) {
|
||||||
yaxis: {
|
yaxis: {
|
||||||
min: minfunc,
|
min: minfunc,
|
||||||
max: maxfunc,
|
max: maxfunc,
|
||||||
forceNiceScale: true,
|
forceNiceScale: forceNiceScale,
|
||||||
labels: labels
|
labels: labels
|
||||||
},
|
},
|
||||||
tooltip: {
|
tooltip: {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue