paramters in SHIFT are separated by : like everywhere else
[rrdtool.git] / doc / rrdgraph.src
index 3f9bda8..b829a7b 100644 (file)
@@ -1,11 +1,10 @@
 =include name
 
-=head1 SYNOPSYS
+=head1 SYNOPSIS
 
 B<rrdtool graph> I<filename>
 [E<lt>B<L<option|rrdgraph/OPTIONS>>E<gt> ...]
-E<lt>B<L<data definition|rrdgraph_data/DEF>>E<gt>
-[E<lt>B<L<data definition|rrdgraph_data/DEF>>E<gt> ...]
+E<lt>B<L<data definition|rrdgraph_data/DEF>>E<gt>[ ...]
 [E<lt>B<L<data calculation|rrdgraph_data/CDEF>>E<gt> ...]
 [E<lt>B<L<variable definition|rrdgraph_data/VDEF>>E<gt> ...]
 [E<lt>B<L<graph element|rrdgraph_graph/GRAPH>>E<gt> ...]
@@ -13,7 +12,7 @@ E<lt>B<L<data definition|rrdgraph_data/DEF>>E<gt>
 
 =head1 DESCRIPTION
 
-The B<graph> function of B<RRDtool> is used to represent the
+The B<graph> function of B<RRDtool> is used to present the
 data from an B<RRD> to a human viewer.  Its main purpose is to
 create a nice graphical representation but it can also generate
 a numerical report.
@@ -61,7 +60,7 @@ statements (after all, most of them do define graph elements...).
 =item filename
 
 The name and path of the graph to generate. It is recommended to
-end this in C<.png> or C<.gif> but B<rrdtool> does not enforce this.
+end this in C<.png>, C<.svg> or C<.eps> but B<RRDtool> does not enforce this.
 
 I<filename> can be 'C<->' to send the image to C<stdout>. In
 that case, no other output is generated.  
@@ -72,7 +71,7 @@ Z<>
 
 B<[-s|--start E<lt>timeE<gt>]>
 B<[-e|--end E<lt>timeE<gt>]>
-B<[--step E<lt>secondsE<gt>]>
+B<[-S|--step E<lt>secondsE<gt>]>
 
 The start and end of what you would like to display, and which
 B<RRA> the data should come from.  Defaults are: 1 day ago until
@@ -103,11 +102,16 @@ Z<>
 =item Size
 
 B<[-w|--width E<lt>pixelsE<gt>]>
-B<[-h|--heigth E<lt>pixelsE<gt>]>
+B<[-h|--height E<lt>pixelsE<gt>]>
+B<[-j|--only-graph]>
 
 The width and height of the B<canvas> (the part of the graph with
 the actual lines and such). Defaults are 400 pixels by 100 pixels.
 
+If you specify the B<--only-graph> and set the height < 32 pixels you will
+get a tiny graph image to use as an icon in a potential overview. All
+labeling will be stripped off the graph.
+
 Z<>
 
 =item Limits
@@ -134,7 +138,7 @@ By default the graph will be autoscaling so that it displays the
 portion of the y-axis that is actually used. You can change this
 behaviour by setting the limits.  The displayed y-axis will show
 at most B<maximum-upper-limit> and at least B<minimum-upper-limit>
-at the top, and similarily at least B<maximum-lower-limit> and
+at the top, and similarly at least B<maximum-lower-limit> and
 at most B<minimum-lower-limit> at the bottom.  The default is to
 display at most B<infinity> (so: no limit) and at least
 B<negative infinity> (no minimal value) at the top. The bottom of
@@ -154,7 +158,7 @@ To mimic the old B<rigid> option, you can do:
 --maximum-upper-limit 4000 --minimum-upper-limit 4000
 --maximum-lower-limit -3000 --minimum-lower-limit -3000
 
-B<[--alt-autoscale]>
+B<[-A|--alt-autoscale]>
 
 Sometimes the default algorithm for selecting the y-axis scale is not
 performing very well.  Normally the scale is selected from a predefined
@@ -164,7 +168,7 @@ maximum y-axis from the actual minimum and maximum values. Our example
 would display slightly less than C<260-0.001> to slightly more than
 C<260+0.001> (Contributed by Sasha Mikheev).
 
-B<[--alt-autoscale-max]>
+B<[-M|--alt-autoscale-max]>
 
 Where C<--alt-autoscale> will modify both the absolute maximum AND minimum
 values, this option will only affect the maximum value. The minimum
@@ -172,6 +176,18 @@ value, if not defined on the command line, will be 0. This option can
 be useful when graphing router traffic when the WAN line uses compression,
 and thus the throughput may be higher than the WAN line speed.
 
+B<[-N|--no-gridfit]>
+
+To avoid anti-aliasing effects gridlines are placed on 
+integer pixel values. This is by default done by extending 
+the scale so gridlines happens to be spaced using an 
+integer number of pixels, and starts on integer pixel value.
+This might extend the scale too much for some logarithmic scales
+and for linear scales where --alt-autoscale is needed.
+Using --no-gridfit disables modification of the scale,
+and just truncates y-coordinates to integer values for bitmap
+formats.
+
 Z<>
 
 =item Grid
@@ -180,7 +196,9 @@ Z<>
 
 =item X-Axis
 
-B<[-x|--x-grid E<lt>I<GTMC<:>GSTC<:>MTMC<:>MSTC<:>LTMC<:>LSTC<:>LPRC<:>LFM>E<gt>|C<none>]>
+B<[-x|--x-grid E<lt>I<GTMC<:>GSTC<:>MTMC<:>MSTC<:>LTMC<:>LSTC<:>LPRC<:>LFM>E<gt>]>
+
+B<[-x|--x-grid C<none>]>
 
 The x-axis label is quite complex to configure, if you don't have
 very special needs it is probably best to rely on the autoconfiguration
@@ -197,7 +215,7 @@ in I<LPR> and a I<strftime> format string in I<LFM>.  I<LPR> defines
 where each label will be placed. If it is zero, the label will be
 placed right under the corresponding line (useful for hours, dates
 etcetera).  If you specify a number of seconds here the label is
-centered in this interval (useful for monday, januari etcetera).
+centered in this interval (useful for Monday, January etcetera).
 
 Example: C<--x-grid MINUTE:10:HOUR:1:HOUR:4:0:%X>
 
@@ -215,14 +233,16 @@ Z<>
 
 =item Y-Axis
 
-B<[-y|--y-grid I<E<lt>grid stepE<gt>:E<lt>label factorE<gt>>|C<none>]>
+B<[-y|--y-grid I<E<lt>grid stepE<gt>:E<lt>label factorE<gt>>]>
+
+B<[-y|--y-grid C<none>]>
 
 Y-axis grid lines appear at each I<grid step> interval.  Labels are
 placed every I<label factor> lines.  You can specify C<-y none> to
 skip the grid and labels altogether.  The default for this option is
 to automatically select sensible values.
 
-B<[--alt-y-grid]>
+B<[-Y|--alt-y-grid]>
 
 Place Y grid dynamically based on graph Y range. Algorithm ensures
 that you always have grid, that there are enough but not too many
@@ -233,7 +253,7 @@ B<[-o|--logarithmic]>
 
 Logarithmic y-axis scaling.
 
-B<[--units-exponent E<lt>valueE<gt>]>
+B<[-X|--units-exponent E<lt>valueE<gt>]>
 
 This sets the 10**exponent scaling of the y-axis values.  Normally
 values will be scaled to the appropriate units (k, M, etc.).  However
@@ -269,29 +289,54 @@ would look like this:
 
     --imginfo '<IMG SRC="/img/%s" WIDTH="%lu" HEIGHT="%lu" ALT="Demo">'
 
-B<[-c|--color I<COLORTAG#rrggbb>]>
+B<[-c|--color I<COLORTAG>#I<rrggbb>[I<aa>]]>
 
-Override the default colors for the standard elements of the graph.
-The I<COLORTAG> is one of C<BACK> ground, C<CANVAS>, C<SHADEA> for the
-left and top border, C<SHADEB> for the right and bottom border, C<GRID>,
-C<MGRID> for the major grid, C<FONT>, C<FRAME> and axis, C<ARROW>.
-Each color is composed out of three hexadecimal numbers specifying
-its color component (00 is off, FF is maximum) of red, green and blue.
-You may set this option several times to alter multiple defaults.
+Override the default colors for the standard elements of the graph. The
+I<COLORTAG> is one of C<BACK> background, C<CANVAS> for the background of
+the actual graph, C<SHADEA> for the left and top border, C<SHADEB> for the
+right and bottom border, C<GRID>, C<MGRID> for the major grid, C<FONT> for
+the color of the font, C<AXIS> for the axis of the graph and finaly C<ARROW>
+for the arrow head pointing to the future. Each color is composed out of
+three hexadecimal numbers specifying its color component (00 is off, FF is
+maximum) of red, green and blue. Optionally you may add another hexadecimal
+number specifying the transparency (FF is solid). You may set this option
+several times to alter multiple defaults.
 
 A green arrow is made by: C<--color ARROW:00FF00>
 
-B<[-a|--imgformat C<GIF>|C<PNG>]>
+B<[--zoom I<factor>]>
+
+Zoom the graphics by the given amount ... The factor must be E<gt> 0
+
+B<[-n|--font I<FONTTAG>B<:>I<size>B<:>I<font>]>
+
+Lets you customize which font to use for the various text elements on the
+RRD graphs. C<DEFAULT> sets the default value for all elements C<TITLE>,
+C<AXIS> for the axis labels, C<UNIT> for the vertical unit label, C<LEGEND>
+for the graph legend.
+
+Use Times for the title: C<--font TITLE:13:/usr/lib/fonts/times.ttf>
+
+B<[-a|--imgformat C<PNG>|C<SVG>|C<EPS>|C<PDF>]>
+
+Image format for the generated graph.
+
 B<[-i|--interlaced]>
 
-The default is to generate a non-interlaced GIF image. It is recommended
-to generate PNG graphics as they take up to 40% less disk space and
-20-30% less time to generate.
+If images are interlaced they become visible on browsers more quickly.
 
 B<[-g|--no-legend]>
 
 Suppress generation of legend; only render the graph.
 
+B<[-F|--force-rules-legend]>
+
+Force the generation of HRULE and VRULE legend even if those HRULE or VRULE will not be drawn because out of graph boundaries (mimics behaviour of pre 1.0.42 versions).
+
+B<[-T|--tabwidth E<lt>valueE<gt>]>
+
+By default the tab-width is 40 pixels, use this option to change it.
+
 B<[-b|--base E<lt>valueE<gt>]>
 
 If you are graphing memory (and NOT network traffic) this switch
@@ -302,7 +347,7 @@ Z<>
 
 =item Data and variables
 
-B<DEF:>I<E<lt>vnameE<gt>>=I<E<lt>rrdfileE<gt>>:I<E<lt>ds-nameE<gt>>:I<E<lt>CFE<gt>>[:[I<E<lt>time rangeE<gt>>][:I<E<lt>step timeE<gt>>]]
+B<DEF:>I<E<lt>vnameE<gt>>=I<E<lt>rrdfileE<gt>>:I<E<lt>ds-nameE<gt>>:I<E<lt>CFE<gt>>[:step=I<E<lt>stepE<gt>>][:start=I<E<lt>timeE<gt>>][:end=I<E<lt>timeE<gt>>]
 
 B<CDEF:>I<E<lt>vnameE<gt>>=I<E<lt>RPN expressionE<gt>>