How to change the background of graph?

If you figure out how to do something interesting/cool in Cacti and want to share it with the community, please post your experience here.

Moderators: Developers, Moderators

Post Reply
Tomek
Posts: 1
Joined: Fri Oct 09, 2009 8:44 am

How to change the background of graph?

Post by Tomek »

Hello.
Like in topic. How to change the background of graph, because I don't want to have the white one. I found
http://forums.cacti.net/about2930.html
but it isn't working, php have problems.
User avatar
trik
Posts: 12
Joined: Mon Sep 21, 2009 2:21 pm

Post by trik »

Hello,

You can't change the background of a graph with cacti.
Cacti use an image file generated by RRDtool.
The only thing that you can change, is the label at the bottom on the graph.
But, this use an RRD function to add a single text.

I think the only way to do this is to include an custom image merge function with GD in cacti php file. Warning, cacti performance decrease on consultation if you do that...

Regards,
Debian 5.0.3 / Php 5.2.6
Cacti 0.8.7e / Spine 0.8.7e
miaubl
Posts: 2
Joined: Mon Sep 28, 2009 3:06 pm
Contact:

Post by miaubl »

trik wrote:I think the only way to do this is to include an custom image merge function with GD in cacti php file.
Yep, image merge in PHP is costly. Maybe, it's easy to change code in RRDTool ? - it's GNU also.. Or, just get use to current background color (much easier :) )
[url=http://timberfrog.com/store/index.cgi?SearchIndex=DVD&BrowseNode=163357&locale=us&T=Comedy]:)[/url]
jgilmour
Posts: 21
Joined: Tue Oct 13, 2009 10:02 pm

Post by jgilmour »

Worked for me with NxTrek's suggestion
"-c CANVAS#000000 -c FONT#FFFFFF -c BACK#000000 --title=\"" . $graph["title_cache"] . "\"" . RRD_NL .
in rrdtool.php
clevorguy
Posts: 2
Joined: Thu Jan 07, 2010 2:38 pm

Post by clevorguy »

This worked for me.

8.7e
rrd.php file under lib.
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

COLORTAG will be fully supported with 088
- on a system global setting
- user specific setting
- graph template setting
Override rules can be set system-wide
R
sync32
Posts: 4
Joined: Sat Mar 24, 2012 2:09 pm

Re: How to change the background of graph?

Post by sync32 »

Did this feature make the cut for 0.8.8b?
ohhteriiii
Posts: 1
Joined: Tue Jan 20, 2015 3:01 am

Re: How to change the background of graph?

Post by ohhteriiii »

Image merge in PHP is costly. Maybe, it's easy to change code in RRDTool ? - it's GNU also.. Or, just get use to current background color (much easier :) )???
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests