index f1e1fe7e3db3ca1a900f48d0c226ada899e4901c..2fae2583de02cfda0e96f5edeafac79a4dbfc292 100644 (file)
--- a/program/src/rrd_graph.c
+++ b/program/src/rrd_graph.c
/****************************************************************************
- * RRDtool 1.2.3 Copyright by Tobi Oetiker, 1997-2005
+ * RRDtool 1.2.4 Copyright by Tobi Oetiker, 1997-2005
****************************************************************************
* rrd__graph.c produce graphs from data in rrdfiles
****************************************************************************/
}
for(i=0; i<4;i++) {
- if (pixel * ylab[gridind].lfac[i] >= 2 * im->text_prop[TEXT_PROP_AXIS].size) {
+ if (pixel * ylab[gridind].lfac[i] >= 2.5 * im->text_prop[TEXT_PROP_AXIS].size) {
im->ygrid_scale.labfact = ylab[gridind].lfac[i];
break;
}
/* yaxis unit description */
gfx_new_text( im->canvas,
- 12, (im->yorigin - im->ysize/2),
+ 10, (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,
/* rrdtool 'logo' */
gfx_new_text( im->canvas,
im->ximg-7, 7,
- ( im->graph_col[GRC_FONT] & 0xffffff00 ) | 0x00000066,
+ ( im->graph_col[GRC_FONT] & 0xffffff00 ) | 0x00000044,
im->text_prop[TEXT_PROP_AXIS].font,
5.5, im->tabwidth, 270,
GFX_H_RIGHT, GFX_V_TOP,
if ( im->gdes[i].gf != GF_PRINT &&
im->gdes[i].gf != GF_GPRINT &&
im->gdes[i].gf != GF_COMMENT) {
- int boxH, boxV;
+ int boxL, boxH, boxV;
- boxH = gfx_get_text_width(im->canvas, 0,
+ boxL = gfx_get_text_width(im->canvas, 0,
im->text_prop[TEXT_PROP_LEGEND].font,
im->text_prop[TEXT_PROP_LEGEND].size,
- im->tabwidth,"M", 0)*1.2;
- boxV = boxH;
+ im->tabwidth,"oo", 0);
+ boxH = boxL / 1.9;
+ boxV = boxH+1;
/* make sure transparent colors show up all the same */
+ node = gfx_new_area(im->canvas,
+ X0-1,Y0-boxV,
+ X0-1,Y0+1,
+ X0+boxL+0.5,Y0+1,
+ im->graph_col[GRC_BACK]);
+ gfx_add_point ( node, X0+boxL+0.5, Y0-boxV );
node = gfx_new_area(im->canvas,
- X0,Y0-boxV,
- X0,Y0,
+ X0-1,Y0-boxV,
+ X0-1,Y0,
X0+boxH,Y0,
im->graph_col[GRC_CANVAS]);
gfx_add_point ( node, X0+boxH, Y0-boxV );
node = gfx_new_area(im->canvas,
- X0,Y0-boxV,
- X0,Y0,
+ X0-1,Y0-boxV,
+ X0-1,Y0,
X0+boxH,Y0,
im->gdes[i].col);
gfx_add_point ( node, X0+boxH, Y0-boxV );
node = gfx_new_line(im->canvas,
- X0,Y0-boxV, X0,Y0,
+ X0-1,Y0-boxV,
+ X0-1,Y0,
1,im->graph_col[GRC_FONT]);
gfx_add_point(node,X0+boxH,Y0);
gfx_add_point(node,X0+boxH,Y0-boxV);
}
if (im->ylegend[0] != '\0' ) {
- Xvertical = im->text_prop[TEXT_PROP_UNIT].size *1.6;
+ Xvertical = im->text_prop[TEXT_PROP_UNIT].size *2;
}
im->text_prop[TEXT_PROP_AXIS].font,
im->text_prop[TEXT_PROP_AXIS].size,
im->tabwidth,
- "0", 0) * im->unitslength + Xspacing;
+ "0", 0) * im->unitslength;
}
}
im->minval = DNAN;
im->maxval = DNAN;
im->unitsexponent= 9999;
- im->unitslength= 5;
+ im->unitslength= 6;
im->symbol = ' ';
im->viewfactor = 1.0;
im->extra_flags= 0;