aboutsummaryrefslogtreecommitdiff
path: root/src/graph.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/graph.c')
-rw-r--r--src/graph.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/graph.c b/src/graph.c
index 1464e8b..8088773 100644
--- a/src/graph.c
+++ b/src/graph.c
@@ -153,7 +153,7 @@ draw_graph (FILE *fp,
xtr (x), ytr (0),
xtr (x), ytr (tnext.inrate), i_in);
gdImageLine (graph, xtr (x), ytr (th.inrate),
- xtr (x+1), ytr (tnext.inrate), i_in);
+ xtr (x + xstep), ytr (tnext.inrate), i_in);
}
/* Outgoing traffic */
@@ -166,7 +166,7 @@ draw_graph (FILE *fp,
scale_sample (mon, queue_get_ptr (dataq, i - 1), &tnext);
gdImageLine (graph, xtr (x), ytr (th.outrate),
- xtr (x+1), ytr (tnext.outrate), gdBrushed);
+ xtr (x + xstep), ytr (tnext.outrate), gdBrushed);
}
/* Border */
@@ -196,13 +196,13 @@ draw_graph (FILE *fp,
/* Left tick */
gdImageLine (graph,
- xtr (-2), y,
- xtr (1), y,
+ xtr (0) - 2, y,
+ xtr (0) + 1, y,
i_grid);
/* Right tick */
gdImageLine (graph,
- xtr (xmax - 1), y,
- xtr (xmax + 1), y,
+ xtr (xmax) - 1, y,
+ xtr (xmax) + 1, y,
i_grid);
/* Grid line */
@@ -230,7 +230,7 @@ draw_graph (FILE *fp,
/* Tick */
gdImageLine (graph,
- x, ytr (-2), x, ytr (1),
+ x, ytr (0) - 2, x, ytr (0) + 1,
i_grid);
/* Grid line */
gdImageLine (graph,

Return to:

Send suggestions and report system problems to the System administrator.