Code

TICK with negative numbers should 'start from the top of the graph' looking down...
authoroetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa>
Tue, 6 Jan 2009 15:45:53 +0000 (15:45 +0000)
committeroetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa>
Tue, 6 Jan 2009 15:45:53 +0000 (15:45 +0000)
git-svn-id: svn://svn.oetiker.ch/rrdtool/branches/1.2@1725 a5681a0c-68f1-0310-ab6d-d61299d08faa

program/src/rrd_graph.c

index b7c3f12b6c1f7adfcba8d6c24b55c500056883a1..416b5d5f38ddcaee9e75c303855c9106349fd1ed 100644 (file)
@@ -2811,8 +2811,8 @@ graph_paint(image_desc_t *im, char ***calcpr)
                                    im -> gdes[i].col );
               } else if ( im -> gdes[i].yrule < 0 ) {
                       gfx_new_line(im->canvas,
-                                   im -> xorigin + ii, im->yorigin - im -> ysize,
-                                   im -> xorigin + ii, im->yorigin - ( 1 - im -> gdes[i].yrule ) * im -> ysize,
+                                   im -> xorigin + ii, im->yorigin - im->ysize,
+                                   im -> xorigin + ii, im->yorigin - im->ysize - im->gdes[i].yrule * im->ysize,
                                    1.0,
                                    im -> gdes[i].col );