diff options
author | Hannu Nyman <hannu.nyman@iki.fi> | 2015-08-23 21:02:14 +0300 |
---|---|---|
committer | Hannu Nyman <hannu.nyman@iki.fi> | 2015-08-23 21:02:14 +0300 |
commit | 86ff4bd3a4a39674c51bd52576a0a87e803a7c53 (patch) | |
tree | 73a02e22fe3b4e3622dbc3b7d6f55cb8be9c993a /applications/luci-app-statistics/luasrc/statistics/rrdtool.lua | |
parent | 37f6bd557d56dec0c98a4e25a1acd111203cb3b8 (diff) |
statistics: support rrdtool's alt_autoscale and alt_autoscale_max options
Implement support for alternative scaling of the y-axis.
By default, rrdtool will autoscale to 1,2,5,10,20,50,100,200,... etc.,
which is not always suitable (e.g. memory charts for device with 128 MB).
Rrdtool 1.0.50 already supports alternative autoscaling that creates
a tighter y-axis. Implement graph-level options in Luci statistics to
support those boolean options as "alt_autoscale" and "alt_autoscale_max".
info at http://oss.oetiker.ch/rrdtool/doc/rrdgraph.en.html
Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
Diffstat (limited to 'applications/luci-app-statistics/luasrc/statistics/rrdtool.lua')
-rw-r--r-- | applications/luci-app-statistics/luasrc/statistics/rrdtool.lua | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/applications/luci-app-statistics/luasrc/statistics/rrdtool.lua b/applications/luci-app-statistics/luasrc/statistics/rrdtool.lua index 1f8f4ff88b..d8317a8177 100644 --- a/applications/luci-app-statistics/luasrc/statistics/rrdtool.lua +++ b/applications/luci-app-statistics/luasrc/statistics/rrdtool.lua @@ -457,6 +457,12 @@ function Graph._generic( self, opts, plugin, plugin_instance, dtype, index ) _ti ( _args, "-X" ) _ti ( _args, opts.units_exponent ) end + if opts.alt_autoscale then + _ti ( _args, "-A" ) + end + if opts.alt_autoscale_max then + _ti ( _args, "-M" ) + end -- store additional rrd options if opts.rrdopts then |