From: oetiker Date: Fri, 20 Jan 2012 07:27:50 +0000 (+0000) Subject: added support for rrdgraph to use the yotta, zetta, zepto, yocto prefixes. Fix for... X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=284e4fa5c759c2cac124f8d6c99f5356fc42e3f3;p=rrdtool-all.git added support for rrdgraph to use the yotta, zetta, zepto, yocto prefixes. Fix for #333 (thanks Christoph) git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@2261 a5681a0c-68f1-0310-ab6d-d61299d08faa --- diff --git a/program/src/rrd_graph.c b/program/src/rrd_graph.c index 50a640a7..aa4be90d 100644 --- a/program/src/rrd_graph.c +++ b/program/src/rrd_graph.c @@ -412,8 +412,11 @@ void auto_scale( } } +/* power prefixes */ static char si_symbol[] = { + 'y', /* 10e-24 Yocto */ + 'z', /* 10e-21 Zepto */ 'a', /* 10e-18 Atto */ 'f', /* 10e-15 Femto */ 'p', /* 10e-12 Pico */ @@ -427,8 +430,10 @@ static char si_symbol[] = { 'T', /* 10e12 Tera */ 'P', /* 10e15 Peta */ 'E', /* 10e18 Exa */ + 'Z', /* 10e21 Zeta */ + 'Y' /* 10e24 Yotta */ }; -static const int si_symbcenter = 6; +static const int si_symbcenter = 8; /* find SI magnitude symbol for the numbers on the y-axis*/ void si_unit(