Code

missing documentation ... -- Alex van den Bogaerdt <alex@slot.hollandcasino.nl>
[rrdtool-all.git] / program / doc / rrdgraph_graph.src
1 =include name
3 =head1 SYNOPSYS
5 I<Depriciated commands>
7 [B<PRINT:>I<vname>B<:>I<CF>B<:>I<format>]
8 [B<GPRINT:>I<vname>B<:>I<CF>B<:>I<format>]
9 [B<HRULE:>I<value>B<#>I<rrggbb>[B<:>I<legend>]]
10 [B<STACK:>I<vname>[B<#>I<rrggbb>[B<:>I<legend>]]]
12 I<available commands>
14 [B<PRINT:>I<vname>B<:>I<format>]
15 [B<GPRINT:>I<vname>B<:>I<format>]
16 [B<COMMENT:>I<text>]
17 [B<VRULE:>I<vname>B<#>I<rrggbb>[B<:>I<legend>]]
18 [B<LINE>{B<1>|B<2>|B<3>}B<:>I<vname>[B<#>I<rrggbb>[B<:>I<legend>]]][B<:STACK>]
19 [B<AREA:>I<vname>[B<#>I<rrggbb>[B<:>I<legend>]]][B<:STACK>]
21 I<to be implemented commands>
23 [B<SHIFT:>I<vname>]
24 [B<PART:>I<vname>B<#>I<rrggbb>[B<:>I<legend>]]
26 =head1 DESCRIPTION
28 These instructions allow you to generate your image or report.
29 If you don't use any graph elements, no graph is generated.
30 Similarly no report is generated if you don't use print options.
32 =head1 PRINT
34 B<PRINT:>I<vname>B<:>I<CF>B<:>I<format>
36 I<Depriciated. Use the new form of this command in new scripts.>
37 The first form of this command is to be used with B<CDEF> I<vname>s.
39 B<PRINT:>I<vname>B<:>I<format>
41 Depending on the context, either the value component or the time
42 component of a B<VDEF> is printed using I<format>. It is an error
43 to specify a I<vname> generated by a B<DEF> or B<CDEF>.
45 Any text in I<format> is printed literally with one exception:
46 The percent character introduces a formatter string. This string
47 can be:
49 For printing values:
51 =over 4
53 =item *
55 B<%%> just prints a literal '%' character
57 =item *
59 B<%#.#le> (where # is an optional number) prints like 1.2346e+04
61 =item *
63 B<%#.#lf> prints like 12345.6789
65 =item *
67 B<%s> place this after B<%le> or B<%lf>.  This will be replaced by the
68 appropriate SI magnitude unit and the value will be scaled
69 accordingly (123456 -> 123.456 k)
71 =item *
73 B<%S> is similar to B<%s>. It does however use a previously defined
74 magnitude unit. If there is no such unit yet, it tries to define
75 one (just like B<%s>). However, if the value is zero, the magnitude
76 unit stays undefined. Thus, formatter strings using B<%S> and no B<%s>
77 will all use the same magnitude unit except for zero values.
79 =back
81 For printing times:
83 =over 4
85 =item *
87 B<%%> just prints a literal '%' character
89 =item *
91 B<%a, %A> prints abbreviated, full weekday name
93 =item *
95 B<%b, %B> prints abbreviated, full month name
97 =item *
99 B<%d, %m, %y, %H, %M, %S> day,month,year,hour,minute,second all in two-digit format
101 =item *
103 B<%Y> year in 4-digit format
105 =item *
107 B<%I, %p>  hour (01..12), 'am' or 'pm'
109 =item *
111 B<%j, %w> day of the week (0..6), day of the year (1..366)
113 =item *
115 B<%c, %x, %X> date+time, date, time
117 =item *
119 B<%U, %W> week number of the current year with either the first sunday or
120 the first monday determining the first week
122 =item *
124 B<%Z> time zone
126 =back
128 =head1 GRAPH
130 B<GPRINT:>I<vname>B<:>I<CF>B<:>I<format>
132 I<Depriciated. Use the new form of this command in new scripts.>
133 This is the same as B<PRINT> but now it is printed inside the graph.
134 See L<PRINT> for more information.
136 B<GPRINT:>I<vname>B<:>I<format>
138 This is the same as B<PRINT> but now it is printed inside the graph.
139 See L<PRINT> for more information.
141 B<COMMENT:>I<text>
143 Text is printed literally in the legend section of the graph
145 B<HRULE:>I<value>B<#>I<rrggbb>[B<:>I<legend>]
147 I<Depriciated. Use a VDEF and a LINEx in new scripts.>
149 Draw an horizontal line at I<value>. Its color is composed from three
150 hexadecimal numbers specifying the color components (00 is off, FF is
151 maximum) red, green and blue.  Optionally a legend box and string is
152 printed in the legend section.
154 B<VRULE:>I<time>B<#>I<rrggbb>[B<:>I<legend>]
156 Draw a vertical line at I<time>.  Its color is composed from three
157 hexadecimal numbers specifying the color components (00 is off, FF is
158 maximum) red, green and blue.  Optionally a legend box and string is
159 printed in the legend section. I<time> may be a number or a variable
160 from a B<VDEF>. It is an error to use I<vname>s from B<DEF> or B<CDEF> here.
162 B<LINE>{B<1>|B<2>|B<3>}B<:>I<vname>[B<#>I<rrggbb>[B<:>I<legend>]][B<:STACK>]
164 Draw a line of the specified width into the graph. If the color
165 is not specified, the drawing is done 'blind'.  This is useful when
166 stacking something else on top of this line. Also optional is the
167 legend box and string which will be printed in the legend section
168 if specified. The B<vname> can be generated by B<DEF>, B<VDEF> and
169 B<CDEF>.  If the optional B<STACK> modifier is used, this line is
170 stacked on top of the previous element which can be a B<LINEx> or
171 an B<AREA>
173 B<AREA:>I<vname>[B<#>I<rrggbb>[B<:>I<legend>]][B<:STACK>]
175 See B<LINEx>, however the area between the x-axis and the line will
176 also be filled.
178 B<STACK:>I<vname>[B<#>I<rrggbb>[B<:>I<legend>]]
180 I<Depriciated.  Use the B<STACK> modifiers on the other commands.>
181 I<Note: the comments on stacking are still valid...>
182 Repeats the last B<LINEx> or B<AREA> however it doesn't start at the
183 x-axis but rather on top of the previous element. This implies that
184 there needs to be something to stack on. An invisible B<LINEx> or
185 B<AREA> is something you can stack on!
187 Note: When you stack on something that was I<unknown>, the whole
188 stack will be I<unknown> for that point in time. If the beginning
189 is undefined, there's no way to end somewhere...  If you want to
190 graph this stacked variable anyway you need to make sure that the
191 B<LINEx> or B<AREA> it gets stacked on is not unknown. Use a CDEF
192 instruction with B<IF> and B<UN> to do so.
194 B<THE NEXT STUFF IS NOT YET IMPLEMENTED>
196 B<SHIFT:>I<offset in seconds>
198 Using this command B<RRDtool> will graph the following elements
199 with the specified offset.  For instance, you can specify an
200 offset of S<( 7*24*60*60 = ) 604800 seconds> to "look back" one
201 week. Make sure to notify the viewer you did so...
202 The offset will be valid until the next B<SHIFT> command, which
203 can have an offset of zero to restore normal graphing.
204 As with the other grapher elements, you can specify a number or
205 a variable here.
207 B<RRDtool> has now support for B<pie charts>. If you include the
208 B<PART> command, the canvas is extended to make room for a chart
209 (or, if no other graph elements are used, the canvas is solely
210 used for the pie chart). The size of the canvas is determined by
211 the lesser of L<width and height|rrdgraph/item_Size>.
213 B<PART:>I<vname>B<#>I<rrggbb>[B<:>I<legend>]
215 Draw a part of pie. Pie parts will be concatenated, the first one
216 will start at the top and parts will be created clockwise.
217 The size of the part is defined by the value part of
218 the L<VDEF|rrdgraph_data/VDEF> function.  It should return
219 a number between 0 and 100, being a percentage.
220 Providing wrong input will produce undefined results.
222 =include see_also