|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2013-09-24 22:06 UTC] shaun dot reitan at ndchost dot com
Description:
------------
For obvious reasons the setOptions() method of RRDGraph doesnt seam to accept multiple --color switches. Since an array is passed this makes sense being that you cant have multiple keys with the same name. I tried to not use the key => value method and pass mutliples using array( '--color BACK#00000000', '--color GRID#00000000', ...); but that doesnt appear to work either.
Not really sure what the option is to resolve this...
Test script:
---------------
$rrdgraph = new RRDGraph("-");
$rrdgraph->setOptions( array(
'--color' => 'BACK#00000000',
'--color' => 'GRID#00000000',
'--color' => 'MGRID#00000000',
));
$rrddata = $rrdgraph->saveVerbose();
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 25 00:00:02 2025 UTC |
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();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?