X-Git-Url: https://git.octo.it/?a=blobdiff_plain;ds=sidebyside;f=src%2Frrd_graph.c;h=aae131708b4cf5c483d53c72c6615180f973f3d7;hb=c4f7117a983147777138266b669b9d72dfe20fb6;hp=69d68718aba761455fa12bf5147865146d2e02d0;hpb=ec2afe5e94d9fcd72bb58e572f0251c7557325f7;p=rrdtool.git diff --git a/src/rrd_graph.c b/src/rrd_graph.c index 69d6871..aae1317 100644 --- a/src/rrd_graph.c +++ b/src/rrd_graph.c @@ -1673,8 +1673,8 @@ int draw_horizontal_grid(image_desc_t *im) for (i = sgrid; i <= egrid; i++){ double Y0=ytr(im,im->ygrid_scale.gridstep*i); double YN=ytr(im,im->ygrid_scale.gridstep*(i+1)); - if ( Y0 >= im->yorigin-im->ysize - && Y0 <= im->yorigin){ + if ( round(Y0) >= im->yorigin-im->ysize + && round(Y0) <= im->yorigin){ /* Make sure at least 2 grid labels are shown, even if it doesn't agree with the chosen settings. Add a label if required by settings, or if there is only one label so far and the next grid line is out of bounds. */