juci-wireless: wifi-graph: fix x-axis alignment ref #14546
authorReidar Cederqvist <reidar.cederqvist@gmail.com>
Mon, 9 Apr 2018 09:20:42 +0000 (11:20 +0200)
committerReidar Cederqvist <reidar.cederqvist@gmail.com>
Mon, 9 Apr 2018 09:20:42 +0000 (11:20 +0200)
plugins/juci-wireless/src/widgets/wireless-aps-graph.js

index d9efb24..877bef1 100644 (file)
@@ -123,8 +123,10 @@ JUCI.app
 
                options.dataAxis.left.range.max = maxsnr + 10;
 
-               options.min = (minch - 2);
-               options.max = (maxch + 2);
+               var padding = (maxch-minch)/10;
+
+               options.start = minch - padding;
+               options.end = maxch + padding;
 
                graph2d.setOptions(options);
                dataset.remove(dataset.getIds());