luci-app-statistics: cpufreq: enhance additional data
authorHannu Nyman <hannu.nyman@iki.fi>
Wed, 31 Jul 2019 21:49:05 +0000 (00:49 +0300)
committerHannu Nyman <hannu.nyman@iki.fi>
Wed, 31 Jul 2019 22:06:25 +0000 (01:06 +0300)
* Use the new data series sorting and coloring options to
  display the frequencies in order and with matching coloring in
  different cores.

* Fix the y-axis text and legend in the frequency usage graph

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

index 40a6955e53a13dfd3ff4c20829f49db208c5a252..d3596637b22330223f4abf5ea138527b30ccd48b 100644 (file)
@@ -42,12 +42,13 @@ function rrdargs( graph, plugin, plugin_instance, dtype )
        local percentage = {
                title = "%H: Frequency distribution - core %pi",
                alt_autoscale = true,
-               vlabel = "Frequency (Hz)",
+               vlabel = "Percent",
                number_format = "%5.2lf%%",
+               ordercolor = true,
                data = {
                        types = { "percent" },
                        options = {
-                               percent = { title = "Frequency %di" },
+                               percent = { title = "%di Hz", negweight = true },
                        }
                }
        }