array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'tr', ), 'this' => array ( 0 => 'rrdgraph.setoptions.php', 1 => 'RRDGraph::setOptions', 2 => 'Sets the options for rrd graph export', ), 'up' => array ( 0 => 'class.rrdgraph.php', 1 => 'RRDGraph', ), 'prev' => array ( 0 => 'rrdgraph.saveverbose.php', 1 => 'RRDGraph::saveVerbose', ), 'next' => array ( 0 => 'class.rrdupdater.php', 1 => 'RRDUpdater', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'en', 'path' => 'reference/rrd/rrdgraph/setoptions.xml', ), 'history' => array ( ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); contributors($setup); ?>
(PECL rrd >= 0.9.0)
RRDGraph::setOptions — Sets the options for rrd graph export
optionsHiçbir değer dönmez.
Örnek 1 RRDGraph::setOptions() example
<?php
$graphObj->setOptions(array(
"--start" => "920804400",
"--end" => 920808000,
"--vertical-label" => "m/s",
"DEF:myspeed=$rrdFile:speed:AVERAGE",
"CDEF:realspeed=myspeed,1000,*",
"LINE2:realspeed#FF0000"
));
?>Örnek 2 Set multiple color options
<?php
$graphObj->setOptions(array(
"--start" => "920804400",
"--end" => 920808000,
"--vertical-label" => "m/s",
"--color=BACK#00000000",
"--color=GRID#00000000",
"--color=MGRID#00000000",
"DEF:myspeed=$rrdFile:speed:AVERAGE",
"CDEF:realspeed=myspeed,1000,*",
"LINE2:realspeed#FF0000"
));
?>Don't use key value syntax for same rrd option. It looks more readable, but it doesn't work.
<?php
$graphObj->setOptions(array(
"--color" => "BACK#00000000",
"--color" => "GRID#00000000",
"--color" => "MGRID#00000000"
));
?>In nature of php it's same as
<?php
$graphObj->setOptions(array(
"--color" => "MGRID#00000000"
));
?>