PHPマニュアル/PEARマニュアル | ユーザフォーラムで議論/質問 | マニュアル検索 | ハイライト | ハイライトオフ | ポータル | php spot

RRDGraph::setOptions - Sets the options for rrd graph export | JavaScript入門&応用&リファレンスなら「JavaScriptist」

  

RRDGraph::setOptions

(PECL rrd >= 0.9.0)

RRDGraph::setOptionsSets the options for rrd graph export

説明

public void RRDGraph::setOptions ( array $options )

パラメータ

options

List of options for the image generation from the RRD database file. It can be list of strings or list of strings with keys for better readability. Read the rrd graph man pages for list of available options.

返り値

値を返しません。

例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"
));
?>

例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"
));
?>


忘却曲線を使ってこの知識を確実に記憶に残す

フォーラムで「RRDGraph::setOptions - Sets the options for rrd graph export」について話す
各種マニュアル: PHPマニュアル | PEARマニュアル | Smarty(英語)マニュアル | PHP-GTKマニュアル | RRDGraph::setOptions - Sets the options for rrd graph export」をGoogle検索
copyright © 1997-2024 PHP ドキュメント作成グループ(ライセンス). provided by php spot. マニュアル: