[rrd-users] Re: new/odd behavior in 1.2.2

This is a discussion on [rrd-users] Re: new/odd behavior in 1.2.2 within the RRD Users forums, part of the Networking and Network Related category; Hi Jason, you are absolutely right ... this is a bug ... (any takers for that testing suite ?) the following should fix ...


Go Back   Usenet Forums > Networking and Network Related > RRD Users

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 05-08-2005
Tobias Oetiker
 
Posts: n/a
Default [rrd-users] Re: new/odd behavior in 1.2.2

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@list.ee.ethz.ch?subject=unsubscribe
> Help mailto:rrd-users-request@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@list.ee.ethz.ch?subject=unsubscribe
Help mailto:rrd-users-request@list.ee.ethz.ch?subject=help
Archive http://lists.ee.ethz.ch/rrd-users
WebAdmin http://lists.ee.ethz.ch/lsg2.cgi

Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 05:38 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0