Ad Widget

Collapse

Graph background color based on chosen theme

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • nleaman
    Member
    • May 2010
    • 35

    #1

    Graph background color based on chosen theme

    I cannot figure out how chart2.php, for example, produces a dark background for graphs for some themes, and a light background for others. I have a theme I created that looks great, but the graphs are light when I want them dark.

    Anyone have any insight regarding how this works?
  • richlv
    Senior Member
    Zabbix Certified Trainer
    Zabbix Certified SpecialistZabbix Certified Professional
    • Oct 2005
    • 3112

    #2
    see table graph_theme in the database
    Zabbix 3.0 Network Monitoring book

    Comment

    • nleaman
      Member
      • May 2010
      • 35

      #3
      Originally posted by richlv
      see table graph_theme in the database
      So... I'm guessing the graph themes get applied when the stylesheet name matches the theme name in the graph_theme table. Yet there are only two rows in the table: "css_ob.css" and "css_bb.css", no css_od.css, but somehow the css_od.css uses the "css_bb.css" theme.

      So how does css_od.css use "css_bb.css" theme? I want my new custom css to use "css_bb.css" graph them too.

      I suppose I could make a third row to match the name of my custom .css file, but the mystery of how the css_od.css (Orange Dark) uses the css_bb.css (Black and Blue) graph theme is bothering me.

      Comment

      • richlv
        Senior Member
        Zabbix Certified Trainer
        Zabbix Certified SpecialistZabbix Certified Professional
        • Oct 2005
        • 3112

        #4
        i do have a bad suspicion that it might be currently hardcoded...

        ./include/classes/class.cgraphdraw.php has the following :
        Code:
        if($css == 'css_od.css') $css = 'css_bb.css';
        Zabbix 3.0 Network Monitoring book

        Comment

        • nleaman
          Member
          • May 2010
          • 35

          #5
          Originally posted by richlv
          i do have a bad suspicion that it might be currently hardcoded...

          ./include/classes/class.cgraphdraw.php has the following :
          Code:
          if($css == 'css_od.css') $css = 'css_bb.css';
          That makes sense. Thanks for your help.
          Last edited by nleaman; 27-08-2011, 23:13.

          Comment

          Working...