index d7ff2b003b3e4e4546a82a043f122c6098fc6f6d..047d9c27d7e1b001de509b747cb14de844805a9b 100644 (file)
--- a/program/src/rrd_graph.c
+++ b/program/src/rrd_graph.c
/****************************************************************************
- * RRDtool 1.2.0 Copyright by Tobi Oetiker, 1997-2005
+ * RRDtool 1.2.1 Copyright by Tobi Oetiker, 1997-2005
****************************************************************************
* rrd__graph.c produce graphs from data in rrdfiles
****************************************************************************/
#ifndef RRD_DEFAULT_FONT
/* there is special code later to pick Cour.ttf when running on windows */
-#define RRD_DEFAULT_FONT "VeraMono.ttf"
+#define RRD_DEFAULT_FONT "DejaVuSansMono-Roman.ttf"
#endif
text_prop_t text_prop[] = {
/* yaxis unit description */
gfx_new_text( im->canvas,
- 7, (im->yorigin - im->ysize/2),
+ 12, (im->yorigin - im->ysize/2),
im->graph_col[GRC_FONT],
im->text_prop[TEXT_PROP_UNIT].font,
im->text_prop[TEXT_PROP_UNIT].size, im->tabwidth,
/* graph title */
gfx_new_text( im->canvas,
- im->ximg/2, im->text_prop[TEXT_PROP_TITLE].size*1.2,
+ im->ximg/2, im->text_prop[TEXT_PROP_TITLE].size*1.3+4,
im->graph_col[GRC_FONT],
im->text_prop[TEXT_PROP_TITLE].font,
im->text_prop[TEXT_PROP_TITLE].size, im->tabwidth, 0.0,
** | |..............legends......................|
** +-+-------------------------------------------+
*/
- int Xvertical=0, Yvertical=0,
+ int Xvertical=0,
Ytitle =0,
Xylabel =0,
Xmain =0, Ymain =0,
if (im->ylegend[0] != '\0' ) {
Xvertical = im->text_prop[TEXT_PROP_UNIT].size *2;
- Yvertical = gfx_get_text_width(im->canvas, 0,
- im->text_prop[TEXT_PROP_UNIT].font,
- im->text_prop[TEXT_PROP_UNIT].size,
- im->tabwidth,im->ylegend, 0);
}
im->text_prop[TEXT_PROP_TITLE].size,
im->tabwidth,
im->title, 0) + 2*Xspacing; */
- Ytitle = im->text_prop[TEXT_PROP_TITLE].size*2.5;
+ Ytitle = im->text_prop[TEXT_PROP_TITLE].size*2.6+10;
}
if (elements) {
im->text_prop[TEXT_PROP_AXIS].font,
im->text_prop[TEXT_PROP_AXIS].size,
im->tabwidth,
- "0", 0) * im->unitslength + im->text_prop[TEXT_PROP_AXIS].size * 2;
+ "0", 0) * im->unitslength + Xspacing;
}
}
im->yimg += Ytitle;
im->yorigin += Ytitle;
} else {
- im->yimg += Yspacing;
- im->yorigin += Yspacing;
+ im->yimg += 1.5*Yspacing;
+ im->yorigin += 1.5*Yspacing;
}
/* reserve space for padding below the graph */
im->yimg += Yspacing;
if(leg_place(im)==-1)
return -1;
- /* last of three steps: check total height of image */
- if (im->yimg < Yvertical) im->yimg = Yvertical;
#if 0
if (Xlegend > im->ximg) {