aboutsummaryrefslogtreecommitdiff
path: root/src/statistics/gtk_statistics.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/statistics/gtk_statistics.c')
-rw-r--r--src/statistics/gtk_statistics.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/statistics/gtk_statistics.c b/src/statistics/gtk_statistics.c
index bc7797f4..4b75b1ef 100644
--- a/src/statistics/gtk_statistics.c
+++ b/src/statistics/gtk_statistics.c
@@ -472,7 +472,22 @@ gtk_statistics_draw (GtkWidget *widget,
472 h += te.height / 2 + 1.0; 472 h += te.height / 2 + 1.0;
473 cairo_show_text (cr, vh->label); 473 cairo_show_text (cr, vh->label);
474 if (xmax == xmin) 474 if (xmax == xmin)
475 {
476 hv = &vh->history[vh->last_history_offset % MAX_HISTORY];
477 ry = hv->y / (double) ymax;
478 ry = BORDER + tex_max.height / 2.0 + (1.0 - ry) * (height - BORDER * 2.0 - tey_max.height - tex_max.height);
479 /* if y-values are small, offset y-values a bit to allow overlapping curves to still show up */
480 if (ymax < height / (priv->num_values * 4))
481 ry += priv->num_values * 2 - (4 * i);
482 cairo_move_to (cr,
483 width - BORDER - tex_max.width / 2.0,
484 ry);
485 cairo_line_to (cr,
486 rx = tey_max.width + BORDER * 2.0,
487 ry);
488 cairo_stroke (cr);
475 continue; 489 continue;
490 }
476 491
477 for (j=0;j<vh->history_size;j++) 492 for (j=0;j<vh->history_size;j++)
478 { 493 {