diff --git a/snippets/graph.html b/snippets/graph.html index 4a2357a..0ff9bab 100644 --- a/snippets/graph.html +++ b/snippets/graph.html @@ -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: {