]> git.ipfire.org Git - oddments/collecty.git/commitdiff
graphs: Correctly apply area opacity
authorMichael Tremer <michael.tremer@ipfire.org>
Thu, 24 Sep 2020 12:23:59 +0000 (12:23 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Thu, 24 Sep 2020 12:23:59 +0000 (12:23 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/collecty/plugins/contextswitches.py
src/collecty/plugins/df.py

index ff3d744fc56663273cc48fbc1f90404d45a23dc3..519c3e0b70045103bbe057bd1f5390cc75d6e5d1 100644 (file)
@@ -41,7 +41,7 @@ class GraphTemplateContextSwitches(base.GraphTemplate):
                        "COMMENT:%s\\j" % (COLUMN % _("Maximum")),
 
                        "AREA:ctxt%s:%s" % (
-                               lighten(PRIMARY, AREA_OPACITY),
+                               transparency(PRIMARY, AREA_OPACITY),
                                LABEL % _("Context Switches"),
                        ),
                        "GPRINT:ctxt_cur:%s" % INTEGER,
index 948aec6d46e095aaa358475cff7e923b1c8a47f6..3a8cc6adc475e049b00ebe5efa6ae1b02cba161a 100644 (file)
@@ -45,14 +45,14 @@ class GraphTemplateDiskUsage(base.GraphTemplate):
                        "VDEF:percentage_left_now=percentage_left,LAST",
 
                        # Area for the used space
-                       "AREA:used%s:%s" % (lighten(LIGHT_RED, .66), _("Used")),
+                       "AREA:used%s:%s" % (transparency(LIGHT_RED, AREA_OPACITY), _("Used")),
                        "GPRINT:percentage_used_now: (%6.2lf%%)",
                        "GPRINT:used_cur:%12s\:" % _("Current") + " %9.2lf%s",
                        "GPRINT:used_min:%12s\:" % _("Minimum") + " %9.2lf%s",
                        "GPRINT:used_max:%12s\:" % _("Maximum") + " %9.2lf%s",
 
                        # Stacked area of unused space
-                       "AREA:free%s:%s:STACK" % (lighten(LIGHT_GREEN, .66), _("Free")),
+                       "AREA:free%s:%s:STACK" % (transparency(LIGHT_GREEN, AREA_OPACITY), _("Free")),
                        "GPRINT:percentage_left_now: (%6.2lf%%)",
                        "GPRINT:free_cur:%12s\:" % _("Current") + " %9.2lf%s",
                        "GPRINT:free_min:%12s\:" % _("Minimum") + " %9.2lf%s",