Code

Imported upstream version 1.3rc4.
[pkg-rrdtool.git] / doc / rrdgraph_graph.1
index f7429f9f109b835c54afc498a9a538351a63d4b5..ce55b98fafd593bf03898b00a24174ed04e37813 100644 (file)
 .\" ========================================================================
 .\"
 .IX Title "RRDGRAPH_GRAPH 1"
-.TH RRDGRAPH_GRAPH 1 "2008-02-17" "1.2.27" "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)
@@ -162,8 +164,8 @@ rrdgraph_graph \- rrdtool graph command reference
 These instructions allow you to generate your image or report.
 If you don't use any graph elements, no graph is generated.
 Similarly, no report is generated if you don't use print options.
-.Sh "\s-1PRINT\s0"
-.IX Subsection "PRINT"
+.SH "PRINT"
+.IX Header "PRINT"
 .IP "\fB\s-1PRINT:\s0\fR\fIvname\fR\fB:\fR\fIformat\fR[\fB:strftime\fR]" 4
 .IX Item "PRINT:vname:format[:strftime]"
 Depending on the context, either the value component or the time
@@ -175,88 +177,122 @@ The percent character introduces a formatter string. This string
 can be:
 .Sp
 For printing values:
-.Sp
-\&\fB%%\fR \- just prints a literal '%' character
-.Sp
-\&\fB%#.#le\fR \- prints numbers like 1.2346e+04. The optional integers # denote field
+.RS 4
+.IP "\fB%%\fR" 4
+.IX Item "%%"
+just prints a literal '%' character
+.IP "\fB%#.#le\fR" 4
+.IX Item "%#.#le"
+prints numbers like 1.2346e+04. The optional integers # denote field
 width and decimal precision.
-.Sp
-\&\fB%#.#lf\fR \- prints numbers like 12345.6789, with optional field width
+.IP "\fB%#.#lf\fR" 4
+.IX Item "%#.#lf"
+prints numbers like 12345.6789, with optional field width
 and precision.
-.Sp
-\&\fB%s\fR \- place this after \fB%le\fR, \fB%lf\fR or \fB%lg\fR. This will be replaced by the
+.IP "\fB%s\fR" 4
+.IX Item "%s"
+place this after \fB%le\fR, \fB%lf\fR or \fB%lg\fR. This will be replaced by the
 appropriate \s-1SI\s0 magnitude unit and the value will be scaled
 accordingly (123456 \-> 123.456 k).
-.Sp
-\&\fB%S\fR \- is similar to \fB%s\fR. It does, however, use a previously defined
+.IP "\fB%S\fR" 4
+.IX Item "%S"
+is similar to \fB%s\fR. It does, however, use a previously defined
 magnitude unit. If there is no such unit yet, it tries to define
 one (just like \fB%s\fR) unless the value is zero, in which case the magnitude
 unit stays undefined. Thus, formatter strings using \fB%S\fR and no \fB%s\fR
 will all use the same magnitude unit except for zero values.
+.RE
+.RS 4
 .Sp
 If you \s-1PRINT\s0 a \s-1VDEF\s0 value, you can also print the time associated with it by appending the string
 \&\fB:strftime\fR to the format. Note that rrdtool uses the strftime function of your OSs clibrary. This means that
 the conversion specifier may vary. Check the manual page if you are uncertain. The following is a list of
 conversion specifiers usually supported across the board. 
-.Sp
-\&\fB%a\fR \- The abbreviated weekday name according to the current locale.
-.Sp
-\&\fB%A\fR \- The full weekday name according to the current locale.
-.Sp
-\&\fB%b\fR \- The abbreviated month name according to the current locale.
-.Sp
-\&\fB%B\fR \- The full month name according to the current locale.
-.Sp
-\&\fB%c\fR \- The preferred date and time representation for the current locale.
-.Sp
-\&\fB%d\fR \- The day of the month as a decimal number (range 01 to 31).
-.Sp
-\&\fB%H\fR \- The hour as a decimal number using a 24\-hour clock (range 00 to 23).
-.Sp
-\&\fB%I\fR \- The hour as a decimal number using a 12\-hour clock (range 01 to 12).
-.Sp
-\&\fB%j\fR \- The day of the year as a decimal number (range 001 to 366).
-.Sp
-\&\fB%m\fR \- The month as a decimal number (range 01 to 12).
-.Sp
-\&\fB%M\fR \- The minute as a decimal number (range 00 to 59).
-.Sp
-\&\fB%p\fR \- Either `\s-1AM\s0' or `\s-1PM\s0' according to the given time value, or the corresponding
+.IP "\fB%a\fR" 4
+.IX Item "%a"
+The abbreviated weekday name according to the current locale.
+.IP "\fB%A\fR" 4
+.IX Item "%A"
+The full weekday name according to the current locale.
+.IP "\fB%b\fR" 4
+.IX Item "%b"
+The abbreviated month name according to the current locale.
+.IP "\fB%B\fR" 4
+.IX Item "%B"
+The full month name according to the current locale.
+.IP "\fB%c\fR" 4
+.IX Item "%c"
+The preferred date and time representation for the current locale.
+.IP "\fB%d\fR" 4
+.IX Item "%d"
+The day of the month as a decimal number (range 01 to 31).
+.IP "\fB%H\fR" 4
+.IX Item "%H"
+The hour as a decimal number using a 24\-hour clock (range 00 to 23).
+.IP "\fB%I\fR" 4
+.IX Item "%I"
+The hour as a decimal number using a 12\-hour clock (range 01 to 12).
+.IP "\fB%j\fR" 4
+.IX Item "%j"
+The day of the year as a decimal number (range 001 to 366).
+.IP "\fB%m\fR" 4
+.IX Item "%m"
+The month as a decimal number (range 01 to 12).
+.IP "\fB%M\fR" 4
+.IX Item "%M"
+The minute as a decimal number (range 00 to 59).
+.IP "\fB%p\fR" 4
+.IX Item "%p"
+Either `\s-1AM\s0' or `\s-1PM\s0' according to the given time value, or the corresponding
 strings for the current locale.  Noon is treated as `pm' and midnight as
 `am'.  Note that in many locales and `pm' notation is unsupported and in
 such cases \f(CW%p\fR will return an empty string.
-.Sp
-\&\fB%S\fR \- The second as a decimal number (range 00 to 61).
-.Sp
-\&\fB%U\fR \- The  week  number  of  the current year as a decimal number, range 00 to 53, starting with the
+.IP "\fB%S\fR" 4
+.IX Item "%S"
+The second as a decimal number (range 00 to 61).
+.IP "\fB%U\fR" 4
+.IX Item "%U"
+The  week  number  of  the current year as a decimal number, range 00 to 53, starting with the
 first Sunday as the first day of week 01. See also \f(CW%V\fR and \f(CW%W\fR.
-.Sp
-\&\fB%V\fR \- The \s-1ISO\s0 8601:1988 week number of the current year as a decimal number, range 01 to  53,  where
+.IP "\fB%V\fR" 4
+.IX Item "%V"
+The \s-1ISO\s0 8601:1988 week number of the current year as a decimal number, range 01 to  53,  where
 week  1 is the first week that has at least 4 days in the current year, and with Monday as the
 first day of the week. See also \f(CW%U\fR and \f(CW%W\fR.
-.Sp
-\&\fB%w\fR \- The day of the week as a decimal, range 0 to 6, Sunday being 0.  See also \f(CW%u\fR.
-.Sp
-\&\fB%W\fR \- The week number of the current year as a decimal number, range 00 to  53,  starting  with  the
+.IP "\fB%w\fR" 4
+.IX Item "%w"
+The day of the week as a decimal, range 0 to 6, Sunday being 0.  See also \f(CW%u\fR.
+.IP "\fB%W\fR" 4
+.IX Item "%W"
+The week number of the current year as a decimal number, range 00 to  53,  starting  with  the
 first Monday as the first day of week 01.
-.Sp
-\&\fB%x\fR \- The preferred date representation for the current locale without the time.
-.Sp
-\&\fB%X\fR \- The preferred time representation for the current locale without the date.
-.Sp
-\&\fB%y\fR \- The year as a decimal number without a century (range 00 to 99).
-.Sp
-\&\fB%Y\fR \- The year as a decimal number including the century.
-.Sp
-\&\fB%Z\fR \- The time zone or name or abbreviation.
-.Sp
-\&\fB%%\fR \- A literal `%' character.
+.IP "\fB%x\fR" 4
+.IX Item "%x"
+The preferred date representation for the current locale without the time.
+.IP "\fB%X\fR" 4
+.IX Item "%X"
+The preferred time representation for the current locale without the date.
+.IP "\fB%y\fR" 4
+.IX Item "%y"
+The year as a decimal number without a century (range 00 to 99).
+.IP "\fB%Y\fR" 4
+.IX Item "%Y"
+The year as a decimal number including the century.
+.IP "\fB%Z\fR" 4
+.IX Item "%Z"
+The time zone or name or abbreviation.
+.IP "\fB%%\fR" 4
+.IX Item "%%"
+A literal `%' character.
+.RE
+.RS 4
+.RE
 .IP "\fB\s-1PRINT:\s0\fR\fIvname\fR\fB:\fR\fI\s-1CF\s0\fR\fB:\fR\fIformat\fR" 4
 .IX Item "PRINT:vname:CF:format"
 \&\fIDeprecated. Use the new form of this command in new scripts.\fR
 The first form of this command is to be used with \fB\s-1CDEF\s0\fR \fIvname\fRs.
-.Sh "\s-1GRAPH\s0"
-.IX Subsection "GRAPH"
+.SH "GRAPH"
+.IX Header "GRAPH"
 .IP "\fB\s-1GPRINT\s0\fR\fB:\fR\fIvname\fR\fB:\fR\fIformat\fR" 4
 .IX Item "GPRINT:vname:format"
 This is the same as \f(CW\*(C`PRINT\*(C'\fR, but printed inside the graph.
@@ -269,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
@@ -292,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
@@ -314,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
@@ -373,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.