- /* lets see if the required data source is realy there */
- for(ii=0;ii<im->gdes[i].ds_cnt;ii++){
+ /* lets see if the required data source is really there */
+ for(ii=0;ii<(int)im->gdes[i].ds_cnt;ii++){
- if ( (gr_time >= im->gdes[vidx].start) &&
- (gr_time <= im->gdes[vidx].end) ) {
+ if ( ((long int)gr_time >= (long int)im->gdes[vidx].start) &&
+ ((long int)gr_time <= (long int)im->gdes[vidx].end) ) {
7, (im->yorigin - im->ysize/2),
im->graph_col[GRC_FONT],
im->text_prop[TEXT_PROP_AXIS].font,
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,
+ im->text_prop[TEXT_PROP_AXIS].size, im->tabwidth,
+ RRDGRAPH_YLEGEND_ANGLE,
GFX_H_LEFT, GFX_V_CENTER,
im->ylegend);
} else {
/* horrible hack until we can actually print vertically */
{
int n;
GFX_H_LEFT, GFX_V_CENTER,
im->ylegend);
} else {
/* horrible hack until we can actually print vertically */
{
int n;
s[0]=im->ylegend[n];
s[1]='\0';
gfx_new_text(im->canvas,7,im->text_prop[TEXT_PROP_AXIS].size*(n+1),
s[0]=im->ylegend[n];
s[1]='\0';
gfx_new_text(im->canvas,7,im->text_prop[TEXT_PROP_AXIS].size*(n+1),
- 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);
+ }
/**************************************************************
*** 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. ***
{"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'},
&im->xlab_user.precis,
&stroff) == 7 && stroff != 0){
strncpy(im->xlab_form, optarg+stroff, sizeof(im->xlab_form) - 1);
&im->xlab_user.precis,
&stroff) == 7 && stroff != 0){
strncpy(im->xlab_form, optarg+stroff, sizeof(im->xlab_form) - 1);
n=0;
sscanf(str,"%le,%29[A-Z]%n",¶m,func,&n);
n=0;
sscanf(str,"%le,%29[A-Z]%n",¶m,func,&n);
;
} else {
n=0;
sscanf(str,"%29[A-Z]%n",func,&n);
;
} else {
n=0;
sscanf(str,"%29[A-Z]%n",func,&n);