Code

Imported upstream version 1.3rc4.
[pkg-rrdtool.git] / doc / rrdgraph_graph.1
index 24e39dd23e9257d768cedaf788615ecb2f947dcc..ce55b98fafd593bf03898b00a24174ed04e37813 100644 (file)
 .\" ========================================================================
 .\"
 .IX Title "RRDGRAPH_GRAPH 1"
-.TH RRDGRAPH_GRAPH 1 "2007-11-20" "1.2.26" "rrdtool"
+.TH RRDGRAPH_GRAPH 1 "2008-03-15" "1.3rc4" "rrdtool"
 .SH "NAME"
 rrdgraph_graph \- rrdtool graph command reference
 .SH "SYNOPSIS"
@@ -140,11 +140,11 @@ rrdgraph_graph \- rrdtool graph command reference
 .PP
 \&\fB\s-1COMMENT\s0\fR\fB:\fR\fItext\fR
 .PP
-\&\fB\s-1VRULE\s0\fR\fB:\fR\fItime\fR\fB#\fR\fIcolor\fR[\fB:\fR\fIlegend\fR]
+\&\fB\s-1VRULE\s0\fR\fB:\fR\fItime\fR\fB#\fR\fIcolor\fR[\fB:\fR\fIlegend\fR][\fB:dashes\fR[\fB=\fR\fIon_s\fR[,\fIoff_s\fR[,\fIon_s\fR,\fIoff_s\fR]...]][\fB:dash\-offset=\fR\fIoffset\fR]]
 .PP
-\&\fB\s-1HRULE\s0\fR\fB:\fR\fIvalue\fR\fB#\fR\fIcolor\fR[\fB:\fR\fIlegend\fR]
+\&\fB\s-1HRULE\s0\fR\fB:\fR\fIvalue\fR\fB#\fR\fIcolor\fR[\fB:\fR\fIlegend\fR][\fB:dashes\fR[\fB=\fR\fIon_s\fR[,\fIoff_s\fR[,\fIon_s\fR,\fIoff_s\fR]...]][\fB:dash\-offset=\fR\fIoffset\fR]]
 .PP
-\&\fB\s-1LINE\s0\fR[\fIwidth\fR]\fB:\fR\fIvalue\fR[\fB#\fR\fIcolor\fR][\fB:\fR[\fIlegend\fR][\fB:STACK\fR]]
+\&\fB\s-1LINE\s0\fR[\fIwidth\fR]\fB:\fR\fIvalue\fR[\fB#\fR\fIcolor\fR][\fB:\fR[\fIlegend\fR][\fB:STACK\fR]][\fB:dashes\fR[\fB=\fR\fIon_s\fR[,\fIoff_s\fR[,\fIon_s\fR,\fIoff_s\fR]...]][\fB:dash\-offset=\fR\fIoffset\fR]]
 .PP
 \&\fB\s-1AREA\s0\fR\fB:\fR\fIvalue\fR[\fB#\fR\fIcolor\fR][\fB:\fR[\fIlegend\fR][\fB:STACK\fR]]
 .PP
@@ -152,6 +152,8 @@ rrdgraph_graph \- rrdtool graph command reference
 .PP
 \&\fB\s-1SHIFT\s0\fR\fB:\fR\fIvname\fR\fB:\fR\fIoffset\fR
 .PP
+\&\fB\s-1TEXTALIGN\s0\fR\fB:\fR{\fBleft\fR|\fBright\fR|\fBjustified\fR|\fBcenter\fR}
+.PP
 \&\fB\s-1PRINT\s0\fR\fB:\fR\fIvname\fR\fB:\fR\fI\s-1CF\s0\fR\fB:\fR\fIformat\fR (deprecated)
 .PP
 \&\fB\s-1GPRINT\s0\fR\fB:\fR\fIvname\fR\fB:\fR\fI\s-1CF\s0\fR\fB:\fR\fIformat\fR (deprecated)
@@ -303,20 +305,22 @@ This is the same as \f(CW\*(C`PRINT\*(C'\fR, but printed inside the graph.
 Text is printed literally in the legend section of the graph. Note that in
 RRDtool 1.2 you have to escape colons in \s-1COMMENT\s0 text in the same way you
 have to escape them in \fB*PRINT\fR commands by writing \fB'\e:'\fR.
-.IP "\fB\s-1VRULE\s0\fR\fB:\fR\fItime\fR\fB#\fR\fIcolor\fR [\fB:\fR\fIlegend\fR ]" 4
-.IX Item "VRULE:time#color [:legend ]"
+.IP "\fB\s-1VRULE\s0\fR\fB:\fR\fItime\fR\fB#\fR\fIcolor\fR[\fB:\fR\fIlegend\fR][\fB:dashes\fR[\fB=\fR\fIon_s\fR[,\fIoff_s\fR[,\fIon_s\fR,\fIoff_s\fR]...]][\fB:dash\-offset=\fR\fIoffset\fR]]" 4
+.IX Item "VRULE:time#color[:legend][:dashes[=on_s[,off_s[,on_s,off_s]...]][:dash-offset=offset]]"
 Draw a vertical line at \fItime\fR.  Its color is composed from three
 hexadecimal numbers specifying the rgb color components (00 is off, \s-1FF\s0 is
 maximum) red, green and blue followed by an optional alpha. Optionally, a legend box and string is
 printed in the legend section. \fItime\fR may be a number or a variable
 from a \fB\s-1VDEF\s0\fR. It is an error to use \fIvname\fRs from \fB\s-1DEF\s0\fR or \fB\s-1CDEF\s0\fR here.
-.IP "\fB\s-1HRULE\s0\fR\fB:\fR\fIvalue\fR\fB#\fR\fIcolor\fR [ :\fIlegend\fR ]" 4
-.IX Item "HRULE:value#color [ :legend ]"
+Dashed lines can be drawn using the \fBdashes\fR modifier. See \fB\s-1LINE\s0\fR for more
+details.
+.IP "\fB\s-1HRULE\s0\fR\fB:\fR\fIvalue\fR\fB#\fR\fIcolor\fR[\fB:\fR\fIlegend\fR][\fB:dashes\fR[\fB=\fR\fIon_s\fR[,\fIoff_s\fR[,\fIon_s\fR,\fIoff_s\fR]...]][\fB:dash\-offset=\fR\fIoffset\fR]]" 4
+.IX Item "HRULE:value#color[:legend][:dashes[=on_s[,off_s[,on_s,off_s]...]][:dash-offset=offset]]"
 Draw a horizontal line at \fIvalue\fR.  \s-1HRULE\s0 acts much like \s-1LINE\s0 except that
 will have no effect on the scale of the graph. If a \s-1HRULE\s0 is outside the
 graphing area it will just not be visible.
-.IP "\fB\s-1LINE\s0\fR[\fIwidth\fR]\fB:\fR\fIvalue\fR[\fB#\fR\fIcolor\fR][\fB:\fR[\fIlegend\fR][\fB:STACK\fR]]" 4
-.IX Item "LINE[width]:value[#color][:[legend][:STACK]]"
+.IP "\fB\s-1LINE\s0\fR[\fIwidth\fR]\fB:\fR\fIvalue\fR[\fB#\fR\fIcolor\fR][\fB:\fR[\fIlegend\fR][\fB:STACK\fR]][\fB:dashes\fR[\fB=\fR\fIon_s\fR[,\fIoff_s\fR[,\fIon_s\fR,\fIoff_s\fR]...]][\fB:dash\-offset=\fR\fIoffset\fR]]" 4
+.IX Item "LINE[width]:value[#color][:[legend][:STACK]][:dashes[=on_s[,off_s[,on_s,off_s]...]][:dash-offset=offset]]"
 Draw a line of the specified width onto the graph. \fIwidth\fR can be a
 floating point number. If the color is not specified, the drawing is done
 \&'invisibly'. This is useful when stacking something else on top of this
@@ -326,6 +330,14 @@ the legend section if specified. The \fBvalue\fR can be generated by \fB\s-1DEF\
 is stacked on top of the previous element which can be a \fB\s-1LINE\s0\fR or an
 \&\fB\s-1AREA\s0\fR.
 .Sp
+The \fBdashes\fR modifier enables dashed line style. Without any further options
+a symmetric dashed line with a segment length of 5 pixels will be drawn. The
+dash pattern can be changed if the \fBdashes=\fR parameter is followed by either
+one value or an even number (1, 2, 4, 6, ...) of positive values. Each value
+provides the length of alternate \fIon_s\fR and \fIoff_s\fR portions of the
+stroke. The \fBdash-offset\fR parameter specifies an \fIoffset\fR into the pattern
+at which the stroke begins.
+.Sp
 When you do not specify a color, you cannot specify a legend.  Should
 you want to use \s-1STACK\s0, use the \*(L"LINEx:<value>::STACK\*(R" form.
 .IP "\fB\s-1AREA\s0\fR\fB:\fR\fIvalue\fR[\fB#\fR\fIcolor\fR][\fB:\fR[\fIlegend\fR][\fB:STACK\fR]]" 4
@@ -348,6 +360,13 @@ offset of (\ 7*24*60*60\ =\ )\ 604'800\ seconds to \*(L"look back\*(R" one
 week. Make sure to tell the viewer of your graph you did this ...
 As with the other graphing elements, you can specify a number or
 a variable here.
+.IP "\fB\s-1TEXTALIGN\s0\fR\fB:\fR{\fBleft\fR|\fBright\fR|\fBjustified\fR|\fBcenter\fR}" 4
+.IX Item "TEXTALIGN:{left|right|justified|center}"
+Labels are placed below the graph. When they overflow to the left, they wrap
+to the next line. By default, lines are justified left and right. The
+\&\fB\s-1TEXTALIGN\s0\fR function lets you change this default. This is a command and
+not an option, so that you can change the default several times in your
+argument list.
 .IP "\fB\s-1STACK\s0\fR\fB:\fR\fIvname\fR\fB#\fR\fIcolor\fR[\fB:\fR\fIlegend\fR]" 4
 .IX Item "STACK:vname#color[:legend]"
 \&\fIDeprecated.  Use the \f(BI\s-1STACK\s0\fI modifiers on the other commands.\fR
@@ -407,6 +426,106 @@ If you are using the proportional font in your graph, you can use tab
 characters or the sequence \fB\et\fR to line-up legend elements. Note that
 the tabs inserted are relative to the start of the current legend
 element!
+.PP
+Since RRDtool 1.3 is using Pango for rending text, you can use Pango markup.
+Pango uses the xml \fBspan\fR tags for inline formatting instructions.:
+.PP
+A simple example of a marked-up string might be: 
+.PP
+.Vb 1
+\& <span foreground="blue" size="x\-large">Blue text</span> is <i>cool</i>!
+.Ve
+.PP
+The complete list of attributes for the span tag (taken from the pango documentation):
+.IP "\fBfont_desc\fR" 4
+.IX Item "font_desc"
+A font description string, such as \*(L"Sans Italic 12\*(R"; note that any other span attributes will override this description. So if you have \*(L"Sans Italic\*(R" and also a style=\*(L"normal\*(R" attribute, you will get Sans normal, not italic.
+.IP "\fBfont_family\fR" 4
+.IX Item "font_family"
+A font family name
+.IP "\fBface\fR" 4
+.IX Item "face"
+Synonym for font_family
+.IP "\fBsize\fR" 4
+.IX Item "size"
+Font size in 1024ths of a point, or one of the absolute sizes 'xx\-small', 'x\-small', 'small', 'medium', 'large', 'x\-large', 'xx\-large', or one of the relative sizes 'smaller' or 'larger'. If you want to specify a absolute size, it's usually easier to take advantage of the ability to specify a partial font description using 'font_desc'; you can use font_desc='12.5' rather than size='12800'.
+.IP "\fBstyle\fR" 4
+.IX Item "style"
+One of 'normal', 'oblique', 'italic'
+.IP "\fBweight\fR" 4
+.IX Item "weight"
+One of 'ultralight', 'light', 'normal', 'bold', 'ultrabold', 'heavy', or a numeric weight
+.IP "\fBvariant\fR" 4
+.IX Item "variant"
+\&'normal' or 'smallcaps'
+.IP "\fBstretch\fR" 4
+.IX Item "stretch"
+One of 'ultracondensed', 'extracondensed', 'condensed', 'semicondensed', 'normal', 'semiexpanded', 'expanded', 'extraexpanded', 'ultraexpanded'
+.IP "\fBforeground\fR" 4
+.IX Item "foreground"
+An \s-1RGB\s0 color specification such as '#00FF00' or a color name such as 'red'
+.IP "\fBbackground\fR" 4
+.IX Item "background"
+An \s-1RGB\s0 color specification such as '#00FF00' or a color name such as 'red'
+.IP "\fBunderline\fR" 4
+.IX Item "underline"
+One of 'none', 'single', 'double', 'low', 'error'
+.IP "\fBunderline_color\fR" 4
+.IX Item "underline_color"
+The color of underlines; an \s-1RGB\s0 color specification such as '#00FF00' or a color name such as 'red'
+.IP "\fBrise\fR" 4
+.IX Item "rise"
+Vertical displacement, in 10000ths of an em. Can be negative for subscript, positive for superscript.
+.IP "\fBstrikethrough\fR" 4
+.IX Item "strikethrough"
+\&'true' or 'false' whether to strike through the text
+.IP "\fBstrikethrough_color\fR" 4
+.IX Item "strikethrough_color"
+The color of strikethrough lines; an \s-1RGB\s0 color specification such as '#00FF00' or a color name such as 'red'
+.IP "\fBfallback\fR" 4
+.IX Item "fallback"
+\&'true' or 'false' whether to enable fallback. If disabled, then characters will only be used from the closest matching font on the system. No fallback will be done to other fonts on the system that might contain the characters in the text. Fallback is enabled by default. Most applications should not disable fallback.
+.IP "\fBlang\fR" 4
+.IX Item "lang"
+A language code, indicating the text language
+.IP "\fBletter_spacing\fR" 4
+.IX Item "letter_spacing"
+Inter-letter spacing in 1024ths of a point.
+.IP "\fBgravity\fR" 4
+.IX Item "gravity"
+One of 'south', 'east', 'north', 'west', 'auto'.
+.IP "\fBgravity_hint\fR" 4
+.IX Item "gravity_hint"
+One of 'natural', 'strong', 'line'.
+.PP
+To save you some typing, there are also some shortcuts:
+.IP "\fBb\fR" 4
+.IX Item "b"
+Bold
+.IP "\fBbig\fR" 4
+.IX Item "big"
+Makes font relatively larger, equivalent to <span size=\*(L"larger\*(R">
+.IP "\fBi\fR" 4
+.IX Item "i"
+Italic
+.IP "\fBs\fR" 4
+.IX Item "s"
+Strikethrough
+.IP "\fBsub\fR" 4
+.IX Item "sub"
+Subscript
+.IP "\fBsup\fR" 4
+.IX Item "sup"
+Superscript
+.IP "\fBsmall\fR" 4
+.IX Item "small"
+Makes font relatively smaller, equivalent to <span size=\*(L"smaller\*(R">
+.IP "\fBtt\fR" 4
+.IX Item "tt"
+Monospace font
+.IP "\fBu\fR" 4
+.IX Item "u"
+Underline 
 .SH "SEE ALSO"
 .IX Header "SEE ALSO"
 rrdgraph gives an overview of how \fBrrdtool graph\fR works.