From f0ebf2a85fc0d8a468277bdbfb81ad8e04ab992d Mon Sep 17 00:00:00 2001 From: oetiker Date: Mon, 20 Jun 2005 09:15:10 +0000 Subject: [PATCH] x-axis labels should be aligned to their baseline alt-y-grid labels without fractionals should have no fractionals when printed git-svn-id: svn://svn.oetiker.ch/rrdtool/branches/1.2/program@645 a5681a0c-68f1-0310-ab6d-d61299d08faa --- src/rrd_graph.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/rrd_graph.c b/src/rrd_graph.c index c9411e2..0572241 100644 --- a/src/rrd_graph.c +++ b/src/rrd_graph.c @@ -1573,7 +1573,7 @@ calc_horizontal_grid(image_desc_t *im) } 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 { @@ -1844,11 +1844,11 @@ vertical_grid( # 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 ); } -- 2.30.2