rrd_graph

(PECL rrd >= 0.9.0)

rrd_graphCreates image from a data.

Description

array rrd_graph ( string $filename , array $options )

Creates image for a particular data from RRD file.

Parameters

filename

The filename to output the graph to. This will generally end in either .png, .svg or .eps, depending on the format you want to output.

options

Options for generating image. See man page of rrd graph for all possible options. All options (data definitions, variable defintions, etc.) are allowed.

Return Values

Array with information about generated image is returned, FALSE when error occurs.

Коментарии

Автор:
Note; apache server requires write access to the folder in which the image is to be created otherwise no image file is produced, and (unhelpfully) no error is generated.
2012-05-13 11:38:59
http://php5.kiev.ua/manual/ru/function.rrd-graph.html
Автор:
You can get the latest RRD Error by simply doing print_r(rrd_error()) immediately after the rrd_graph() call.
2013-07-05 20:55:36
http://php5.kiev.ua/manual/ru/function.rrd-graph.html
Автор:
When I add 

--font AXIS:8:

into $options, 

I receive the next error:

PNG creation error: unknown option '--font AXIS:8:'

According to docs from rrdtool site the right syntax is:

[-n|--font FONTTAG:size:[font]]

This lets you customize which font to use for the various text elements on the RRD graphs. DEFAULT sets the default value for all elements, TITLE for the title, AXIS for the axis labels, UNIT for the vertical unit label, LEGEND for the graph legend, WATERMARK for the watermark on the edge of the graph.

Use Times for the title: --font TITLE:13:Times

Note that you need to quote the argument to --font if the font-name contains whitespace: --font "TITLE:13:Some Font"

If you do not give a font string you can modify just the size of the default font: --font TITLE:13:.
2013-07-31 02:16:21
http://php5.kiev.ua/manual/ru/function.rrd-graph.html
When using style features like:  --font TITLE:13:Times
use in your code: --font=TITLE:13:Times

the "=" is missing in the documentation
2015-02-27 11:39:40
http://php5.kiev.ua/manual/ru/function.rrd-graph.html
Автор:
This documentation page is useless ... 

"See man page of rrd graph for all possible options"

I thought I am looking at the documentation, of not, why not provide a link ?
2020-01-09 16:48:09
http://php5.kiev.ua/manual/ru/function.rrd-graph.html
Автор:
For a rrdgraph doc/man page see:

https://docs.oracle.com/cd/E88353_01/html/E37839/rrdgraph-1.html
2020-01-10 18:20:10
http://php5.kiev.ua/manual/ru/function.rrd-graph.html

    Поддержать сайт на родительском проекте КГБ