[rrd-users] Re: new/odd behavior in 1.2.2
Tobias Oetiker
oetiker at ee.ethz.ch
Sun May 8 01:22:01 MEST 2005
Hi Jason,
you are absolutely right ... this is a bug ...
(any takers for that testing suite ?)
the following should fix it ...
spinning 1.2.3 as I write this ...
Index: rrd_graph_helper.c
===================================================================
--- rrd_graph_helper.c (revision 503)
+++ rrd_graph_helper.c (working copy)
@@ -392,17 +392,17 @@
int err=0;
char *linecp = strdup(line);
dprintf("- looking for optional legend\n");
-
- /* The legend needs to be prefixed with "m ". This then gets
- ** replaced by the color box. */
-
+
dprintf("- examining '%s'\n",&line[*eaten]);
+ if (linecp[*eaten] != '\0' && linecp[*eaten] != ':') {
+ /* If the legend is not empty, it has to be prefixed with "m ". This then gets
+ * replaced by the color box later on. */
+ (*eaten)--;
+ linecp[*eaten]=' ';
+ (*eaten)--;
+ linecp[*eaten]='m';
+ }
- (*eaten)--;
- linecp[*eaten]=' ';
- (*eaten)--;
- linecp[*eaten]='m';
-
if (rrd_parse_legend(linecp, eaten, gdp)) err=1;
free(linecp);
> Hello,
> Before 1.2.2 any AREA, LINEx, etc elements that did not have a legend
> label explicitly stated would not show up in the legend.
>
> example:
> AREA:inoctets#99bb99 - produced no legend element
> AREA:inoctets#99bb99:"Ingress" - legend element (colored box and
> label "Ingress")
>
> Now in 1.2.2 I notice it draws a colored box for all AREA, LINEx,m etc.
> arguments regardless of a text label.
>
> Is this the new desired method, or do I need to do something different
> to not print those element in the legend? It makes graphs that have 100
> gradient colors pretty screwed up.
>
> Thanks for all the new updates in 1.2.x! :)
> Jason
>
> --
> Unsubscribe mailto:rrd-users-request at list.ee.ethz.ch?subject=unsubscribe
> Help mailto:rrd-users-request at list.ee.ethz.ch?subject=help
> Archive http://lists.ee.ethz.ch/rrd-users
> WebAdmin http://lists.ee.ethz.ch/lsg2.cgi
>
--
______ __ _
/_ __/_ / / (_) Oetiker @ ISG.EE, ETL F24.2, ETH, CH-8092 Zurich
/ // _ \/ _ \/ / System Manager, Time Lord, Coder, Designer, Coach
/_/ \.__/_.__/_/ http://people.ee.ethz.ch/oetiker +41(0)44-632-5286
--
Unsubscribe mailto:rrd-users-request at list.ee.ethz.ch?subject=unsubscribe
Help mailto:rrd-users-request at list.ee.ethz.ch?subject=help
Archive http://lists.ee.ethz.ch/rrd-users
WebAdmin http://lists.ee.ethz.ch/lsg2.cgi
More information about the rrd-users
mailing list