Subject: | Feature request -> extended_legend |
Date: | Wed, 17 Oct 2007 16:49:57 +0300 |
To: | bug-RRD-Simple [...] rt.cpan.org |
From: | Adrian Popa <adrian_gh.popa [...] romtelecom.ro> |
Hello,
This is not a bug, it's a feature request:
If in a graph, I select 'extended_legend', I get the legend with a
decimal precision of 10 decimals (before the decimal separator). I
wonder if this is ever usefull. Wouldn't it be more useful to use K,M,G
instead? It certainly is more readable.
So, my request is to modify Simple.pm from:
# New for version 1.35
if ($extended_legend) {
if ($RRDs::VERSION >= 1.2) {
# Moved the VDEFs to the block of code above which is
# always run, regardless of the extended legend
push @cmd, sprintf('GPRINT:%sMIN: min\:%%10.2lf\g',$ds);
push @cmd, sprintf('GPRINT:%sMAX: max\:%%10.2lf\g',$ds);
push @cmd, sprintf('GPRINT:%sLAST: last\:%%10.2lf\l',$ds);
} else {
push @cmd, sprintf('GPRINT:%s:MIN: min\:%%10.2lf\g',$ds);
push @cmd, sprintf('GPRINT:%s:MAX: max\:%%10.2lf\g',$ds);
push @cmd, sprintf('GPRINT:%s:LAST: last\:%%10.2lf\l',$ds);
}
}
to...
# New for version 1.35
if ($extended_legend) {
if ($RRDs::VERSION >= 1.2) {
# Moved the VDEFs to the block of code above which is
# always run, regardless of the extended legend
push @cmd, sprintf('GPRINT:%sMIN: min\:%%3.2lf\g',$ds);
push @cmd, sprintf('GPRINT:%sMAX: max\:%%3.2lf\g',$ds);
push @cmd, sprintf('GPRINT:%sLAST: last\:%%3.2lf\l',$ds);
} else {
push @cmd, sprintf('GPRINT:%s:MIN: min\:%%3.2lf\g',$ds);
push @cmd, sprintf('GPRINT:%s:MAX: max\:%%3.2lf\g',$ds);
push @cmd, sprintf('GPRINT:%s:LAST: last\:%%3.2lf\l',$ds);
}
}
Thanks.
--
Adrian Popa
Junior Network Engineer
Romtelecom S.A.
Divizia Centrul National de Operare Retea
Departament Transport IP & Metro
Compartiment IP Core