luci_statistics: Add y_min, y_max, units_exponent options and clean up some graphs
[project/luci.git] / applications / luci-statistics / luasrc / statistics / rrdtool / definitions / nut.lua
index 421c7a2..69f1ae3 100644 (file)
@@ -53,6 +53,8 @@ function rrdargs( graph, plugin, plugin_instance, dtype )
        local percentage = {
                title = "%H: Battery charge on UPS \"%pi\"",
                vlabel = "Percent",
+               y_min = "0",
+               y_max = "100",
                number_format = "%5.1lf%%",
                data = {
                        sources = {
@@ -86,7 +88,7 @@ function rrdargs( graph, plugin, plugin_instance, dtype )
        local timeleft = {
                title = "%H: Time left on UPS \"%pi\"",
                vlabel = "Minutes",
-               number_format = "%7lfm",
+               number_format = "%.1lfm",
                data = {
                        sources = {
                                timeleft = { "timeleft" }
@@ -95,7 +97,7 @@ function rrdargs( graph, plugin, plugin_instance, dtype )
                                timeleft = { "battery" }
                        },
                        options = {
-                               timeleft_battery = { color = "0000ff", title = "Time left"}
+                               timeleft_battery = { color = "0000ff", title = "Time left", transform_rpn = "60,/" }
                        }
                }
        }