summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: a67a347)
raw | patch | inline | side by side (parent: a67a347)
author | oetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa> | |
Thu, 16 Jun 2005 22:09:36 +0000 (22:09 +0000) | ||
committer | oetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa> | |
Thu, 16 Jun 2005 22:09:36 +0000 (22:09 +0000) |
program/src/rrd_graph.c | patch | blob | history |
index 77a5051386fbf735fc7f251085fcfe329ea5969a..43af725762805f95ca00327132e9c8b77c67fca2 100644 (file)
--- a/program/src/rrd_graph.c
+++ b/program/src/rrd_graph.c
if(decimals <= 0) /* everything is small. make place for zero */
decimals = 1;
- im->ygrid_scale.gridstep = pow((double)10, floor(log10(range)));
+ im->ygrid_scale.gridstep = pow((double)10, floor(log10(range*im->viewfactor/im->magfact)))/im->viewfactor*im->magfact;
if(im->ygrid_scale.gridstep == 0) /* range is one -> 0.1 is reasonable scale */
im->ygrid_scale.gridstep = 0.1;