Doc #65756 [Csd]: RRDGraph->setOptions wont accept multiple --color options
| From: | koubel@php.net | Date: | Mon, 13 Jan 2014 22:36:01 +0000 |
| Subject: | Doc #65756 [Csd]: RRDGraph->setOptions wont accept multiple --color options | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-10841@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=65756&edit=1
ID: 65756
Updated by: koubel@php.net
Reported by: shaun dot reitan at ndchost dot com
Summary: RRDGraph->setOptions wont accept multiple --color
options
Status: Closed
Type: Documentation Problem
Package: rrd
Operating System: Linux/CentOS/RHEL
PHP Version: Irrelevant
Assigned To: koubel
Block user comment: N
Private report: N
New Comment:
This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.
Thank you for the report, and for helping us make our documentation better.
Previous Comments:
------------------------------------------------------------------------
[2014-01-13 22:33:27] koubel@php.net
The fix for this bug has been committed.
Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
For Windows:
http://windows.php.net/snapshots/
Thank you for the report, and for helping us make PHP better.
------------------------------------------------------------------------
[2014-01-13 22:31:23] koubel@php.net
Automatic comment from SVN on behalf of koubel
Revision: http://svn.php.net/viewvc/?view=revision&revision=332610
Log: rrd: more examples for RRDGraph::setOptions #65756
------------------------------------------------------------------------
[2013-10-01 08:15:58] koubel@php.net
You declare array with same key multiple times, hence your argument for the setOption call like:
array(
'--color' => 'BACK#00000000',
'--color' => 'GRID#00000000',
'--color' => 'MGRID#00000000',
);
is in fact only:
array(
'--color' => 'MGRID#00000000'
);
this is the nature of php arrays.
Solution is suggested by Brian. I agree with the better docs, but I need to find the repo with the
php-docs, it takes some time, it's little bit complicated for me modifying the php-docs one per
many years.
------------------------------------------------------------------------
[2013-09-28 21:36:27] shaun dot reitan at ndchost dot com
Bryan,
I just figured it out the other day that I could simply do the following.
array('--color', 'BACK#00000000', '--color',
'GRID#00000000', ...);
As much as i liked using a key/value pair for easy reading, I decided to just
stick with each option being an array value like above.
Also, maybe we should update the php docs to show an example of this?
------------------------------------------------------------------------
[2013-09-28 21:28:58] bryandamage at gmail dot com
i've been able to get multiple color switch using this format.
$rrdgraph = new RRDGraph("-");
$rrdgraph->setOptions( array(
'--color=BACK#00000000',
'--color=GRID#00000000',
'--color=MGRID#00000000',
));
$rrddata = $rrdgraph->saveVerbose();
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
https://bugs.php.net/bug.php?id=65756
--
Edit this bug report at https://bugs.php.net/bug.php?id=65756&edit=1