summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: ee0d1f5)
raw | patch | inline | side by side (parent: ee0d1f5)
author | oetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa> | |
Sat, 8 Mar 2003 18:44:06 +0000 (18:44 +0000) | ||
committer | oetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa> | |
Sat, 8 Mar 2003 18:44:06 +0000 (18:44 +0000) |
-- Christophe Kalt <kalt@taranis.org>
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk/program@190 a5681a0c-68f1-0310-ab6d-d61299d08faa
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk/program@190 a5681a0c-68f1-0310-ab6d-d61299d08faa
src/rrd_graph.c | patch | blob | history |
diff --git a/src/rrd_graph.c b/src/rrd_graph.c
index 451e891490f8fddd3a5f399818113a3db99b4b9b..715f0dc76e160f97645f404d4739fd689e82f452 100644 (file)
--- a/src/rrd_graph.c
+++ b/src/rrd_graph.c
for(i=0;i<im->gdes_c;i++){
fill_last = fill;
+
+ /* hid legends for rules which are not displayed */
+
+ if (im->gdes[i].gf == GF_HRULE &&
+ (im->gdes[i].yrule < im->minval || im->gdes[i].yrule > im->maxval))
+ im->gdes[i].legend[0] = '\0';
+
+ if (im->gdes[i].gf == GF_VRULE &&
+ (im->gdes[i].xrule < im->start || im->gdes[i].xrule > im->end))
+ im->gdes[i].legend[0] = '\0';
leg_cc = strlen(im->gdes[i].legend);