summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: ac4301d)
raw | patch | inline | side by side (parent: ac4301d)
author | oetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa> | |
Sun, 15 Jan 2006 08:55:53 +0000 (08:55 +0000) | ||
committer | oetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa> | |
Sun, 15 Jan 2006 08:55:53 +0000 (08:55 +0000) |
program/src/rrd_graph.c | patch | blob | history |
index 5000300068df4181d507c22a10cb92c89f138ebe..ba0460eecad4cc9e73d034b936f693809a6ab854 100644 (file)
--- a/program/src/rrd_graph.c
+++ b/program/src/rrd_graph.c
int decimals, fractionals;
im->ygrid_scale.labfact=2;
- gridind=-1;
range = im->maxval - im->minval;
scaledrange = range / im->magfact;
else {
for(i=0;ylab[i].grid > 0;i++){
pixel = im->ysize / (scaledrange / ylab[i].grid);
- if (pixel > 7) {
- gridind = i;
- break;
- }
+ gridind = i;
+ if (pixel > 7)
+ break;
}
for(i=0; i<4;i++) {
if (pixel * ylab[gridind].lfac[i] >= 2.5 * im->text_prop[TEXT_PROP_AXIS].size) {
- im->ygrid_scale.labfact = ylab[gridind].lfac[i];
+ im->ygrid_scale.labfact = ylab[gridind].lfac[i];
break;
- }
+ }
}
im->ygrid_scale.gridstep = ylab[gridind].grid * im->magfact;