[rrd-users] Can this kind of chart be drawn with RRDTool ?
koaps at yahoo.com
Fri Feb 12 02:03:31 CET 2010
you can try using php gd to merge the images.
You would have to make the background image in GD or have several premade backgrounds for the different times of day and you pick one based on when the script is run.
When you run rrdtool graph you set the canvas to transparent white:
Then you can merge it with the background.
$background = imagecreatefromjpeg("bg.jpg");
$insert = imagecreatefrompng("fg.png");
// Either a color at a specific point on the image
// or a specific color (the color I used is magenta, #ff00ff)
$insert_x = imagesx($insert);
$insert_y = imagesy($insert);
// As said above, you can't use imagecopy (bug?)
// imagejpeg or imagepng doesn't matter here
You can get an image like this....
--- On Thu, 2/11/10, A Darren Dunham <ddunham at taos.com> wrote:
> From: A Darren Dunham <ddunham at taos.com>
> Subject: Re: [rrd-users] Can this kind of chart be drawn with RRDTool ?
> To: rrd-users at lists.oetiker.ch
> Date: Thursday, February 11, 2010, 3:51 PM
> On Thu, Feb 11, 2010 at 08:27:51PM
> +1100, Jean-Yves Avenard wrote:
> > I'd like to draw something like this:
> > http://i46.tinypic.com/5bd3et.png
> > Pretty much, it's a solar power chart ; the backround
> would show the
> > ephemeris of the Sun ; dark when it's night time,
> gradually lighter
> > and then a different colour.. Pretty much using
> > The grid would be drawn on top of it...
> I don't know how to do that exactly (grid on top
> especially), but you
> could do an AREA graph with the color you want from bottom
> to top, and
> then give it some transparency so the grid shows through.
> You could even draw the sun by creating a hemispherical
> data set and
> graphing that in AREA with yellow.
> rrd-users mailing list
> rrd-users at lists.oetiker.ch
More information about the rrd-users