diff --git a/reference/rrd/rrdgraph/setoptions.xml b/reference/rrd/rrdgraph/setoptions.xml index ccaa9a8563..66b6fc0bb0 100644 --- a/reference/rrd/rrdgraph/setoptions.xml +++ b/reference/rrd/rrdgraph/setoptions.xml @@ -45,7 +45,7 @@ &reftitle.examples; - <methodname>RRDGraph::setOptions</methodname> examples + <methodname>RRDGraph::setOptions</methodname> example setOptions(array( "LINE2:realspeed#FF0000" )); ?> +]]> + + + + + Set multiple color options + +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. + + +setOptions(array( + "--color" => "BACK#00000000", + "--color" => "GRID#00000000", + "--color" => "MGRID#00000000" +)); +?> +]]> + + + In nature of php it's same as + + +setOptions(array( + "--color" => "MGRID#00000000" +)); +?> ]]>