Code

Merged branch 'master' into experimental.
[pkg-rrdtool.git] / doc / rrdgraph.html
index dd767de2f88a20c304c92c973900dad3d6805d6e..ec76219cea760325096152b30517a98c5c428d4c 100644 (file)
        <li><a href="#description">DESCRIPTION</a></li>
        <li><a href="#overview">OVERVIEW</a></li>
        <li><a href="#options">OPTIONS</a></li>
+       <ul>
+
+               <li><a href="#graphv">graphv</a></li>
+       </ul>
+
        <li><a href="#see_also">SEE ALSO</a></li>
        <li><a href="#author">AUTHOR</a></li>
 </ul>
@@ -34,7 +39,7 @@
 </p>
 <hr />
 <h1><a name="synopsis">SYNOPSIS</a></h1>
-<p><strong>rrdtool graph</strong> <em>filename</em>
+<p><strong>rrdtool graph|graphv</strong> <em>filename</em>
 [<em><a href="././rrdgraph.html#options">option</a></em> ...]
 [<em><a href="././rrdgraph_data.html#def">data definition</a></em> ...]
 [<em><a href="././rrdgraph_data.html#cdef">data calculation</a></em> ...]
@@ -79,6 +84,15 @@ graph it (or print it).  This ends the <strong>rrdtool graph</strong> sequence.<
 <hr />
 <h1><a name="options">OPTIONS</a></h1>
 <dl>
+<dt><strong><a name="item_graphv"><strong>graphv</strong></a></strong>
+
+<dd>
+<p>This alternate version of <strong>graph</strong> takes the same arguments and performs the
+same function. The <em>v</em> stands for <em>verbose</em>, which describes the output
+returned. <strong>graphv</strong> will return a lot of information about the graph using
+the same format as rrdtool info (key = value). See the bottom of the document for more information.</p>
+</dd>
+</li>
 <dt><strong><a name="item_filename">filename</a></strong>
 
 <dd>
@@ -127,13 +141,19 @@ placed string at the left hand side of the graph.</p>
 <dd>
 <p>[<strong>-w</strong>|<strong>--width</strong> <em>pixels</em>]
 [<strong>-h</strong>|<strong>--height</strong> <em>pixels</em>]
-[<strong>-j</strong>|<strong>--only-graph</strong>]</p>
+[<strong>-j</strong>|<strong>--only-graph</strong>]
+[<strong>-D</strong>|<strong>--full-size-mode</strong>]</p>
 </dd>
 <dd>
-<p>The width and height of the <strong>canvas</strong> (the part of the graph with
+<p>By default, the width and height of the <strong>canvas</strong> (the part with
 the actual data and such). This defaults to 400 pixels by 100 pixels.</p>
 </dd>
 <dd>
+<p>If you specify the <strong>--full-size-mode</strong> option, the width and height
+specify the final dimensions of the output image and the canvas
+is automatically resized to fit.</p>
+</dd>
+<dd>
 <p>If you specify the <strong>--only-graph</strong> option and set the height &lt; 32
 pixels you will get a tiny graph image (thumbnail) to use as an icon
 for use in an overview, for example. All labeling will be stripped off
@@ -191,13 +211,13 @@ and thus the throughput may be higher than the WAN line speed.</p>
 <p>[<strong>-N</strong>|<strong>--no-gridfit</strong>]</p>
 </dd>
 <dd>
-<p>In order to avoid anti-aliasing effects gridlines are placed on
-integer pixel values. This is by default done by extending
-the scale so that gridlines happens to be spaced using an
-integer number of pixels and also start on an integer pixel value.
-This might extend the scale too much for some logarithmic scales
-and for linear scales where <strong>--alt-autoscale</strong> is needed.
-Using <strong>--no-gridfit</strong> disables modification of the scale.</p>
+<p>In order to avoid anti-aliasing blurring effects rrdtool snaps
+points to device resolution pixels, this results in a crisper
+aperance. If this is not to your liking, you can use this switch
+to turn this behaviour off.</p>
+</dd>
+<dd>
+<p>Gridfitting is turned off for PDF, EPS, SVG output by default.</p>
 </dd>
 </li>
 <dt><strong><a name="item_grid">Grid</a></strong>
@@ -241,7 +261,7 @@ lines as they specify exactly that time.</p>
 </dd>
 <dd>
 <pre>
- --x-grid HOUR:8:DAY:1:DAY:1:0:%A</pre>
+ --x-grid HOUR:8:DAY:1:DAY:1:86400:%A</pre>
 </dd>
 <dd>
 <p>This places grid lines every 8 hours, major grid lines and labels
@@ -382,7 +402,7 @@ elements, <code>TITLE</code> for the title, <code>AXIS</code> for the axis label
 for the vertical unit label, <code>LEGEND</code> for the graph legend.</p>
 </dd>
 <dd>
-<p>Use Times for the title: <code>--font TITLE:13:/usr/lib/fonts/times.ttf</code></p>
+<p>Use Times for the title: <code>--font TITLE:13:Times</code></p>
 </dd>
 <dd>
 <p>If you do not give a font string you can modify just the sice of the default font:
@@ -391,32 +411,64 @@ for the vertical unit label, <code>LEGEND</code> for the graph legend.</p>
 <dd>
 <p>If you specify the size 0 then you can modify just the font without touching
 the size. This is especially usefull for altering the default font without
-resetting the default fontsizes: <code>--font DEFAULT:0:/usr/lib/fonts/times.ttf</code>.</p>
+resetting the default fontsizes: <code>--font DEFAULT:0:Courier</code>.</p>
 </dd>
 <dd>
 <p>RRDtool comes with a preset default font. You can set the environment
 variable <code>RRD_DEFAULT_FONT</code> if you want to change this.</p>
 </dd>
 <dd>
-<p>Truetype fonts are only supported for PNG output. See below.</p>
+<p>RRDtool uses Pango for its font handling. This means you can to use
+the full Pango syntax when selecting your font:</p>
 </dd>
 <dd>
-<p>[<strong>-R</strong>|<strong>--font-render-mode</strong> {<em>normal</em>,<em>light</em>,<em>mono</em>}]</p>
+<p>The font name has the form ``[<em>FAMILY-LIST</em>] [<em>STYLE-OPTIONS</em>] [<em>SIZE</em>]'',
+where <em>FAMILY-LIST</em> is a comma separated list of families optionally
+terminated by a comma, <em>STYLE_OPTIONS</em> is a whitespace separated list of
+words where each WORD describes one of style, variant, weight, stretch, or
+gravity, and <em>SIZE</em> is a decimal number (size in points) or optionally
+followed by the unit modifier ``px'' for absolute size. Any one of the options
+may be absent.</p>
 </dd>
 <dd>
-<p>This lets you customize the strength of the font smoothing,
-or disable it entirely using <em>mono</em>. By default, <em>normal</em>
-font smoothing is used.</p>
+<p>[<strong>-R</strong>|<strong>--font-render-mode</strong> {<strong>normal</strong>,<strong>light</strong>,<strong>mono</strong>}]</p>
+</dd>
+<dd>
+<p>There are 3 font render modes:</p>
+</dd>
+<dd>
+<p><strong>normal</strong>: Full Hinting and Antialiasing (default)</p>
+</dd>
+<dd>
+<p><strong>light</strong>: Slight Hinting and Antialiasing</p>
+</dd>
+<dd>
+<p><strong>mono</strong>: Full Hinting and NO Antialiasing</p>
 </dd>
 <dd>
 <p>[<strong>-B</strong>|<strong>--font-smoothing-threshold</strong> <em>size</em>]</p>
 </dd>
 <dd>
+<p>(this gets ignored in 1.3 for now!)</p>
+</dd>
+<dd>
 <p>This specifies the largest font size which will be rendered
 bitmapped, that is, without any font smoothing. By default,
 no text is rendered bitmapped.</p>
 </dd>
 <dd>
+<p>[<strong>-G</strong>|<strong>--graph-render-mode</strong> {<strong>normal</strong>,<strong>mono</strong>}]</p>
+</dd>
+<dd>
+<p>There are 2 render modes:</p>
+</dd>
+<dd>
+<p><strong>normal</strong>: Graphs are fully Antialiased (default)</p>
+</dd>
+<dd>
+<p><strong>mono</strong>: No Antialiasing</p>
+</dd>
+<dd>
 <p>[<strong>-E</strong>|<strong>--slope-mode</strong>]</p>
 </dd>
 <dd>
@@ -438,6 +490,9 @@ Times-Bold, Times-BoldItalic, Times-Italic, Times-Roman, and ZapfDingbats.</p>
 <p>[<strong>-i</strong>|<strong>--interlaced</strong>]</p>
 </dd>
 <dd>
+<p>(this gets ignored in 1.3 for now!)</p>
+</dd>
+<dd>
 <p>If images are interlaced they become visible on browsers more quickly.</p>
 </dd>
 <dd>
@@ -501,9 +556,65 @@ at least one print statement to generate a report.
 See <a href="././rrdgraph_graph.html">the rrdgraph_graph manpage</a> for the exact format.</p>
 </dd>
 </li>
+<dt><strong><a name="item_markup">Markup</a></strong>
+
+<dd>
+<p>All text in rrdtool is rendered using Pango markup. This means text can contain embeded markup instructions.
+Simple html markup using 
+</p>
+</dd>
+<dd>
+<pre>
+
+ &lt;span key=&quot;value&quot;&gt;text&lt;/span&gt;</pre>
+</dd>
+<dd>
+<p>can be used. Apart from the verbose syntax, there are also the following short tags available.</p>
+</dd>
+<dd>
+<pre>
+ b     Bold
+ big   Makes font relatively larger, equivalent to &lt;span size=&quot;larger&quot;&gt;
+ i     Italic
+ s     Strikethrough
+ sub   Subscript
+ sup   Superscript
+ small Makes font relatively smaller, equivalent to &lt;span size=&quot;smaller&quot;&gt;
+ tt    Monospace font
+ u     Underline 
+More details on <a href="http://developer.gnome.org/doc/API/2.0/pango/PangoMarkupFormat.html">http://developer.gnome.org/doc/API/2.0/pango/PangoMarkupFormat.html</a>.</pre>
+</dd>
+</li>
 </dl>
 <p>
 </p>
+<h2><a name="graphv">graphv</a></h2>
+<p>Calling rrdtool with the graphv option will return information in the
+rrdtool info format. On the command line this means that all output will be
+in key=value format. When used from the perl and ruby bindings a hash
+pointer will be returned from the call.</p>
+<p>When the filename '-' is given, the contents of the graph itself will also
+be returned through this interface (hash key 'image'). On the command line
+the output will look like this:</p>
+<pre>
+ print[0] = &quot;0.020833&quot;
+ print[1] = &quot;0.0440833&quot;
+ graph_left = 51
+ graph_top = 22
+ graph_width = 400
+ graph_height = 100
+ image_width = 481
+ image_height = 154
+ value_min = 0.0000000000e+00
+ value_max = 4.0000000000e-02
+ image = BLOB_SIZE:8196
+ [... 8196 bytes of image data ...]</pre>
+<p>There is more information returned than in the standard interface.
+Especially the 'graph_*' keys are new. They help applications that want to
+know what is where on the graph.</p>
+<p>
+</p>
 <hr />
 <h1><a name="see_also">SEE ALSO</a></h1>
 <p><a href="././rrdgraph.html">the rrdgraph manpage</a> gives an overview of how <strong>rrdtool graph</strong> works.
@@ -516,7 +627,9 @@ See <a href="././rrdgraph_graph.html">the rrdgraph_graph manpage</a> for the exa
 <hr />
 <h1><a name="author">AUTHOR</a></h1>
 <p>Program by Tobias Oetiker &lt;<a href="mailto:tobi@oetiker.ch">tobi@oetiker.ch</a>&gt;</p>
-<p>This manual page by Alex van den Bogaerdt &lt;<a href="mailto:alex@ergens.op.het.net">alex@ergens.op.het.net</a>&gt;</p>
+<p>This manual page by Alex van den Bogaerdt &lt;<a href="mailto:alex@ergens.op.het.net">alex@ergens.op.het.net</a>&gt;
+
+</p>
 
 </body>