summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: ab51676)
raw | patch | inline | side by side (parent: ab51676)
author | oetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa> | |
Sun, 21 May 2006 21:47:23 +0000 (21:47 +0000) | ||
committer | oetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa> | |
Sun, 21 May 2006 21:47:23 +0000 (21:47 +0000) |
can decide properly
git-svn-id: svn://svn.oetiker.ch/rrdtool/branches/1.2@832 a5681a0c-68f1-0310-ab6d-d61299d08faa
git-svn-id: svn://svn.oetiker.ch/rrdtool/branches/1.2@832 a5681a0c-68f1-0310-ab6d-d61299d08faa
program/src/rrd_graph.c | patch | blob | history |
index e8a07b644e39dd7dd4714dbfdb0f184f29281b5d..9a0c46063222dc78c6fef81547a0e03901f47720 100644 (file)
--- a/program/src/rrd_graph.c
+++ b/program/src/rrd_graph.c
case GF_LINE:
case GF_AREA:
case GF_TICK:
+ graphelement = 1;
+ break;
case GF_HRULE:
+ if(isnan(im->gdes[i].yrule)) { /* we must set this here or the legend printer can not decide to print the legend */
+ im->gdes[i].yrule=im->gdes[im->gdes[i].vidx].vf.val;
+ };
+ graphelement = 1;
+ break;
case GF_VRULE:
+ if(im->gdes[i].xrule == 0) { /* again ... the legend printer needs it*/
+ im->gdes[i].xrule = im->gdes[im->gdes[i].vidx].vf.when;
+ };
graphelement = 1;
break;
case GF_COMMENT:
switch(im->gdes[i].gf){
case GF_HRULE:
- if(isnan(im->gdes[i].yrule)) { /* fetch variable */
- im->gdes[i].yrule = im->gdes[im->gdes[i].vidx].vf.val;
- };
if(im->gdes[i].yrule >= im->minval
&& im->gdes[i].yrule <= im->maxval)
gfx_new_line(im->canvas,
1.0,im->gdes[i].col);
break;
case GF_VRULE:
- if(im->gdes[i].xrule == 0) { /* fetch variable */
- im->gdes[i].xrule = im->gdes[im->gdes[i].vidx].vf.when;
- };
if(im->gdes[i].xrule >= im->start
&& im->gdes[i].xrule <= im->end)
gfx_new_line(im->canvas,
if (cnt) {
if (dst->vf.op == VDEF_TOTAL) {
dst->vf.val = sum*src->step;
- dst->vf.when = cnt*src->step; /* not really "when" */
+ dst->vf.when = 0; /* no time component */
} else {
dst->vf.val = sum/cnt;
dst->vf.when = 0; /* no time component */
if (cnt) {
if (dst->vf.op == VDEF_LSLSLOPE) {
dst->vf.val = slope;
- dst->vf.when = cnt*src->step;
+ dst->vf.when = 0;
} else if (dst->vf.op == VDEF_LSLINT) {
dst->vf.val = y_intercept;
- dst->vf.when = cnt*src->step;
+ dst->vf.when = 0;
} else if (dst->vf.op == VDEF_LSLCORREL) {
dst->vf.val = correl;
- dst->vf.when = cnt*src->step;
+ dst->vf.when = 0;
};
} else {
dst->vf.val = DNAN;
dst->vf.when = 0;
}
- }
- break;
+ }
+ break;
}
return 0;
}