summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 7b79965)
raw | patch | inline | side by side (parent: 7b79965)
author | oetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa> | |
Tue, 19 Nov 2002 22:33:09 +0000 (22:33 +0000) | ||
committer | oetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa> | |
Tue, 19 Nov 2002 22:33:09 +0000 (22:33 +0000) |
program/doc/rrdgraph-old.pod | patch | blob | history | |
program/doc/rrdgraph_graph.src | patch | blob | history | |
program/src/rrd_graph.c | patch | blob | history |
index b464c4266408ba496dbc576dae382c2ae0b67beb..eb0456f979eef1b43f96298a85aea9bb693939c9 100644 (file)
Calculate the chosen consolidation function I<CF> over the data-source
variable I<vname> and C<printf> the result to stdout using I<format>.
-In the I<format> string there should be a '%lf' or '%le' marker in the
+In the I<format> string there should be a '%lf', '%le' or'%lg' marker in the
place where the number should be printed.
If an additional '%s' is found AFTER the marker, the value will be scaled
index 5b163d40c908277368e6cc9d307fa66373451938..aa116f59df2e98f6a5c1b8fe24f48e7096c38789 100644 (file)
=item *
-B<%#.#le> (where # is an optional number) prints like 1.2346e+04
+B<%#.#le> prints like 1.2346e+04. Optional numbers # are field width and
+decimal precision
=item *
-B<%#.#lf> prints like 12345.6789
+B<%#.#lf> prints like 12345.6789, with optional field width and precision
=item *
-B<%s> place this after B<%le> or B<%lf>. This will be replaced by the
+B<%#.#lg> prints like 12345.6789, with optional field width and number of
+significant digits
+
+=item *
+
+B<%s> place this after B<%le>, B<%lf> or B<%lg>. This will be replaced by the
appropriate SI magnitude unit and the value will be scaled
accordingly (123456 -> 123.456 k)
index 8d21d707380eafccd64473b7e634a396d4b22123..b8952250d1b46f4ce2151ef36acf075bc4014606 100644 (file)
--- a/program/src/rrd_graph.c
+++ b/program/src/rrd_graph.c
if (*ptr == '.') ptr++;
while (*ptr >= '0' && *ptr <= '9') ptr++;
- /* Either 'le' or 'lf' must follow here */
+ /* Either 'le', 'lf' or 'lg' must follow here */
if (*ptr++ != 'l') return 1;
- if (*ptr == 'e' || *ptr == 'f') ptr++;
+ if (*ptr == 'e' || *ptr == 'f' || *ptr == 'g') ptr++;
else return 1;
n++;
}