graph: tighten x-axis tooltip hit
authorJens Axboe <axboe@kernel.dk>
Thu, 15 Mar 2012 14:37:36 +0000 (15:37 +0100)
committerJens Axboe <axboe@kernel.dk>
Thu, 15 Mar 2012 14:37:36 +0000 (15:37 +0100)
Make it 10, like the Y-axis. Seems to work well in practice.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
graph.c

diff --git a/graph.c b/graph.c
index 3f2ee6a..7dbfd35 100644 (file)
--- a/graph.c
+++ b/graph.c
@@ -842,7 +842,7 @@ static int xy_match(struct xyvalue *xy, int x, int y)
        int xdiff = abs(xy->gx - x);
        int ydiff = abs(xy->gy - y);
 
-       return xdiff <= 20 && ydiff <= 10;
+       return xdiff <= 10 && ydiff <= 10;
 }
 
 const char *graph_find_tooltip(struct graph *g, int x, int y)