Cacti (home)ForumsRepositoryDocumentation
Cacti: offical forums and support  

 FAQFAQ   SearchSearch   MemberlistMemberlist    RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in    


[SOLVED] UnInformative Y-grid lables

 
Post new topic   Reply to topic    Cacti Forum Index -> Feature Requests
Author Message
BorisL



Joined: 31 Mar 2007
Posts: 30

PostPosted: Mon May 07, 2007 12:30 pm    Post subject: [SOLVED] UnInformative Y-grid lables Reply with quote

Code:
/usr/local/bin/rrdtool graph - \
--imgformat=PNG \
--start=-86400 \
--end=-300 \
--title=" - BGP - Imported Routes - " \
--base=1000 \
--height=150 \
--width=600 \
--alt-autoscale \
--vertical-label="routes" \
--slope-mode \
DEF:a="/usr/local/share/cacti/rra/routes_3736.rrd":routes:AVERAGE \
AREA:a#FF6044:"routes"  \
GPRINT:a:LAST:"Current\:%8.2lf %s"  \
GPRINT:a:AVERAGE:"Average\:%8.2lf %s"  \
GPRINT:a:MAX:"Maximum\:%8.2lf %s"  \
GPRINT:a:MIN:"Minimum\:%8.2lf %s\n"

It seems that Using "--alt-autoscale" must involve adding '--alt-y-grid' to solve this.
Quote:

[-Y|--alt-y-grid]

Place the Y grid dynamically based on the graph's Y range. The
algorithm ensures that you always have a grid, that there are
enough but not too many grid lines, and that the grid is met-
ric. That is the grid lines are placed every 1, 2, 5 or 10
units. This parameter will also ensure that you get enough dec-
imals displayed even if your graph goes from 69.998 to 70.001.
(contributed by Sasha Mikheev).


patch:
Code:
>diff -au rrd.php~ rrd.php
--- rrd.php~    Mon May  7 21:39:14 2007
+++ rrd.php     Mon May  7 21:39:14 2007
@@ -584,7 +584,7 @@

        if ($graph["auto_scale"] == "on") {
                if ($graph["auto_scale_opts"] == "1") {
-                       $scale = "--alt-autoscale" . RRD_NL;
+                       $scale = "--alt-autoscale --alt-y-grid" . RRD_NL;
                }elseif ($graph["auto_scale_opts"] == "2") {
                        $scale = "--alt-autoscale-max" . RRD_NL;
                        $scale .= "--lower-limit=" . $graph["lower_limit"] . RRD_NL;



Untitled-1.png
 Description:
With --alt-y-grid
 Filesize:  7.09 KB
 Viewed:  1559 Time(s)

Untitled-1.png



Untitled-1.png
 Description:
Without --alt-y-grid
 Filesize:  7.7 KB
 Viewed:  1563 Time(s)

Untitled-1.png


Back to top
gandalf
Developer


Joined: 02 Dec 2004
Posts: 12206
Location: Muenster, Germany

PostPosted: Mon Feb 04, 2008 10:41 am    Post subject: Reply with quote

Support for --alt-y-grid is now part of current SVN
Reinhard
Back to top
Display posts from previous:   
Post new topic   Reply to topic    Cacti Forum Index -> Feature Requests All times are GMT - 5 Hours
Page 1 of 1

 



Powered by phpBB © 2001, 2005 phpBB Group