diff --git a/src/rrd_graph.c b/src/rrd_graph.c
index 47c187ad981db4c6ec19046dd95a5639f6220d1c..e7554ac632b80648cfe3e728a74dbf1379dd4f57 100644 (file)
--- a/src/rrd_graph.c
+++ b/src/rrd_graph.c
im->minval -= adj;
im->maxval += adj;
}
+ else if(im->extra_flags & ALTAUTOSCALE_MIN) {
+ /* measure the amplitude of the function. Make sure that
+ graph boundaries are slightly lower than min vals
+ so we can see amplitude on the graph */
+ adj = (im->maxval - im->minval) * 0.1;
+ im->minval -= adj;
+ }
else if(im->extra_flags & ALTAUTOSCALE_MAX) {
/* measure the amplitude of the function. Make sure that
graph boundaries are slightly higher than max vals
{"no-minor", no_argument, 0, 'I'},
{"slope-mode", no_argument, 0, 'E'},
{"alt-autoscale", no_argument, 0, 'A'},
+ {"alt-autoscale-min", no_argument, 0, 'J'},
{"alt-autoscale-max", no_argument, 0, 'M'},
{"no-gridfit", no_argument, 0, 'N'},
{"units-exponent",required_argument, 0, 'X'},
break;
case 'A':
im->extra_flags |= ALTAUTOSCALE;
+ break;
+ case 'J':
+ im->extra_flags |= ALTAUTOSCALE_MIN;
break;
case 'M':
im->extra_flags |= ALTAUTOSCALE_MAX;