for(ii=0;ii<im->gdes[i].ds_cnt;ii++){
if(strcmp(im->gdes[i].ds_namv[ii],im->gdes[i].ds_nam) == 0){
im->gdes[i].ds=ii; }
for(ii=0;ii<im->gdes[i].ds_cnt;ii++){
if(strcmp(im->gdes[i].ds_namv[ii],im->gdes[i].ds_nam) == 0){
im->gdes[i].ds=ii; }
im->text_prop[TEXT_PROP_LEGEND].font,
im->text_prop[TEXT_PROP_LEGEND].size,
im->tabwidth,
im->text_prop[TEXT_PROP_LEGEND].font,
im->text_prop[TEXT_PROP_LEGEND].size,
im->tabwidth,
im->text_prop[TEXT_PROP_LEGEND].font,
im->text_prop[TEXT_PROP_LEGEND].size,
im->tabwidth,
im->text_prop[TEXT_PROP_LEGEND].font,
im->text_prop[TEXT_PROP_LEGEND].size,
im->tabwidth,
gfx_new_text( im->canvas,
7, (im->yorigin - im->ysize/2),
im->graph_col[GRC_FONT],
im->text_prop[TEXT_PROP_AXIS].font,
gfx_new_text( im->canvas,
7, (im->yorigin - im->ysize/2),
im->graph_col[GRC_FONT],
im->text_prop[TEXT_PROP_AXIS].font,
- im->text_prop[TEXT_PROP_AXIS].size, im->tabwidth, 270.0,
- GFX_H_CENTER, GFX_V_CENTER,
+ im->text_prop[TEXT_PROP_AXIS].size, im->tabwidth,
+ RRDGRAPH_YLEGEND_ANGLE,
+ GFX_H_LEFT, GFX_V_CENTER,
- gfx_new_text(im->canvas,7,im->text_prop[TEXT_PROP_AXIS].size*(l-n),
+ gfx_new_text(im->canvas,7,im->text_prop[TEXT_PROP_AXIS].size*(n+1),
im->graph_col[GRC_FONT],
im->text_prop[TEXT_PROP_AXIS].font,
im->text_prop[TEXT_PROP_AXIS].size, im->tabwidth, 270.0,
im->graph_col[GRC_FONT],
im->text_prop[TEXT_PROP_AXIS].font,
im->text_prop[TEXT_PROP_AXIS].size, im->tabwidth, 270.0,
boxH = gfx_get_text_width(im->canvas, 0,
im->text_prop[TEXT_PROP_AXIS].font,
im->text_prop[TEXT_PROP_AXIS].size,
boxH = gfx_get_text_width(im->canvas, 0,
im->text_prop[TEXT_PROP_AXIS].font,
im->text_prop[TEXT_PROP_AXIS].size,
- if (im->ylegend[0] != '\0') {
- Xvertical = im->text_prop[TEXT_PROP_LEGEND].size *2;
- Yvertical = im->text_prop[TEXT_PROP_LEGEND].size * (strlen(im->ylegend)+1);
+ if (im->extra_flags & ONLY_GRAPH) {
+ if ( im->ysize > 32 ) {
+ rrd_set_error("height > 32 is not possible with --only-graph option");
+ return -1;
+ }
+ Xspacing =0;
+ Yspacing =0;
+ } else {
+ if (im->ylegend[0] != '\0') {
+ Xvertical = im->text_prop[TEXT_PROP_LEGEND].size *2;
+ Yvertical = im->text_prop[TEXT_PROP_LEGEND].size * (strlen(im->ylegend)+1);
+ }
im->text_prop[TEXT_PROP_TITLE].font,
im->text_prop[TEXT_PROP_TITLE].size,
im->tabwidth,
im->text_prop[TEXT_PROP_TITLE].font,
im->text_prop[TEXT_PROP_TITLE].size,
im->tabwidth,
/**************************************************************
*** Calculating sizes and locations became a bit confusing ***
*** so I moved this into a separate function. ***
/**************************************************************
*** Calculating sizes and locations became a bit confusing ***
*** so I moved this into a separate function. ***
} else {
if ((fo = fopen(im->graphfile,"wb")) == NULL) {
rrd_set_error("Opening '%s' for write: %s",im->graphfile,
} else {
if ((fo = fopen(im->graphfile,"wb")) == NULL) {
rrd_set_error("Opening '%s' for write: %s",im->graphfile,
-rrd_graph(int argc, char **argv, char ***prdata, int *xsize, int *ysize)
+rrd_graph(int argc, char **argv, char ***prdata, int *xsize, int *ysize, FILE *stream)
char scan_gtm[12],scan_mtm[12],scan_ltm[12],col_nam[12];
time_t start_tmp=0,end_tmp=0;
long long_tmp;
char scan_gtm[12],scan_mtm[12],scan_ltm[12],col_nam[12];
time_t start_tmp=0,end_tmp=0;
long long_tmp;
{"lazy", no_argument, 0, 'z'},
{"zoom", required_argument, 0, 'm'},
{"no-legend", no_argument, 0, 'g'},
{"lazy", no_argument, 0, 'z'},
{"zoom", required_argument, 0, 'm'},
{"no-legend", no_argument, 0, 'g'},
{"alt-y-grid", no_argument, 0, 'Y'},
{"no-minor", no_argument, 0, 'I'},
{"alt-autoscale", no_argument, 0, 'A'},
{"alt-y-grid", no_argument, 0, 'Y'},
{"no-minor", no_argument, 0, 'I'},
{"alt-autoscale", no_argument, 0, 'A'},