[rrd-users] Re: Locale encoding problem fixed in 1.2.10

Tobias Oetiker oetiker at ee.ethz.ch
Mon Jun 20 11:14:20 MEST 2005


David,

looking at your graph it seems there is also aproblem with
alignement of the xaxis lables .. try this patch.

Index: rrd_graph.c
===================================================================
--- rrd_graph.c (revision 642)
+++ rrd_graph.c (working copy)
@@ -1844,11 +1844,11 @@
 # error "your libc has no strftime I guess we'll abort the exercise here."
 #endif
        gfx_new_text ( im->canvas,
-                     xtr(im,tilab), Y0+im->text_prop[TEXT_PROP_AXIS].size,
+                     xtr(im,tilab), Y0+im->text_prop[TEXT_PROP_AXIS].size*1.4+5,
                      im->graph_col[GRC_FONT],
                      im->text_prop[TEXT_PROP_AXIS].font,
                      im->text_prop[TEXT_PROP_AXIS].size,
-                     im->tabwidth, 0.0, GFX_H_CENTER, GFX_V_TOP,
+                     im->tabwidth, 0.0, GFX_H_CENTER, GFX_V_BOTTOM,
                      graph_label );

     }


while we are at it ... there is also an issue with alt-y-grid labels ...

@@ -1573,7 +1573,7 @@
            } else {
                int len = decimals + 1;
                if (im->unitslength < len+2) im->unitslength = len+2;
-               sprintf(im->ygrid_scale.labfmt, "%%%d.1f%s", len, ( im->symbol != ' ' ? " %c" : "" ));
+               sprintf(im->ygrid_scale.labfmt, "%%%d.0f%s", len, ( im->symbol != ' ' ? " %c" : "" ));
            }
        }
        else {

cheers
tobi

-- 
 ______    __   _
/_  __/_  / /  (_) 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