statistics: memory plugin - improve graph by better scaling of y-axis 450/head
authorHannu Nyman <hannu.nyman@iki.fi>
Sun, 23 Aug 2015 18:12:56 +0000 (21:12 +0300)
committerHannu Nyman <hannu.nyman@iki.fi>
Sun, 23 Aug 2015 18:12:56 +0000 (21:12 +0300)
Utilise alt_autoscale_max to make the memory chart y-axis to scale better
for devices with e.g. 128 MB RAM.

Also fix the axis min value to 0.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/memory.lua

index a1c65f56d725a98f11d1cf2ef1acbb33a8ca26ec..53d559c599fc74b6943cb388fa3c46f8d3877f4f 100644 (file)
@@ -17,6 +17,8 @@ function rrdargs( graph, plugin, plugin_instance, dtype )
                title = "%H: Memory usage",
                vlabel = "MB",
                number_format = "%5.1lf%s",
+               y_min = "0",
+               alt_autoscale_max = true,
                data = {
                        instances = { 
                                memory = { "free", "buffered", "cached", "used" }